Subject: RE: [SIP] Port in Request-URI

From: "Vakil, Mohammad" <[email-masked]>
Date: Thu, 6 Jul 2000 10:38:29 -0400

Yes, Request-URI can have a port number. In fact, whenever port number is
other than 5060, it must be there. That's how proxy will forward the request
based on the domain in Request-URI.

Mohammad Vakil
OutReach Technologies

-----Original Message-----
From: Dvir Oren [mailto:[email-masked]]
Sent: Thursday, July 06, 2000 10:20 AM
To: SIP
Subject: [SIP] Port in Request-URI

I'm not clear whether a Request-URI can or cannot have a port number.
Although I saw somewhere in the RFC that a Request-URI can have a
port, I see no examples of such use.

-- 
Dvir Oren               <[email-masked]>
Lucid VON Ltd.     <http://www.lucidvon.com>
9 Saloniki St.,        Tel-Aviv       Israel
Tel:  +972 3 644 3038  Fax:  +972 3 644 3039

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip

---

From: Jonathan Rosenberg <[email-masked]>
Date: Thu, 06 Jul 2000 11:28:01 -0400

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 [email-masked], and the server for
example.com is listening on 5061. The request URI might look like:

INVITE sip:[email-masked]: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:[email-masked]). 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:[email-masked] 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.

-Jonathan R.

-- 
Jonathan D. Rosenberg                       72 Eagle Rock Ave.
Chief Scientist                             First Floor
dynamicsoft                                 East Hanover, NJ 07936
[email-masked]                     FAX:   (973) 952-5050
http://www.cs.columbia.edu/~jdrosen         PHONE: (732) 741-7244
http://www.dynamicsoft.com