[asterisk-users] Re: How to forward a call to an outside line

Greg Broiles gbroiles at gmail.com
Thu Aug 3 18:37:16 MST 2006


On 8/3/06, Dan Casey <dcasey at debtresolve.com> wrote:
>
>  I actually have it semi-working.  My trunks were set up improperly.
>  Now i can do it, but only if i specify a specific zap channel.
>
>  exten => 299,1,Macro(dialout,2,1914304nnnn,,)
>
>  the 2 takes me to zap 1. I tried to replace that with "s" but no luck.. any
> idea how to do this where it will pick any available trunk?

Perhaps someone who uses Zap frequently has a better idea, but I would
be inclined to approach this as a case where you'd want to try
multiple devices in serial. This is an (admittedly ugly) example of my
tollfree dialing macro, which tries several providers in the event
that one is unable to complete the call for whatever reason.

[macro-tollfree]
exten => s,1,dial(${TRXTEL}/${ARG1}-noads,90,tr)
exten => s,2,dial(${NUFONE}/${ARG1},90,tr)
exten => s,3,dial(${TELIAX}/${ARG1},90,tr)
exten => s,4,dial(${TRUNK3}/${ARG1},90,tr)
exten => s,5,Congestion

Also - in case it's useful - this is a bit of my dialplan that I used
to ring a local extension, then call an outside answering service if
the local extension doesn't answer -

exten => 800936xxxx,1,Dial(${RON},20,r)
exten => 800936xxxx,2,Dial(${TRUNK}/${ANSWERINGSERVICE},60,r)

.. my application used IAX, not Zap, for the outgoing call, but it
seems like the behavior should be similar.

-- 
Greg Broiles, JD, LLM Tax, EA
gbroiles at gmail.com (Lists only. Not for confidential communications.)
Law Office of Gregory A. Broiles
San Jose, CA



More information about the asterisk-users mailing list