/** * Return true if the message has a To header tag. * * @return true if the message has a to header and that header has a tag. */ public boolean hasToTag() { return toHeader != null && toHeader.getTag() != null; }
/** * Return the to tag. */ public String getToTag() { return toHeader == null ? null : toHeader.getTag(); }
/** * Get A dialog identifier constructed from this messsage. This is an id that can be used to * identify dialogs. * * @param isServerTransaction is a flag that indicates whether this is a server transaction. */ public final String getDialogId(boolean isServer) { To to = (To) this.getTo(); return this.getDialogId( isServer, to.getTag() ); }
public void writeExternal(ObjectOutput out) throws IOException { out.writeLong(calleeCSeq); out.writeLong(callerCSeq); out.writeUTF(calleeContact.toString()); out.writeUTF(callerContact.toString()); out.writeInt(calleeRouteSet.size()); Iterator<javax.sip.address.Address> i = calleeRouteSet.iterator(); while (i.hasNext()) { javax.sip.address.Address a = i.next(); out.writeUTF(a.toString()); } out.writeInt(callerRouteSet.size()); i = callerRouteSet.iterator(); while (i.hasNext()) { javax.sip.address.Address a = i.next(); out.writeUTF(a.toString()); } out.writeUTF(toHeader.getAddress().toString()); out.writeUTF(toHeader.getTag()); out.writeUTF(fromHeader.getAddress().toString()); out.writeUTF(fromHeader.getTag()); out.writeUTF(callId); }