Hi. I am implementing a SIP chat client for a mobile phone. In this phone a small SIP stack will reside. But now I have found some issues I don't know how to handle when developing the SIP stack. When I create the SIP message, I set the request URI to the address where to send the message, that is, our redirect server. The final destination is in the to-header. But now I have read that the request uri and the to header should most often be the same (though not for REGISTERs). How does this work? My current implementation works like this:
When createing the message, the next actuall destination is set in the request uri. The final destination is set in the to-header. So the SIP stack works in the manner that it reads the request URI and then writes it to that network address. We then get a reply back from the redirect server that the contact has moved (it's a redirect server...) with the new address in the contact field. The we write a new request uri and sends it to the stack again. The stack writes it to the network using the new request uri as destination address. But if the request uri and to-header should be the same, where do I specify the actuall address for sending it? The to-header will contain the final destination, so the request uri will contain the same. How do the SIP stack then determine to what real network address to send it to? I can't put it in the sipstack as "always send messages to this address" since when I get a "moved" response I have to send it to another address. How do I tell this to the SIP stack? Regards, Magnus Edev�g _______________________________________________ Sip-implementors mailing list [EMAIL PROTECTED] http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
