[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 23:45:40 CET 2009


El Martes, 24 de Febrero de 2009, Klaus Darilion escribió:

> In you scenario the AoR of the user is sip:user at mydomain.org and SRV
> points to port 5070.
>
> But AFAIK it is not forbidden to use sip:user at mydomain.org:5070 as AOR
> (note: this is different than sip:user at mydomain.org).
>
> And in this case - where there are no SRV records and the port is part
> of the URI - IMO there is a need to specify the port in the From header
> too.

Let's imagine you are right. Now imagine a SIP proxy listening in port 5060 
and Alice registered in two phones but setting their From in a different way:

phone1) From: sip:alice at mydomain.org
phone2) From: sip:alice at mydomain.org:5060

According to SIP URI comparission rules these URI's are NOT equal since if a 
URI contains the port value (even if it has the default 5060 value) the other 
URI must also contain it with same value.

So if the proxy does a test:   if ( $fu == "sip:alice at mydomain.org" )
only phone1's From URI will match it.

But if the proxy *ignores* the port in the From URI (as Table 1 suggests) then 
both From's will match the "if".


-- 
Iñaki Baz Castillo



More information about the Devel mailing list