/** * 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; }
public void terminate(final SipSession session, final int calleeResponseCode, final String calleeResponseText, final int callerResponseCode, final String callerResponseText) throws IOException { if(terminationSent) { throw new IllegalStateException("Proxy Termination Already Sent !"); } sendBye (session, calleeContact, toHeader, fromHeader, callerCSeq + 1, calleeRouteSet, calleeResponseCode, calleeResponseText); sendBye (session, callerContact, new To(fromHeader), new From(toHeader), calleeCSeq + 1, callerRouteSet, callerResponseCode, callerResponseText); terminationSent = true; }
public SIPHeader parse() throws ParseException { headerName(TokenTypes.TO); To to = new To(); super.parse(to); this.lexer.match('\n'); return to; }
public SIPHeader parse() throws ParseException { headerName(TokenTypes.TO); To to = new To(); super.parse(to); this.lexer.match('\n'); 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.myTag); sipRequest.setFrom(from); To to = new To(); to.setAddress(this.getRemoteParty()); if (hisTag != null)