Hi Everyone,

I am trying to implement a process where by people can select their
outbound trunk for calls since VoIP is not always the best option to
place the call with.

The simplest way I can think of solving this is using prefixes, so
someone appends a 0 or 1 and the dialplan puts the call through the
selected trunk, where 0 being voip and 1 being PSTN.

I have figured out how to use a Substring like function to extract the
number out of the dialed extension. My question is how do I make a
decision in the dialplan to dynamically select a trunk for the call?
Is there a SetIf function or an If function by itself?

Or is there a better way of doing this? Thank you for your input.

[outbound-statewide]
exten => _XXXXXXXXX,1,Set(CARRIER=IAX2/nehos)
exten => _XXXXXXXXX,2,SetCDRUserField(${CARRIER})
exten => _XXXXXXXXX,3,Dial(${CARRIER}/${EXTEN:2:8})
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to