public void setPendingRouteUpdateOn202Response(SIPRequest sipRequest) { this.pendingRouteUpdateOn202Response = true; // Issue 374 : patch from ivan dubrov : get the from tag instead of to tag String fromTag = sipRequest.getFromHeader().getTag(); if (fromTag != null) { this.setRemoteTag(fromTag); } }
public void setOriginalRequest(MobicentsSipServletRequest originalRequest) { // Determine the direction of the request. Either it's from the dialog initiator (the caller) // or from the callee if(storeTerminationInfo) { if(((MessageExt)originalRequest.getMessage()).getFromHeader().getTag().equals(callerFromTag)) { terminationInfo.setCallerCSeq((((MessageExt)originalRequest.getMessage()).getCSeqHeader().getSeqNumber())); } else { // If it's from the callee we should send it in the other direction terminationInfo.setCalleeCSeq((((MessageExt)originalRequest.getMessage()).getCSeqHeader().getSeqNumber())); } } this.originalRequest = (SipServletRequestImpl) originalRequest; }
public ProxyImpl(SipServletRequestImpl request, SipFactoryImpl sipFactoryImpl) { this.proxyTimerService = ((MobicentsSipApplicationSession)request.getSipApplicationSession(false)).getSipContext().getProxyTimerService(); this.originalRequest = request; this.sipFactoryImpl = sipFactoryImpl; this.proxyBranches = new LinkedHashMap<URI, ProxyBranchImpl> (); this.proxyTimeout = 180; // 180 secs default this.proxy1xxTimeout = -1; // not activated by default String outboundInterfaceStringified = ((MobicentsSipSession)request.getSession()).getOutboundInterface(); if(outboundInterfaceStringified != null) { try { outboundInterface = (SipURI) sipFactoryImpl.createURI(outboundInterfaceStringified); } catch (ServletParseException e) { throw new IllegalArgumentException("couldn't parse the outbound interface " + outboundInterface, e); } } this.callerFromTag = ((MessageExt)request.getMessage()).getFromHeader().getTag(); this.previousNode = extractPreviousNodeFromRequest(request); putTransaction(originalRequest); } // https://code.google.com/p/sipservlets/issues/detail?id=238
final String fromTag = from.getTag();
handlerServlet, originalCallId, fromHeader.getTag()); final Request request = ((Request)sipServletRequest.getMessage()); sipServletRequest.getSipSession().setCseq(((CSeqHeader)request.getHeader(CSeqHeader.NAME)).getSeqNumber());
if(!((MessageExt)request.getMessage()).getFromHeader().getTag().toString().equals(proxy.getCallerFromTag())) {
/** * create a sip dialog with a response ( no tx) */ public SIPDialog(SipProviderImpl sipProvider, SIPResponse sipResponse) { this(sipProvider); this.sipStack = (SIPTransactionStack) sipProvider.getSipStack(); this.setLastResponse(null, sipResponse); this.localSequenceNumber = sipResponse.getCSeq().getSeqNumber(); this.originalLocalSequenceNumber = localSequenceNumber; this.localParty = sipResponse.getFrom().getAddress(); this.remoteParty = sipResponse.getTo().getAddress(); this.method = sipResponse.getCSeq().getMethod(); this.callIdHeader = sipResponse.getCallId(); this.serverTransactionFlag = false; this.setLocalTag(sipResponse.getFrom().getTag()); this.setRemoteTag(sipResponse.getTo().getTag()); if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) { logger.logDebug("Creating a dialog : " + this); logger.logStackTrace(); } this.isBackToBackUserAgent = sipStack.isBackToBackUserAgent; addEventListener(sipStack); releaseReferencesStrategy = sipStack.getReleaseReferencesStrategy(); }
String originalFrom = ((SIPRequest) this.transactionChannel .getRequest()).getFromTag(); if (originalFrom == null ^ sipResponse.getFrom().getTag() == null) { if (logger.isLoggingEnabled(LogLevels.TRACE_DEBUG)) logger.logDebug( .getTag())) { if (logger.isLoggingEnabled(LogLevels.TRACE_DEBUG)) logger.logDebug( if (SIPTransactionStack.isDialogCreated(method) && sipResponse.getStatusCode() != 100 && sipResponse.getFrom().getTag() != null && sipResponse.getTo().getTag() != null && sipDialog == null) {