CallSession callSession = getCallSessionFactory() .getPhoneSession(event.getUniqueId());
CallSession callSession = getCallSessionFactory().getPhoneSession(event.getUniqueId()); if (callSession.getCallerID() != null) {  return; }
        public void run() {            String device = getDevice(event.getChannel());            PhoneManager phoneManager = null;            try {                phoneManager = getPhoneManager();                PhoneUser phoneUser = phoneManager.getByDevice(device);                //If there is no jid for this device don't do anything else                if (phoneUser == null) {                    return;                }                CallSession callSession = getCallSessionFactory()                        .getPhoneSession(event.getUniqueId());                callSession.setChannel(event.getChannel());                JID jid = getJID(phoneUser);                Message message = new Message();                message.setFrom(asteriskPlugin.getComponentJID());                message.setTo(jid);                PhoneEvent phoneEvent =                        new PhoneEvent(event.getUniqueId(), Type.DIALED, device);                message.getElement().add(phoneEvent);                asteriskPlugin.sendPacket(message);            }            catch (Exception e) {                log.log(Level.SEVERE, e.getMessage(), e);            }            finally {                close(phoneManager);            }        }