[asterisk-dev] [Code Review] Introduce function for parsing ABNF structure {name-andor-addr = name-addr / addr-spec} in sip messages

Nick Lewis Nick.Lewis at atltelecom.com
Tue Mar 23 11:24:03 CDT 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/549/
-----------------------------------------------------------

(Updated 2010-03-23 11:24:03.498637)


Review request for Asterisk Developers and David Vossel.


Summary
-------

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, referto-header, referredby-header, and passertedid-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 here introduce a dedicated function for parsing the name-andor-addr ABNF structure that can be used irrespective of the specific method or header that contains the structure

(The function is also suited to parsing the name-addr ABNF structure without the addr-spec option. Examples in chan_sip.c include the recordroute-header, route-header, remotepartyid-header and diversion-header.)


This addresses bug 16708.
    https://issues.asterisk.org/view.php?id=16708


Diffs (updated)
-----

  trunk/channels/sip/include/reqresp_parser.h 249060 
  trunk/channels/sip/include/sip.h 249060 
  trunk/channels/sip/reqresp_parser.c 249060 

Diff: https://reviewboard.asterisk.org/r/549/diff


Testing
-------

Tested using the corresponding unit test function


Thanks,

Nick




More information about the asterisk-dev mailing list