[asterisk-bugs] [JIRA] (ASTERISK-21141) RPID not parsed correctly if display-name is *(token LWS)

Walter Doekes (JIRA) noreply at issues.asterisk.org
Wed Feb 20 04:28:18 CST 2013


Walter Doekes created ASTERISK-21141:
----------------------------------------

             Summary: RPID not parsed correctly if display-name is *(token LWS)
                 Key: ASTERISK-21141
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21141
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Channels/chan_sip/Interoperability
    Affects Versions: 1.8.20.1
            Reporter: Walter Doekes
            Severity: Trivial


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]}}.

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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list