Pekka Pessi wrote: > 2008/9/1 Florian Limberger <[EMAIL PROTECTED]>: >> When using UDP for transportation the sofia-sip stack uses the same >> socket (same src port) for all outgoing logical connections. This is not >> the case with tcp. If I want to do a REGISTER with my proxy/registrar, >> the sip stack creates a new tcp connection (with some arbitrary src >> port) but does not insert this arbitrary port into the contact header. >> Instead, the contact header's port is set to the one of the tcp-server >> socket listening in general at port 5060. Hence, the registrar opens a >> new tcp-connection to my UA. > > And why this is problem? You are behind firewall / nat?
Yes. >> So could someone give me please a hint how to force the REGISTER-socket >> to a port of my choice or how to get the real port into the >> contact-header-line? Or is there any other possibility to have only ONE >> tcp connection to my register with the UA always being the client? > > If you are behind NAT, your proxy/registrar should do the dirty work > because it is not otherwise possible to figure the address that is > visible outside. You can configure Sofia to add "rport" parameter to > Via headers for TCP transport, too, so a friendly proxy can fill that > (and "received" parameter) in the response. Sofia can use "rport" and > "received" to generate a SIP URI correponding to the outbound TCP > connection. You just need NTATAG_CLIENT_RPORT(1), NTATAG_TCP_RPORT(1) > in the nua_create() tags. > Thx. Now, I start with a REGISTER without any contact-uri, wait for the response, get 'rport' and 'received' from the via-header and create a new contact-uri using it for a second register. Fortunately, my registrar is that smart to use the already existing tcp connection. Concerning TLS, a NTATAG_TLS_RPORT would be nice. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel