[asterisk-bugs] [Asterisk 0016708]: Introduce function for parsing ABNF name-andor-addr = name-addr / addr-spec

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Jan 29 04:04:49 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16708 
====================================================================== 
Reported By:                Nick_Lewis
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16708
Category:                   Channels/General
Reproducibility:            always
Severity:                   tweak
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
JIRA:                       SWP-811 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-01-26 10:35 CST
Last Modified:              2010-01-29 04:04 CST
====================================================================== 
Summary:                    Introduce function for parsing ABNF name-andor-addr
= name-addr / addr-spec
Description: 
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
====================================================================== 

---------------------------------------------------------------------- 
 (0117363) Nick_Lewis (reporter) - 2010-01-29 04:04
 https://issues.asterisk.org/view.php?id=16708#c117363 
---------------------------------------------------------------------- 
I think that the function check_user_full gets the closest to doing a half
decent attempt at parsing the name-andor-addr abnf structure so as a first
step I will lift the relevant bits from this and drop them into a new
function parse_name_andor_addr using it only for check_user_full. I will
then try to enhance the new function to do a more accurate job of parsing
and ensure that it would be suitable for use in other places where parsing
of the name-andor-addr abnf structure is needed. Finally the use of the
function can be rolled out across chan_sip.c. I will try to get the first
step uploaded here soon but I understand if you need to close the ticket 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-29 04:04 Nick_Lewis     Note Added: 0117363                          
======================================================================




More information about the asterisk-bugs mailing list