[asterisk-dev] Issue with Parsing Contact Header without Brackets and with additional HeaderParameters seperated with semicolon

George Joseph gjoseph at digium.com
Wed Jun 7 19:12:20 CDT 2017


On Wed, Jun 7, 2017 at 5:04 PM, bala murugan <fightwithme at gmail.com> wrote:

> RFC3261 isn't exactly clear on this.  Section 20.10 implies that the
> brackets are optional if a display name isn't specified but the ABNF
> specified down in section 25.1 implies that they are required always
>
> [Bala] I can see section 20.10 mentioned as optional , but in  ABNF
> section 25.1 i couldnt find it mentioned required always
> please advise .
>

Actually I'm going to take back the "required always" bit.
Here's the ABNF:

Contact        =  ("Contact" / "m" ) HCOLON
                  ( STAR / (contact-param *(COMMA contact-param)))
contact-param  =  (name-addr / addr-spec) *(SEMI contact-params)
name-addr      =  [ display-name ] LAQUOT addr-spec RAQUOT
addr-spec      =  SIP-URI / SIPS-URI / absoluteURI
display-name   =  *(token LWS)/ quoted-string

After re-readng I realized that "contact-param" can be EITHER  a
"name-addr" which includes the display name and DOES require the brackets
OR an "addr-spec" which doesn't include the display name and does NOT
require the brackets.

So.  It's a bug.  Go ahead and file an issue at
https://issues.asterisk.org



> btw i am using chan_sip
>
>
> Ok.  We'll probably have to fix this in pjproject as well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20170607/a528b7d9/attachment-0001.html>


More information about the asterisk-dev mailing list