[OpenSIPS-Devel] db_check_to() problem with escaped characters

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Jul 12 13:54:11 CEST 2010


Hi John,

Indeed the report is correct - opensips (when doing string checkings) si 
not un-escaping chars...
And according to RFC3261 SIP grammar, the SIP URI (username) may contain 
escaped chars.....

As the built-in functions cannot do it, you can use the escaping script 
transformations:

if ( $au == $(tU{s.unescape.user}) )

Of course, this is a hack, and the functions operating with SIP URIs 
need to be fixed.

Regards,
Bogdan

John Khvatov wrote:
> Hello!
>
> db_check_to() returns false for this REGISTER request:
>
> REGISTER sip:ss.under.test.com:5060 SIP/2.0
> Via: SIP/2.0/UDP node.under.test.com:5060;branch=z9hG4bKPUA1977294
> Max-Forwards: 70
> Authorization: Digest username="UA11", realm="under.test.com", qop=auth,
> nonce="4c2163fe00000000547e3be7d96e435b0f121f108ccebcdb", opaque="",
> nc=00000001, cnonce="6f54a149", uri="sip:ss.under.test.com:5060",
> response="bacb59fe1a4e9a53f91326a15184e2cd"
> From: UA11 <sip:U%4111 at under.test.com>;tag=11193
> To: UA11 <sip:U%4111 at under.test.com>
> Call-ID: 11193 at six.example.com
> CSeq: 2 REGISTER
> Contact: <sip:U%4111 at node.under.test.com;transport=udp>
> Expires: 3600
> Content-Length: 0
>
> To header contains escaped character, that is not unescaped before
> check. I'm not expert of SIP rfc. Please, check that this is correct
> behaviour.
>
> For more info see original bug report:
> https://bugzilla.redhat.com/show_bug.cgi?id=607141
> debug log:
> http://dev.sgu.ru/pub/opensip-log
>
>   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro




More information about the Devel mailing list