callSessionFactory.createCallSession(serverID,
session = callSessionFactory.createCallSession(serverID,
    protected void handleOnPhone(NewStateEvent event) {        // Do nothing when the phoneManager is being removed/destroyed        if (!phoneManager.isReady()) {            return;        }        //everything after the hyphen should be skipped        String device = getDevice(event.getChannel());        try {            PhoneUser phoneUser = phoneManager.getActivePhoneUserByDevice(serverID, device);            //If there is no jid for this device don't do anything else            if (phoneUser == null) {                Log.debug("Asterisk-IM OnPhoneTask: Could not find device/jid mapping for device " +                    device + " returning");                return;            }            Log.debug("Asterisk-IM OnPhoneTask called for user " + phoneUser);            CallSession session = callSessionFactory.getCallSession(event.getUniqueId());            if (session == null) {                callSessionFactory.createCallSession(serverID,                        event.getUniqueId(), phoneUser.getUsername());            }            session.setChannel(device);            session.setCallerID(event.getCallerId());            session.setCallerIDName(event.getCallerIdName());            callSessionFactory.modifyCallSession(session, CallSession.Status.onphone);        }        catch (Throwable e) {            Log.error(e.getMessage(), e);        }    }