phoneEvent.addElement("callerID").setText(StringUtils.stripTags(event.getCallerId()));
phoneEvent.addElement("callerID").setText(callSession.getCallerID());
        public void run() {            //everything after the hyphen should be skipped            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) {                    log.finer("AnswerTask: Could not find device/jid mapping for device " +                            device + " returning");                    return;                }                CallSession callSession = getCallSessionFactory().getPhoneSession(event.getUniqueId());                // If the device should be monitored, then start monitoring                PhoneDevice phoneDevice = phoneManager.getDevice(device);                if (phoneDevice.isMonitored()) {                    PhoneManager mgr = PhoneManagerFactory.getPhoneManager();                    try {                        log.info("Staring monitoring on channel "+event.getChannel());                        mgr.monitor(event.getChannel());                        callSession.setMonitored(true);                    }                    finally {                        PhoneManagerFactory.close(mgr);                    }                }                JID jid = getJID(phoneUser);                XMPPServer server = getInstance();                // Notify the client that they have answered the phone                Message message = new Message();                message.setFrom(asteriskPlugin.getComponentJID());                message.setTo(jid);                PhoneEvent phoneEvent =                        new PhoneEvent(callSession.getId(), Type.ON_PHONE, device);                phoneEvent.addElement("callerID").setText(StringUtils.stripTags(event.getCallerId()));                message.getElement().add(phoneEvent);                asteriskPlugin.sendPacket(message);                //Acquire the xmpp sessions for the user                SessionManager sessionManager = server.getSessionManager();                Collection<ClientSession> sessions = sessionManager.getSessions(jid.getNode());                // We don't care about people without a session                if (sessions.size() == 0) {                    return;                }                log.finer("AnswerTask: setting presence to away for " + jid);                // Iterate through all of the sessions sending out new presences for each                Presence presence = new Presence();                presence.setShow(Presence.Show.away);                presence.setStatus("On the phone");                PhoneStatus phoneStatus = new PhoneStatus(Status.ON_PHONE);                presence.getElement().add(phoneStatus);                Collection<Presence> prevPresences = new ArrayList<Presence>();                for (ClientSession session : sessions) {                    Presence prevPresence = session.getPresence();                    prevPresences.add(prevPresence);                    JID fullJID = session.getAddress();                    presence.setFrom(fullJID);                    server.getPresenceRouter().route(presence);                }                previousPresenceMap.put(jid, prevPresences);            }            catch (Exception e) {                log.log(Level.SEVERE, e.getMessage(), e);            }            finally {                close(phoneManager);            }        }