/** * Set the to tag. * * @param tag -- tag to set. */ public void setToTag(String tag) { try { toHeader.setTag(tag); } catch (ParseException e) { } }
/** * Creates a new ToHeader based on the newly supplied address and * tag values. * * @param address - the new Address object of the address. * @param tag - the new string value of the tag. * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the tag value. * @return the newly created ToHeader object. */ public ToHeader createToHeader(Address address, String tag) throws ParseException { if (address == null) throw new NullPointerException("null address"); To to = new To(); to.setAddress(address); if (tag != null) to.setTag(tag); return to; }
/** * This timer task is used to garbage collect the dialog after some time. * */ class DialogDeleteIfNoAckSentTask extends SIPStackTimerTask implements Serializable { private long seqno; public DialogDeleteIfNoAckSentTask(long seqno) { this.seqno = seqno; } public void runTask() { if (SIPDialog.this.highestSequenceNumberAcknowledged < seqno) { /* * Did not send ACK so we need to delete the dialog. B2BUA NOTE: * we may want to send BYE to the Dialog at this point. Do we * want to make this behavior tailorable? */ dialogDeleteIfNoAckSentTask = null; if (!SIPDialog.this.isBackToBackUserAgent) { if (logger.isLoggingEnabled()) logger.logError( "ACK Was not sent. killing dialog " + dialogId); if (((SipProviderImpl) sipProvider).getSipListener() instanceof SipListenerExt) { raiseErrorEvent(SIPDialogErrorEvent.DIALOG_ACK_NOT_SENT_TIMEOUT); } else { delete(); }
from.setTag(this.getLocalTag()); if (this.getRemoteTag() != null) to.setTag(this.getRemoteTag());
to.setAddress(this.getRemoteParty()); if (hisTag != null) to.setTag(this.hisTag); sipRequest.setTo(to); sipRequest.setMaxForwards(new MaxForwards(70));