Re: getNewClientTransaction - Transaction already exists!
"Miguel Freitas" <[email protected]> Fri, 19 Jan 2007 11:32:03 +0000
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <[email protected]> |
I think that my confusion was due to bad sip message flux examples (tech-invite). By RFC3261, the Via branch ID must be unique for each new client transaction. So I will have to change the logic in the UA to remove the via's branch ID each time it sends a request based in a previous SIP message. Please correct me if I'm wrong. Miguel Freitas On 1/18/07, Miguel Freitas <[email protected]> wrote: > > > Hi all. > > I'm making the port of the SIP-Communicator UA (old version) for the most > recent version of JAIN-SIP but I'm facing several problems. > The one that I'm stuck now occurs when I try to respond with another > Register request to the 401 Unauthorized response when I try to register the > UA. > > In the UA I have something like this: > ClientTransaction retryTran = sipProvider.getNewClientTransaction > (request); > > It worked fine with an older JAIN-SIP. > But now I see that SipProviderImpl.getNewClientTransaction (Request) has > been totally re-written and I'm getting the Exception > javax.sip.TransactionUnavailableException: Transaction already exists! > > This is the top Via in the Request that I'm trying to send: > getTopmostVia() = Via: SIP/2.0/UDP 10.112.64.231:5060 > ;branch=z9hG4bK63e17a0c6cf77b3b953c22feb75e3db5 > > The branch ID is equal to the branch ID sent in the first Register > request. > So I must be getting this exception because the last condition fails on > the IF clause: > > SipProviderImpl.getNewClientTransaction(Request) > (...) > if (sipRequest.getTopmostVia().getBranch() != null && > sipRequest.getTopmostVia().getBranch().startsWith( > SIPConstants.BRANCH_MAGIC_COOKIE ) && > sipStack.findTransaction((SIPRequest)request, false) != null) > { > throw new TransactionUnavailableException("Transaction already > exists!"); > } > (...) > > My question is: do I have to explicity terminate the previous Client > Transaction? If so, how can I do that? > > > Regards, > Miguel Freitas > > -- > - - - - - - - - > - Telecommunications Institute - > - Instituto de Telecomunicacoes - > - Aveiro, Portugal - > - www.it.pt - > - - - - - - - - _______________________________________________ nist-sip mailing list [email protected] http://www-x.antd.nist.gov/mailman/listinfo/nist-sip