Creating SIP trunk grp

Hello

I want to create a grp to send my outgoing calls to use whichever SIP trunk is available. I mucked around with “outbound-allroutes” but am not sure if this is a standard variable I can call in Asterisk. Below is my extensions_custom.conf

This works fine sending outgoing calls to my SIP trunk SIM1.

[from-custom]
exten => _X.,1,Dial(SIP/SIM1/${EXTEN})
exten => _X.,2,Busy
exten => _X.,3,Hangup

I have another 12 SIP trunks named SIM2, SIM3 etc

I want to create a “GROUP” and then call all SIP trunks in the above extension. Sounds easy but have had no luck with google.

[from-custom]
exten => _X.,1,Dial(SIP/GROUP/${EXTEN})
exten => _X.,2,Busy
exten => _X.,3,Hangup

Thanks for any assistance.

Jeff

Why not just list the trunks in the order you want them used in the Web Gui. Look at your outbound route and list the trunks in that screen. Unless I just plain don’t understand your question, that will do it.

Yes that works fine if I use the GIU interface. But if I am creating a dial plan via the extensions_custom.conf file how do I define these outbound routes in the code?

Thanks

I suspect it is because none of us can figure out WHY you’d want to do this the hard way when the FreePBX interface can probably do what you want (even if you don’t know that yet). If you want to write dial plans in raw Asterisk then just use Asterisk, but if you want to use FreePBX then you should probably do things via the GUI unless for some reason that is absolutely impossible. In any case, probably everyone who is likely to read this would do what you’re trying to do from within FreePBX.

As for “outbound-allroutes”, that’s NOT a standard variable in Asterisk but it is a standard context in FreePBX (at least it has been for as long as I can remember).