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=781c13d...
Using it results in better and RFC compliant matching :-)
Cheers, Daniel