Add routines for parsing SIP URIs consistently.
authorMark Michelson <mmichelson@digium.com>
Fri, 9 Apr 2010 16:04:16 +0000 (16:04 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 9 Apr 2010 16:04:16 +0000 (16:04 +0000)
commit4b8f1c8cacd73dcdfa0cc13b33c0ed12fa67439f
tree22aadabe7400160d5fd2b4522fabdfe2a59d3e68
parentae7b76a1b9bcdb80b2e62ae66b3ec2e6b06ed4cb
Add routines for parsing SIP URIs consistently.

From the original issue report opened by Nick Lewis:
Many sip headers in many sip methods contain the ABNF structure
 name-andor-addr = name-addr / addr-spec
 Examples include the to-header, from-header, contact-header, replyto-header

 At the moment chan_sip.c makes various different attempts to parse this name-andor-addr structure for each header type and for each sip method with sometimes limited degrees of success.

 I recommend that this name-andor-addr structure be parsed by a dedicated function and that it be used irrespective of the specific method or header that contains the name-andor-addr structure

Nick has also included unit tests for verifying these routines as well, so...heck yeah.

(closes issue #16708)
Reported by: Nick_Lewis
Patches:
      reqresp_parser-nameandoraddr2.patch uploaded by Nick Lewis (license 657

Review: https://reviewboard.asterisk.org/r/549

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/sip/include/reqresp_parser.h
channels/sip/include/sip.h
channels/sip/reqresp_parser.c