: CallType.EMPTY;
} else if (event.eventType.equals("CONNECT")) {
if (bindingType
.equals(FritzboxBindingProvider.TYPE_ACTIVE)) {
state = itemType.isAssignableFrom(SwitchItem.class) ? OnOffType.ON
: new CallType(event.externalNo, event.line);
} else {
state = itemType.isAssignableFrom(SwitchItem.class) ? OnOffType.OFF
: CallType.EMPTY;
}
} else if (event.eventType.equals("RING")
&& bindingType
.equals(FritzboxBindingProvider.TYPE_INBOUND)) {
state = itemType.isAssignableFrom(SwitchItem.class) ? OnOffType.ON
: new CallType(event.externalNo,
event.internalNo);
} else if (event.eventType.equals("CALL")
&& bindingType
.equals(FritzboxBindingProvider.TYPE_OUTBOUND)) {
state = itemType.isAssignableFrom(SwitchItem.class) ? OnOffType.ON
: new CallType(event.internalNo,
event.externalNo);
}
if (state != null) {
eventPublisher.postUpdate(itemName, state);
}