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

SourceForge.net noreply at sourceforge.net
Mon May 29 10:40:35 CEST 2006

Bugs item #1495153, was opened at 2006-05-25 23:24
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 

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: Open
Resolution: Accepted
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 SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bK4475f9dc-7959-8444
Call-Id: CI_830_1000801004 at 331000801004_22
From: sip:1000801004 at;xxx
To: sip:1000801004 at
Max-Forwards: 70
Contact: <sip:1001 at>
Subscription-State: active
Content-Length: 0

The From header in this format is not parsed:
From: sip:1000801004 at;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;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

Logged In: YES 

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: 

More information about the Devel mailing list