[asterisk-users] Macro with DIALSTATUS

Azher Mughal azher at hep.caltech.edu
Wed May 20 11:49:22 CDT 2009


Hi,

I am trying to pass DIALSTATUS to a Macro so that i can set a
variable when a call is placed (call is placed via a call file to
another extension first). Basically i don't want to dial a number
where a call is already bridged and thats why i am setting a variable.

[macro-afterdial];
exten => s,1,Goto(s-${ARG1},1)
exten => s-ANSWER,1,SetGlobalVar(NUM${ARG2} = "ACTIVE")

exten => 30,3,Dial(SIP/provider/${num}|15|gM(afterdial^${DIALSTATUS}^1))
exten => 30,4,SetGlobalVar(NUM1 = "foo")


Asterisk execute the Macro but on the cli i can see, but dialstatus
is somehow not passed to the macro:

 Executing [s at macro-afterdial:1] Goto("SIP/8172-0a1136a8", "s-|1")
in new stack
    -- Goto (macro-afterdial,s-,1)


Any hints ? or some other technique ?

Thanks
-Azher



More information about the asterisk-users mailing list