Error parsing Contact like user@domain@x.x.x.x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 2, 2009 at 11:46 PM, Alexei Kuznetsov <eofster at gmail.com> wrote:

> Hi,
>
> Some SIP phones produce Contact like "user at domain@x.x.x.x". pjsip fails to
> parse such headers:
>
> 17:24:24.363 sip_transport.  Error processing 800 bytes packet from UDP
> 10.0.0.1:5060 : PJSIP syntax error exception when parsing '' header on
> line 11 col 36:
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 10.0.0.24:55187;rport=55187;branch=111
> From: "John Smith" <sip:john@xxxxxxxxxxx <sip%3Ajohn at example.com>>;tag=222
> To: "John Smith" <sip:john at example.com <sip%3Ajohn at example.com>>;tag=333
> Call-ID: 444
> CSeq: 555 REGISTER
> Expires: 300
> Contact: <sip:john at 10.0.0.24:55187>;expires=300
> Contact: <sip:john at 10.0.0.24:55175>;expires=139
> Contact: <sip:john at 10.0.0.24:55134>;expires=4
> Contact: <sip:john at example.com <sip%3Ajohn at example.com>@10.0.0.41:5070
> >;q=0.90;expires=31
>
>
That's not valid according to the spec. Character "@" is not allowed in the
user part of URI, so it should have been escaped. FYI

SIP-URI          =  "sip:" [ userinfo ] hostport
                    uri-parameters [ headers ]
userinfo         =  ( user / telephone-subscriber ) [ ":" password ] "@"
user             =  1*( unreserved / escaped / user-unreserved )
user-unreserved  =  "&" / "=" / "+" / "$" / "," / ";" / "?" / "/"
unreserved       =  alphanum / mark
mark             =  "-" / "_" / "." / "!" / "~" / "*" / "'"
                     / "(" / ")"

cheers
 Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090403/e9984854/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux