[SR-Users] max_contacts

Daniel-Constantin Mierla miconda at gmail.com
Tue Sep 13 17:37:32 CEST 2011



On 9/13/11 5:25 PM, Olle E. Johansson wrote:
> 13 sep 2011 kl. 17:21 skrev Daniel-Constantin Mierla:
>
>>   if($var(contact)==$(ulc(reg=>addr)[$var(i)]))
> Is this a reliable way to compare URI's in Kamailio? Didn't someone implement a function that did this in an improved way?
works in most of the cases (since we all in SIP use e164-formatted 
usernames :-D and don't bother much with other transports than UDP) -- 
it is string case insensitive comparison...

But you are right, someone implemented at some point cmp_uri() which is 
available in siputils module:

http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commit;h=781c13d4a6f8283671a45ed43e83ebf3d9266344

Using it results in better and RFC compliant matching :-)

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-users mailing list