[asterisk-bugs] [Asterisk 0014340]: [patch] Calls are not matched to correct peer when using callbackextension parameter

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Oct 5 03:38:00 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=14340 
====================================================================== 
Reported By:                Nick_Lewis
Assigned To:                dvossel
====================================================================== 
Project:                    Asterisk
Issue ID:                   14340
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-01-27 04:03 CST
Last Modified:              2009-10-05 03:38 CDT
====================================================================== 
Summary:                    [patch] Calls are not matched to correct peer when
using callbackextension parameter
Description: 
If there are a number of peers with different callbackextension parameters
the incoming calls are not matched to the right peers

for example with two peers as follows
[trunk1]
host=sip.myitsp.com
callbackextension=9991
...
[trunk2]
host=sip.myitsp.com
callbackextension=9992
...

incoming calls to 9991 and to 9992 are both matched to the peer for 9992
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
duplicate of        0014250 [patch] Incoming calls from registratio...
====================================================================== 

---------------------------------------------------------------------- 
 (0111834) Nick_Lewis (reporter) - 2009-10-05 03:38
 https://issues.asterisk.org/view.php?id=14340#c111834 
---------------------------------------------------------------------- 
I agree that it is infrequent and in no sense a big deal either way but
there are some other advantages doing the tighter search first:
- no need for a peer2 or unrefing
- less code and simpler

In what config is the efficiency the other way round? In all cases that a
callback extension is defined, the best match is one that (i) has both
matching ip address and matching callback extension if it exists or (ii)
has just an ip match if a tight match does not exist. It is not obvious to
me how the most efficient way to find this best match might depend on the
config.

Another query: What is the correct behaviour of
peer_match_callbackextension_cb when peer2->callback is unused. Should it
match any callback? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-10-05 03:38 Nick_Lewis     Note Added: 0111834                          
======================================================================




More information about the asterisk-bugs mailing list