[asterisk-users] Setting up an outgoing trunk group

Geoff Lane geoff at gjctech.co.uk
Tue Jan 20 11:30:41 CST 2009


Hi All,

I'm confused! My Asterisk system has a Zap trunk and three SIP trunks.
I'd like to configure the dialplan to route via the first trunk in a
list and if that's not available or it's busy, fall over to the
second, then to the third, etc.

AIUI Dial(Zap/1&SIP/out1&SIP/out2/${EXTEN}) rings all the trunks in
the list and bridges to the first to answer. Unfortunately, that's not
what I want, which is (in pseudocode):
 if Zap/1 is available then
    Dial(Zap/1/${EXTEN})
 elseif SIP/out1 is available then
    Dial(SIP/out1/${EXTEN})
 else
    Dial(SIP/out2/${EXTEN})
 end if

Also, to make it easier to reconfigure quickly, I've got a variable
defined in [globals] thus:

MainOutbound=Zap/1&SIP/out1&SIP/out2

so the Dial statement above would be written in the dialplan thus:

Dial(${MainOutbound}/${EXTEN})

So if I can't find the syntax to get the Dial application to do what I
want I guess I'd need to use a dialplan function or AGI.

Can anyone help?

TIA,

-- 
Geoff




More information about the asterisk-users mailing list