*/
private void endCallItemUpdate(FreeswitchBindingConfig config){
OnOffType activeState = OnOffType.OFF;;
CallType callType = (CallType)CallType.EMPTY;
StringType callerId = StringType.EMPTY;
/*
* A channel has ended that has this item associated with it
* We still need to check if this item is associated with other
* channels.
* We are going to iterate backwards to get the last added channel;
*/
ListIterator<String> it =
new ArrayList<String>(itemMap.keySet()).listIterator(itemMap.size());
//if we get a match we will stop processing
boolean match = false;
while (it.hasPrevious()) {
String uuid = it.previous();
for(FreeswitchBindingConfig c : itemMap.get(uuid)){
if(c.getItemName().equals(config.getItemName())){
Channel channel = eventCache.get(uuid);
activeState = OnOffType.ON;
callType = channel.getCall();
callerId = new StringType(String.format("%s : %s",
channel.getEventHeader(CID_NAME),
channel.getEventHeader(CID_NUMBER)));
match = true;
break;
}