[Home]

Summary:ASTERISK-21141: RPID not parsed correctly if display-name is *(token LWS)
Reporter:Walter Doekes (wdoekes)Labels:
Date Opened:2013-02-20 04:27:40.000-0600Date Closed:2013-02-26 13:38:44.000-0600
Priority:TrivialRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:1.8.20.1 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) issueA21141_rpid_parse_token_name_too.patch
Description:Quick ABNF refresher:

{noformat}
[http://tools.ietf.org/id/draft-ietf-sip-privacy-04.txt]

Remote-Party-ID    = "Remote-Party-ID" HCOLON rpid *(COMMA rpid)
rpid               =  [display-name] LAQUOT addr-spec RAQUOT *(SEMI rpi-token)

[http://www.ietf.org/rfc/rfc3261.txt]

display-name     =  *(token LWS)/ quoted-string
LWS              = ((( mandatory space "linear whitepace" )))
token            =  1*(alphanum / "-" / "." / "!" / "%" / "*"
                               / "_" / "+" / "`" / "'" / "~" )

// name-addr     =  [ display-name ] LAQUOT addr-spec RAQUOT
// addr-spec     =  SIP-URI / SIPS-URI / absoluteURI
// quoted-string =  SWS DQUOTE *(qdtext / quoted-pair ) DQUOTE
// SWS           = ((( optional space "separator whitespace" )))
{noformat}

{{chan_sip.c get_rpid()}} only parses the {{quoted-string}} form, not the {{*(token LWS)}} form.

I've done a quick fix to allow {{*(token LWS)}} (and allowing a name without trailing LWS too).

It's would probably be better to rewrite the thing and use proper {{reqresp_parser.c}} functions, but chan_gulp is on the way and I didn't want to unintentionally break things for somebody by changing around too much.

Regards,
Walter
Comments:By: Walter Doekes (wdoekes) 2013-02-26 13:38:44.116-0600

r382107 closes issue ASTERISK-21141