[Asterisk-Users] Dumb Dialout Question

Ronald Wiplinger ronald at elmit.com
Wed Feb 1 13:43:40 MST 2006


casasterisk at valnet.com wrote:
> I'm still trying to learn some parts of Asterisk, so sorry in advance for the dumb question!
>
> How do I set up an extension to dial out to the PSTN through my ZAP interfaces?  I want the ability to have a ring group that will ring all of the phones in an office and then ring cell phones if nobody answers.  I'm sure this is simple to do but I'm at a loss.
>
> I have tried the following configs in extensions.conf to no avail:
>
> exten => 190,1,Dial(ZAP/8001112222 at default) ; Cell Phone
>
> exten => 190,1,Dial(ZAP/8001112222) ; Cell Phone
>
> exten => 190,1,Dial(SIP/8001112222 at default) ; Cell Phone
>
> exten => 190,1,Dial(ZAP/8001112222) ; Cell Phone
>
> Thank you in advance!
>
>   
I have something like that:

zapata.conf
group=2    for this channel



extensions.conf

in [globals]
PSTN=ZAP/g2

for dialing out:
exten => _9N.,103,Macro(dial-pstn,${EXTEN:1},${LONGTIMEOUT})

and for dialing out I use a macro:

[macro-dial-pstn];
;*******************************************************************************
;     BEGIN - Outbound Dialing macro
;*******************************************************************************
;
;    This macro will dial out on PSTN line 1 first
;    will use PSTN line 2 if line 1 is in use
;
;    Enter with these
;        ARG1 = <number to dial>
;        ARG2 = <timeout value>
;
;    Returns with FOUNDME = DIALSTATUS
;
;   the 9w dials 9 then waits 0.5 seconds for outside dialtone, needed 
for dial 9 system only
;
;
exten => s,1,SetGlobalVar(FOUNDME=ANSWER)
exten => s,2,Dial(${PSTN}/w${ARG1},${ARG2})
exten => s,3,NoOp(${DIALSTATUS})
exten => s,4,Goto(s-${DIALSTATUS},1)
;
;    Return here if busy
;
exten => s,103,NoOp(${DIALSTATUS})
exten => s,104,Goto(s-${DIALSTATUS},1)
;
;
exten => s-BUSY,1,BackGround(the-party-you-are-calling)
exten => s-BUSY,2,BackGround(is-curntly-busy)
exten => s-BUSY,3,SetGlobalVar(FOUNDME=BUSY)
exten => s-BUSY,4,Goto(s-CLEANEXIT,1)
;
;
exten => s-CANCEL,1,BackGround(canceled)
exten => s-CANCEL,2,SetGlobalVar(FOUNDME=CANCEL)
exten => s-CANCEL,3,Goto(s-CLEANEXIT,1)
;
;
exten => s-CHANUNAVAIL,1,BackGround(channel)
exten => s-CHANUNAVAIL,2,BackGround(is-curntly-unavail)
exten => s-CHANUNAVAIL,3,SetGlobalVar(FOUNDME=CHANUNAVAIL)
exten => s-CHANUNAVAIL,4,Goto(s-CLEANEXIT,1)
;
;
exten => s-CONGESTION,1,BackGround(channel)
exten => s-CONGESTION,2,BackGround(is-curntly-unavail)
exten => s-CONGESTION,3,SetGlobalVar(FOUNDME=CHANUNAVAIL)
exten => s-CONGESTION,4,Goto(s-CLEANEXIT,1)
;
;
exten => s-NOANSWER,1,BackGround(nbdy-avail-to-take-call)
exten => s-NOANSWER,2,SetGlobalVar(FOUNDME=NOANSWER)
exten => s-NOANSWER,3,Goto(s-CLEANEXIT,1)
;
;
exten => s-ANSWER,1,SetGloabalVar(FOUNDME=ANSWER)
exten => s-ANSWER,2,Goto(s-CLEANEXIT,3)
;
;
exten => s-.,1,BackGround(something-terrible-wrong)
exten => s-.,2,NoOp(${DIALSTATUS)
exten => s-.,3,SetGlobalVar(FOUNDME=ERROR)
exten => s-.,4,Goto(s-CLEANEXIT,1)
;
;
exten => s-CLEANEXIT,1,NoOp
exten => s-CLEANEXIT,2,Hangup
exten => s-CLEANEXIT,3,NoOp







More information about the asterisk-users mailing list