[Asterisk-Users] exten statement execution order

Wes Baehr wbaehr at abilitybusiness.com
Wed May 10 05:07:13 MST 2006


Show application dial

You may be interested in one of:

    g    - Proceed with dialplan execution at the current extension if the
           destination channel hangs up.
    G(context^exten^pri) - If the call is answered, transfer both parties to
           the specified priority. Optionally, an extension, or extension
and
           context may be specified. Otherwise, the current extension is
used.


Wes Baehr
Ability Business Computing, Ltd.
Office: 330.882.0455 x25     Cell: 330.882.0455 x35
wbaehr at abilitybusiness.com
 

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of David L. West
Sent: Wednesday, May 10, 2006 12:12 AM
To: asterisk-users at lists.digium.com
Subject: [Asterisk-Users] exten statement execution order

In the following macro, a call is dialed and control branches according
to DIALSTATUS, much like the default std-exten macro.  What I'm trying
to figure out is how to regain control when the call is answered.

; Standard extension logic
[macro-stdexten]
;   ${ARG1}=Extension ${ARG2}=Device(s) to ring
exten => s,1,NoOp(stdexten ${EXTEN})
exten => s,n,Set(cname=${CALLERID(number)}@asterisk.deskoptional.com)
exten => s,n,Set(CALLERID(number)=${cname})
exten => s,n,Macro(psa-predial)
exten => s,n,Dial(${ARG2},20,tTwW)
exten => s,n,Set(savestatus=${DIALSTATUS})
exten => s,n,Macro(psa-postdial)
exten => 
s,n,Goto(s-${savestatus},1);ANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER
exten => s-ANSWER,1,NoOp(call was answered!!!!!)
exten => s-CHANUNAVAIL,1,VoiceMail(u${ARG1})
exten => s-CONGESTION,1,VoiceMail(u${ARG1})
exten => s-NOANSWER,1,Voicemail(u${ARG1})
exten => s-BUSY,1,Voicemail(b${ARG1})
exten => s,200,NoOp(DONE WITH MACRO)

In all cases but "ANSWER", the psa-postdial macro executes.  Can somebody 
help me understand the
flow of operations here?  The s-ANSWER line never gets called either.

I'm digging around on www.voip-info, but hoping some kind sould here will 
set me on the right path.



_______________________________________________
--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

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.5/334 - Release Date: 5/8/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.5/334 - Release Date: 5/8/2006
 




More information about the asterisk-users mailing list