Re: Response overrides local tag?

"M. Ranganathan" <[email protected]>
Newsgroups gmane.comp.voip.nist-sip
Message-ID <[email protected]>
Kalman,

What you are doing seems to be appropriate. You should let the stack 
assign the To tag for the Refer. The REFER should be created after the 
ACK is received (or after the OK is sent at any rate). The From and  To 
tag  of the Refer should match the From and To of the  OK/ACK.  If you 
let the stack manage your tag assignments, this will be the case. If 
this is the case, the  202 Accepted should have the same From/To tags as 
the ACK and you should not have any problems.

 Perhaps the REFER is being created before the OK is sent out when the 
Dialog is still in the early state or perhaps you are using message 
factory to create the Request? Can you check on that? However, I agree 
that the stack should do more to help with tag management here. Are you 
using Dialog.sendRequest(transaction) to actually send the request out? 
If so, I can assign the Refer To tags when the Refer is actually sent 
out rather than rely upon the applicatoin to do the right thing  prior 
to sending the request(i.e. I can override whatever tag the application 
assigns in this case). I will make this change and commit to the 
repository soon.

Regards,

Ranga


Kalman Lau wrote:

> For the following sequence...
>
> Caller        App
> ------        ---
>   |            |
>   | INVITE     |
>   +----------->|
>   |            |
>   |     Trying |
>   |<-----------+
>   |    Ringing |
>   |<-----------+
>   |         OK |
>   |<-----------+
>   |            |
>   | ACK        |
>   +----------->|
>   |            |
>   |      REFER |
>   |<-----------+
>   |            |
>   | Accepted   |
>   +----------->|
>   | NOTIFY     |
>   +----------->|
>   |            |
>
> I used the Dialog generated from the initial INVITE to send the REFER 
> request.   Was this appropriate?  If so, I am having the following 
> problem...
>
> The SIPClientTransaction was woken up to process the 202-Accepted 
> response, it proceeds to trigger the SIPDialog to update its local tag 
> as follows:
>
> +-> UDPMessageChannel.run() line: 452
>   +-> SIPClientTransaction.processResponse(SIPResponse, 
> MessageChannel) line: 1252
>     +-> SIPClientTransaction.processResponse(SIPResponse, 
> MessageChannel, SIPDialog) line: 521
>       +-> SIPDialog.setLastResponse(SIPTransaction, SIPResponse) line: 
> 2244
>         +-> SIPDialog.setLocalTag(String) line: 1302
>
> (Note:  line numbers from JAIN_SIP_1_2 as of last week...)
>
> But being a server dialog, SIPDialog.setLastResponse() sets the local 
> tag using the response's TO header tag, thus overriding what appears 
> to be its original, valid local tag.
>
> Subsequently, when the app attempts to respond to the NOTIFY with a 
> 200-OK ( using the NOTIFY request's transaction), 
> SIPServerTransaction.sendResponse(Response) line 1252 throws a 
> SipException with message "Response tags dont match with Dialog tags".
>
> Is the noted issue about the local tag a bug?  Or am I misusing 
> something else?
>
> Kalman
>
>------------------------------------------------------------------------
>
>_______________________________________________
>nist-sip mailing list
>[email protected]
>http://www-x.antd.nist.gov/mailman/listinfo/nist-sip
>  
>


-- 
M. Ranganathan 

Advanced Networking Technologies Division,
National Institute of Standards and Technology (NIST),
100 Bureau Drive, Stop 8920, Gaithersburg, MD 20899. 
tel:301 975 3664 , fax:301 590 0932 http://w3.antd.nist.gov/
Advanced Networking Technologies For the People!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.