[asterisk-users] Dial plan sample for detecting Voice Mail

Bharath B. Reddy Bynagari bynagari at mavensphere.com
Wed Aug 19 14:33:26 CDT 2009


Hi, 

 

I am trying to implement a macro-screen mentioned at
http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial

 

I put the following code in my extensions_additional.conf

screen-from: You have a call;

screen-accept: Press 1 to accept this call or any other key to reject.;

 

[macro-screen]

exten => s,1,Wait(0.2)

exten => s,1,Playback(screen-from)

exten => s,1,Playback(${ARG1})

exten => s,1,Read(ACCEPT|screen-accept|1)

exten => s,1,GotoIf($[${ACCEPT} = 1 ] ?yes:no)

exten => s,1(yes),SetVar(MACRO_RESULT=CONTINUE)

exten => s,1(no),System(/bin/rm ${ARG1})

 

; end of [macro-screen]

 

[multi-dir-callback]

include => multi-dir-callback-custom

exten => _X.,1,Macro(screen,)

exten => _X.,1,Answer

exten => _X.,n,Playback(beep)

;exten =>
_X.,n,DeadAGI(agi://127.0.0.1/callback_handler?num2=${EXTEN}&callid=${CALL_I
D}&num1=${num1}&CallStatus=${DIALSTATUS}&state=${STATE})a

exten =>
_X.,n,DeadAGI(agi://127.0.0.1/callback_handler?num2=${EXTEN}&callid=${CALL_I
D}&num1=${num1}&state=${STATE})

exten => _X.,n,Goto(${EXTEN},1)

exten =>
hangup,1,DeadAGI(agi://127.0.0.1/callback_handler?num2=${EXTEN}&callid=${CAL
L_ID}&num1=${num1}&state=${STATE})

 

; end of [multi-dir-callback]

 

It is not even recognizing the Screen macro? What I am I doing wrong?

 

Thanks

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090819/f49b6884/attachment.htm 


More information about the asterisk-users mailing list