Sebastian Torf
2005-Jul-18 12:53 UTC
[Asterisk-Users] Restricting outgoing calls by extension / Multiple providers
The situation is that I want to have certain extensions that can only call nationwide and others that can make international calls (with a different provider). I suppose, you could also see this as a scenario that could involve multiple internal extensions that get matched to specific outbound trunks. I have tried to find appropriate commands in the Asterisk documentation, but could find nothing so far that would help me to find an answer for this problem. Could one potential solution involve the following? (not sure if this is the correct way to do it): exten => _9XXXXXXXXXX,1,Goto(catchallvoip|BYEXTENSION|2)exten => _9XXXXXXXXXX,1,Goto(thisEXTdialsadiffplan|304|1)...where [catchallvoip] and [thisEXTdialsadiffplan] are defined trunks for outbound calling. The above is not meant to be specific to international calling, but instead uses one of two defined trunks for nationwide calling according to the extension that initiates the call. The priority '1' for the extension-specific outbound plan makes sure that the restricted EXTs are checked first, if the EXT that tries to initiate the call is not part of those listed, then the international call proceeds using the 'catchallvoip' trunk. Does this sound reasonable or can the Goto cmd not be used to switch contexts for outbound calling rules by extensions?Thanks in advance for any insights!-Sebastian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050718/e33b69e1/attachment.htm
Waldo Rubinstein
2005-Jul-18 13:12 UTC
[Asterisk-Users] Restricting outgoing calls by extension / Multiple providers
You could assign in your sip.conf or iax.conf different contexts for such extensions, and then restrict one context to nationwide access and the other with international access in your extensions.conf. - Waldo On Jul 18, 2005, at 3:53 PM, Sebastian Torf wrote:> The situation is that I want to have certain extensions that can > only call nationwide and others that can make international calls > (with a different provider). I suppose, you could also see this as > a scenario that could involve multiple internal extensions that get > matched to specific outbound trunks. > > I have tried to find appropriate commands in the Asterisk > documentation, but could find nothing so far that would help me to > find an answer for this problem. Could one potential solution > involve the following? (not sure if this is the correct way to do it): > > exten => _9XXXXXXXXXX,1,Goto(catchallvoip|BYEXTENSION|2) > exten => _9XXXXXXXXXX,1,Goto(thisEXTdialsadiffplan|304|1) > > ...where [catchallvoip] and [thisEXTdialsadiffplan] are defined > trunks for outbound calling. The above is not meant to be specific > to international calling, but instead uses one of two defined > trunks for nationwide calling according to the extension that > initiates the call. The priority '1' for the extension-specific > outbound plan makes sure that the restricted EXTs are checked > first, if the EXT that tries to initiate the call is not part of > those listed, then the international call proceeds using the > 'catchallvoip' trunk. Does this sound reasonable or can the Goto > cmd not be used to switch contexts for outbound calling rules by > extensions? > > Thanks in advance for any insights! > -Sebastian > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050718/24451bc8/attachment.htm
Mark Edwards
2005-Jul-19 01:48 UTC
[Asterisk-Users] Restricting outgoing calls by extension / Multiple providers
Sebastian, I think you should investigate using gotoif with the regex expression inspecting the incoming ${CALLERIDNUM} this should route you to one of two contexts that contain: [nationwideonly] include => nationwidecalls [nationwideandinternational] include => nationwidecalls include => internationalcalls If this doesn't get you started, give me a shout offline. cheers, Mark On 7/19/05, Sebastian Torf <storf@torfnet.com> wrote:> > The situation is that I want to have certain extensions that can only call > nationwide and others that can make international calls (with a different > provider). I suppose, you could also see this as a scenario that could > involve multiple internal extensions that get matched to specific outbound > trunks. > I have tried to find appropriate commands in the Asterisk documentation, > but could find nothing so far that would help me to find an answer for this > problem. Could one potential solution involve the following? (not sure if > this is the correct way to do it): > > exten => _9XXXXXXXXXX,1,Goto(catchallvoip|BYEXTENSION|2) > > exten => _9XXXXXXXXXX,1,Goto(thisEXTdialsadiffplan|304|1) > > > > ...where [catchallvoip] and [thisEXTdialsadiffplan] are defined trunks for outbound calling. The above is not meant to be specific to international calling, but instead uses one of two defined trunks for nationwide calling according to the extension that initiates the call. The priority '1' for the extension-specific outbound plan makes sure that the restricted EXTs are checked first, if the EXT that tries to initiate the call is not part of those listed, then the international call proceeds using the 'catchallvoip' trunk. Does this sound reasonable or can the Goto cmd not be used to switch contexts for outbound calling rules by extensions? > > > > Thanks in advance for any insights! > > -Sebastian > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >-- regards, Mark P. Edwards FWD: 667917 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050719/ba371e64/attachment.htm