(Answer) (Category) SIP FAQ : (Category) SIP Protocol Operation :
Can the request URI include a port number and/or transport parameter?
It can have a port number. But, let me explain when this is needed and when its not.
Lets say I send a request to joe@example.com, and the server for example.com is listening on 5061. The request URI might look like:
INVITE sip:joe@example.com:5061 SIP/2.0
this arrives at example.com. Since the request is for that server, it looks up joe in some database and translates the request URI (for example, to sip:joe@engineering.example.com). It looks up engineering.example.com in DNS, and finds an A record for that machine, forwarding the request to the given IP address. The outgoing request URI looks like:
INVITE sip:joe@engineering.example.com SIP/2.0
Note that in this case, the presence of port 5061 in the request URI sent to example.com didn't make a difference. Thats because the example.com just translated the request URI. Whether it had contained the port number or not would have had no effect on processing.
However, had the request instead been sent to a local outbound proxy instead of example.com, the port number would NEED to be there. Thats because the local outbound proxy won't translate the request URI, it will example it, determine its not for itself, look up the domain in the request URI in DNS, and forward the request there. So, the request URI needs to contain this port so that the local outbound proxy knows to forward it to 5061 as opposed to 5060 at example.com.
So, the rule of thumb is this:
if you send a request to the server listed in the domain of the request URI, URI parameters like port, transport, ttl etc MAY be present but are not needed. If you send a request to a server which is NOT the one identified in the request URI, you MUST include these parameters if they are not the defaults. Always inclduing them, when not default, means you don't need to determine which is the case, and is always the safest bet.
[Append to This Answer]
jdrosen@dynamicsoft.com
2000-Jul-06 11:25am
Previous: (Answer) The BNF for header <put your favorite header here> allows a parameter to appear more than once. What does this mean?
Next: (Answer) Transport in Via
This document is: http://www.cs.columbia.edu/~hgs/sip/faq.cgi?file=62
[Search] [Appearance]
This is a Faq-O-Matic 2.710.
This FAQ administered by Henning Schulzrinne