public SipServletRequest createRequest(SipApplicationSession sipAppSession, String method, Address from, Address to, String handler, String originalCallId, String fromTagToUse) { if (logger.isDebugEnabled()) { logger .debug("Creating new SipServletRequest for SipApplicationSession[" + sipAppSession + "] METHOD[" + method + "] FROM_A[" + from + "] TO_A[" + to + "]"); } validateCreation(method, sipAppSession); try { //javadoc specifies that a copy of the address should be done hence the clone return createSipServletRequest(sipAppSession, method, (Address)from.clone(), (Address)to.clone(), handler, originalCallId, fromTagToUse); } catch (ServletParseException e) { logger.error("Error creating sipServletRequest", e); return null; } }
@Override public SipServletRequest createRequestWithCallID(SipApplicationSession sipAppSession, String method, Address from, Address to, String callID){ if (logger.isDebugEnabled()) { logger .debug("Creating new SipServletRequest for SipApplicationSession[" + sipAppSession + "] METHOD[" + method + "] FROM_A[" + from + "] TO_A[" + to + "]"); } validateCreation(method, sipAppSession); try { String handler = ((MobicentsSipApplicationSession)sipAppSession).getCurrentRequestHandler(); //javadoc specifies that a copy of the address should be done hence the clone return createSipServletRequest(sipAppSession, method, (Address)from.clone(), (Address)to.clone(), handler, callID, null); } catch (ServletParseException e) { logger.error("Error creating sipServletRequest", e); return null; } }
final FromHeader fromHeader = (FromHeader) originalRequest.getHeader(FromHeader.NAME); final ToHeader toHeader = (ToHeader) originalRequest.getHeader(ToHeader.NAME); final AddressImpl currentLocalParty = (AddressImpl)this.getLocalParty().clone(); final AddressImpl currentRemoteParty = (AddressImpl)this.getRemoteParty().clone(); ((Parameters)currentRemoteParty .getAddress().getURI()).removeParameter("tag"); ((Parameters)currentLocalParty .getAddress().getURI()).removeParameter("tag");