How do I force dial a particular trunk/provider?

Here is my outbound trunk & route(s) setup:

  1. “forcedoutbound”, if any of the numbers listed in this outbound call route is dialed “Callcentric” is used.

  2. “voipdiscount” any number that is dialed in this outbound call route that is not in the forcedoutbound route is dialed through Voipdiscount (most of my international calls are forced through Voipdiscount (

My question is, if call quality is not so hot through voipdiscount during a particular call, and I hang up and decide to call the party back, is there a call route that I can set up that if I press say “9” first and then the regular number that by pressing “9” first forces asterisk to use the “callcentric” trunk for that call instead of voipdiscount. In other words, I want a controlled way to force dial using a particular trunk using a keypad option.

If you have 10 digit dial use something like this

exten => _9XXXXXXXXXX,1,Dial(SIP/${EXTEN:1}@voipdiscount,60,Ttm)

With the above you say ¨if !I press 9 and 10 digit after (_9XXXXXXXXX), I will ignore 9 ( EXTEN:1 ) and I will call using the voipdiscount context .

I hope I helped .

Is there a way that this could be setup using an outbound route?

I don’t understand . What do you mean . This is an outbound route .

What I’m asking is if I can go into “Amp” and then into “outbound routing” and add a route that does the same task without having to try to manipulate my extension.conf file.

You have to manipulate your extensions.conf file to specialize your dialing preferences. There’s no way around that.

There are many ways to force calls to take certain routes. For example you could simply list destinations like this:

exten => _916175551234,1,Dial(SIP/${EXTEN:1}@callcentric,60,Ttm)
exten => _916175551111,1,Dial(SIP/${EXTEN:1}@callcentric,60,Ttm)
exten => _916175553333,1,Dial(SIP/${EXTEN:1}@callcentric,60,Ttm)
exten => _9XXXXXXXXXX,1,Dial(SIP/${EXTEN:1}@voipdiscount,60,Ttm)

In this way, the first three listed numbers are going to be forced to use callcentric, and all other calls use voipdiscount.

Alternatively, you could break up the call types into different contexts, and list them in the order you want them to be checked.

include => callcentric
include => voipdiscount

For more help with dial plans, study this: … sions.conf