[Kamailio-Devel] More about URI port and URI parameters when comparing SIP URI's
Iñaki Baz Castillo
ibc at aliax.net
Tue Feb 24 01:40:37 CET 2009
Hi, I remember a long thread about SIP URI comparisions. We talked about if a
port present in a From/To SIP URI should be matched or not when comparing
that URI with other.
Well, the fact is that port is *not allowed* in From/To headers, as Table 1
states in RFC 3261 (pag 151):
dialog
reg./redir. Contact/
default Req.-URI To From Contact R-R/Route external
user -- o o o o o o
password -- o o o o o o
host -- m m m m m m
port (1) o - - o o o
user-param ip o o o o o o
method INVITE - - - - - o
maddr-param -- o - - o o o
ttl-param 1 o - - o - o
transp.-param (2) o - - o o o
lr-param -- o - - - o o
other-param -- o o o o o o
headers -- - - - o - o
(1): The default port value is transport and scheme dependent. The
default is 5060 for sip: using UDP, TCP, or SCTP. The default is
5061 for sip: using TLS over TCP and sips: over TCP.
(2): The default transport is scheme dependent. For sip:, it is UDP.
For sips:, it is TCP.
Table 1: Use and default values of URI components for SIP header
field values, Request-URI and references
Also, in pag 150 it appears:
Entries marked "m" are mandatory, those
marked "o" are optional, and those marked "-" are not allowed.
Elements processing URIs SHOULD ignore any disallowed components if
they are present.
Under my understanding this means that the following URI's in a From headers
are all equal when comparing them:
From: <sip:user at domain.org:5060;myparam=qwe>;tag=1111
From: <sip:user at domain.org:9999;myparam2=rty>;tag=2222
From: <sip:user at domain.org;myparam3=qweuio;tag=3333
They are equivalent since port must be ignored when comparing URI's in From/To
headers (according to the table above).
--
Iñaki Baz Castillo
More information about the Devel
mailing list