Does anyone know of a way to pass a value back to the dial plan after
calling a macro from the dial app in the 1.0 release? I think this
should be pretty simple, but I can't quite figure out how.
The example would work except that the modified value of found is not
usable when Dial ends. I think that the MACRO_RESULT would do this, but
it doesn't appear to have made it into 1.0
I want to stop going through the priorities after completion of a
successful dial, but only if MachineDetect returns 0. If it returns 1 I
want to hangup on the called party and goto the next priority
exten => 223,3,SetVar(__found=0)
exten => 223,4,Dial(SIP/[EMAIL PROTECTED],48,rtgM(md))
exten => 223,5,GotoIf($[${found} = 1]?7)
exten => 223,6,Voicemail(u${EXTEN})
exten => 223,7,Hangup
[macro-md]
exten => s,1,MachineDetect(700,2,2200)
exten => s,2,GotoIf($[${MACHINE} = 1]?3:5)
exten => s,3,SoftHangup(${CHANNEL})
exten => s,4,Goto(6)
exten => s,5,SetVar(found=1)
exten => s,6,NoOp
_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users