[asterisk-dev] [Code Review] SIP: peer matching by callbackextension

Russell Bryant russell at digium.com
Wed Oct 21 09:26:18 CDT 2009



> On 2009-10-09 06:18:23, Nick_Lewis wrote:
> > I cannot think for the life of me why this config option would ever be left off. There will no doubt be loads of people reporting callback extension matching problems who will have to be told to enable matching in the config. Eventually the asterisk team will get sick of having to inform this never ending stream of people of the config option and will flip or remove it. However if having matching as a disabled option enables a consensus to be reached then I am delighted

Yeah, it's really just about providing another knob of control while not changing the default behavior that has existed for quote a while.  I'm good with this approach.


- Russell


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


On 2009-10-08 16:39:29, David Vossel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/344/
> -----------------------------------------------------------
> 
> (Updated 2009-10-08 16:39:29)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> If there are a number of peers with different callbackextension parameters and the same host address.  The first peer found matching the address is used regardless if that peer's callbackextension matches the incoming extension or not.
> 
> Now, to better match peers with incoming calls, if an incoming call's address can match multiple peers by address, we check each of those peer's callbackextension against the incoming extension for the best possible match.
> 
> It is possible that my implementation may be too expensive and only serve to address a minor edge case in the usage of chan_sip.  I do not fully understand the impact my changes may have upon performance when a large number of peers are present.  This patch assumes the new parse_uri() change has been made.
> 
> -------------------------------------------
> 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 trunk1
> --------------------------------------------
> 
> 
> This addresses bug 14340.
>     https://issues.asterisk.org/view.php?id=14340
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_sip.c 222947 
>   /trunk/configs/sip.conf.sample 222883 
> 
> Diff: https://reviewboard.asterisk.org/r/344/diff
> 
> 
> Testing
> -------
> 
> Tested multiple peers with the same address containing different callbackextensions. Verified the correct peers were matched with incoming calls.
> 
> 
> Thanks,
> 
> David
> 
>




More information about the asterisk-dev mailing list