[Kamailio-Devel] More about URI port and URI parameters when comparing SIP URI's

Klaus Darilion klaus.mailinglists at pernau.at
Wed Feb 25 09:32:09 CET 2009



Iñaki Baz Castillo schrieb:
> 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 think this is up to the local policy of the SIP proxy. The SIP proxy 
may treat sip:alice at mydomain.org:5060 as an alias for 
sip:alice at mydomain.org. But it can also treat it different.

This is the same as casesensitive usernames: The standard says that the 
username is case sensitive, but the local policy of a domain of course 
can define that usernames are case insensitive.

regards
klaus



More information about the Devel mailing list