[Home]

Summary:ASTERISK-15522: [patch] Caller name lost during call redirect
Reporter:nick_lewis (nick_lewis)Labels:
Date Opened:2010-01-26 10:08:19.000-0600Date Closed:2010-03-11 09:33:39.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) issue16706.diff
Description:Unquoted display names are lost during call redirect. The function read_to_parts does not use the get_calleridname function but tries to get the display name directly. It fails to do this for unquoted display names
Comments:By: nick_lewis (nick_lewis) 2010-01-26 10:13:44.000-0600

The function read_to_parts also cannot handle escaped uris

By: David Vossel (dvossel) 2010-02-04 17:49:59.000-0600

I uploaded a patch.  Does it address everything?  In what scenario does this function even get called, how can I test this?



By: nick_lewis (nick_lewis) 2010-02-09 11:32:06.000-0600

It looks good to me (at least as good as the best attempt elsewhere in chan_sip.c to parse a to-header, from-header or contact-header)

I think that the name of the function could be genericized a bit to something like get_name_and_number. The function can be used widely for callerid purposes and some types of DID so it is confusing to have "to" or "redirect" in the title

By: Digium Subversion (svnbot) 2010-02-15 09:45:04.000-0600

Repository: asterisk
Revision: 246627

U   trunk/channels/chan_sip.c
U   trunk/channels/sip/include/reqresp_parser.h
U   trunk/channels/sip/include/sip_utils.h
U   trunk/channels/sip/reqresp_parser.c

------------------------------------------------------------------------
r246627 | dvossel | 2010-02-15 09:45:02 -0600 (Mon, 15 Feb 2010) | 22 lines

chan_sip parse code refactoring plus two new unit tests

Code Refactoring Changes
- read_to_parts() moved to reqresp_parser.c and has been renamed as
 get_name_and_number()
- get_in_brackets() moved to reqresp_parser.c
- find_closing_quotes() added to sip_utils.h
Logic Changes
- get_name_and_number() now uses parse_uri() and get_calleridname()
 for parsing. Before this change only names within quotes were
 found, when names not within quotes are possible.
New Unit Tests
-sip_get_name_and_number_test
-sip_get_in_brackets_test

(closes issue ASTERISK-15522)
Reported by: Nick_Lewis
Patches:
     issue16706.diff uploaded by dvossel (license 671)

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

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=246627

By: Digium Subversion (svnbot) 2010-02-15 09:45:55.000-0600

Repository: asterisk
Revision: 246628

_U  branches/1.6.2/

------------------------------------------------------------------------
r246628 | dvossel | 2010-02-15 09:45:55 -0600 (Mon, 15 Feb 2010) | 28 lines

Blocked revisions 246627 via svnmerge

........
 r246627 | dvossel | 2010-02-15 09:45:02 -0600 (Mon, 15 Feb 2010) | 22 lines
 
 chan_sip parse code refactoring plus two new unit tests
 
 Code Refactoring Changes
 - read_to_parts() moved to reqresp_parser.c and has been renamed as
   get_name_and_number()
 - get_in_brackets() moved to reqresp_parser.c
 - find_closing_quotes() added to sip_utils.h
 Logic Changes
 - get_name_and_number() now uses parse_uri() and get_calleridname()
   for parsing. Before this change only names within quotes were
   found, when names not within quotes are possible.
 New Unit Tests
 -sip_get_name_and_number_test
 -sip_get_in_brackets_test
 
 (closes issue ASTERISK-15522)
 Reported by: Nick_Lewis
 Patches:
       issue16706.diff uploaded by dvossel (license 671)
 
 Review: https://reviewboard.asterisk.org/r/499/
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=246628