} // end of try-catch
sharedSessionData.put(cid+"-dialback-key", key);
Element elem = new Element("db:result", key);
elem.addAttribute("to", remote_hostname);
elem.addAttribute("from", local_hostname);
elem.addAttribute("xmlns:db", DIALBACK_XMLNS);
StringBuilder sb = new StringBuilder();
// Attach also all controll packets which are wating to send
Packet p = null;
Queue<Packet> waiting = waitingControlPackets.get(cid);