Hi,

I am currently working on the TCP transport for the opensipstack 
library.  I have a few doubts on how to properly construct the Contact 
address for outbound INVITEs.  On construction of the INVITE request, 
the UA Core doesn't have an idea about the port the transport would be 
providing to send the request and it would be impossible to guess this 
before the actual request hits the Transport Unit.  Currently, the stack 
populates the Via and Contact URIs with the address of the default 
listener on port 5060.   Upon detection that the request is bound to a 
TCP destination, the transaction would change the top most via address 
with the socket created by the Transport to be sure that responses would 
be sent using the same socket.  However, this approach cannot be used 
for the Contact URI since the contact might be the remote address of a 
request being proxied.  Thus, the Contact address should remain intact 
for proxy transactions and only change it if the request is actually 
originated from the local  UA.  An extra sanity check is needed and see 
if Contact URI == local listener.  This would work but I am in doubt 
that this is the best way to do it.  My goal is to use the socket for 
the entire lifespan of the dialog without having to inject transport 
logic into the core level.   I wonder what's the popular approach to do 
this.  Any advice on how to do this  the right way would be appreciated. 

Thanks!

-----------------------------
Joegen E. Baclor
http://www.opensipstack.org
_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to