[Devel] [ openser-Bugs-1495153 ] ERROR:parse_from_header

SourceForge.net noreply at sourceforge.net
Mon May 29 12:36:04 CEST 2006


Bugs item #1495153, was opened at 2006-05-25 23:24
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1495153&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver devel
>Status: Closed
>Resolution: Fixed
Priority: 7
Submitted By: Ovidiu Sas (osas)
Assigned to: Bogdan (bogdan_iancu)
Summary: ERROR:parse_from_header

Initial Comment:
The following NOTIFY is rejected because of the format
of the From header:

NOTIFY sip:1000801004 at 10.10.10.10 SIP/2.0
Via: SIP/2.0/UDP
213.56.166.211:5060;branch=z9hG4bK4475f9dc-7959-8444
Call-Id: CI_830_1000801004 at 331000801004_22
From: sip:1000801004 at 10.10.10.10;xxx
To: sip:1000801004 at 10.10.10.10
Max-Forwards: 70
CSeq: 6 NOTIFY
Contact: <sip:1001 at 10.10.10.10:5060>
Subscription-State: active
Content-Length: 0


The From header in this format is not parsed:
From: sip:1000801004 at 10.10.10.10;xxx

ERROR: parse_to: invalid To -  unexpected end of header
in state 22
ERROR:parse_from_header: bad from header
xl_get_from_attr: ERROR cannot parse FROM header


The From header in this format is parsed:
From: sip:1000801004 at 10.10.10.10;xxx=yy

>From the rfc3261:

>From        =  ( "From" / "f" ) HCOLON from-spec
from-spec   =  ( name-addr / addr-spec )
               *( SEMI from-param )
addr-spec      =  SIP-URI / SIPS-URI / absoluteURI
SIP-URI          =  "sip:" [ userinfo ] hostport
                    uri-parameters [ headers ]
uri-parameters    =  *( ";" uri-parameter)
uri-parameter     =  transport-param / user-param
                     / method-param / ttl-param
                     / maddr-param / lr-param
                     / other-param
other-param       =  pname [ "=" pvalue ]


The "=" pvalue is optional and therefore both xxx and
xxx=yy params shall be accepted.

----------------------------------------------------------------------

Comment By: Bogdan (bogdan_iancu)
Date: 2006-05-29 11:40

Message:
Logged In: YES 
user_id=1275325

Actually xxxx is not an URI param, but a header param.
According to 20.20 (FROM hdr definition), if brackets are
missing, the parameter are considered hdr params and not URI.

For the FROM hdr params:
from-param  =  tag-param / generic-param
tag-param   =  "tag" EQUAL token
generic-param  =  token [ EQUAL gen-value ]

Even if it's a different story, the bug is still valid. 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1495153&group_id=139143



More information about the Devel mailing list