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

David Vossel dvossel at digium.com
Wed Jul 7 10:47:57 CDT 2010



> On 2009-11-17 05:02:04, Nick Lewis wrote:
> > Is there any chance that discussion of this code fix can be decoupled from system architecture discussions over "authentication" "authorization" and "payment"? There is agreement that correct matching of an incoming call to a device specification is distinct from the system architecture concerns.


This issue has been stagnant for sometime now, but I believe this still needs to be addressed, preferably before 1.8 is branched.

The compromise here would be to have this new matching become an option that can be turned on and off, but I don't see why that is necessary.  To me the callbackextension option should be the option to turn this on and off.  If a peer definition sets the callbackextension option, then why would they not want to match that peer to that extension?  Having an option to explicitly enable the matching everyone should expect seems cumbersome, and I don't understand the point.

>From sip.conf
;callbackextension=123      ; Register with this server and require calls coming back to this extesion

Why would we want to register with the server and have the calls come back and match a different peer than the one that registered?  We can talk about architecture changes and what is technically right to do, but eventually it comes down to what people expect.  If people expect one thing but Asterisk does another thing then that is a problem.  This fix is simple and I'm recommending we re-evaluate this change and get it committed.


- David


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


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