It appears that for non-UDP transports, one needs to use an ephemeral  
source port number for the socket (even if reuseaddr socket option is  
used).  Like for UDP, I first tried always using 5060 (or config  
port) as source port for TCP/TLS.   No big deal, I can use ephemeral  
source port.

Now for the question:

In the Via and Contact headers, for UDP I would always put the  
configured source port of my UDP socket.  For TCP/TLS, should I do  
the same of putting my ephemeral source port number of the current  
socket that I am sending the request on?

My guess is that people will say I should put the socket source port  
in the Via header, and the Contact header should have the port that  
I'm listening on for new TCP/TLS connection requests.   However, I  
currently don't have a listening socket where I'm waiting for new  
incoming requests, as I expect all communication to use the same  
socket.  (We are a test product that tries to break SIP stacks.)

While I'm on a roll here.....  what is you thought about using source  
ports in the From: header.  (I know the RFC strongly recommends  
against it.  I'm currently putting the same thing in From and Contact  
header, and all products I've tested with (a fair number) don't care.)

Regards,
-Russ
_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to