[Asterisk-Users] Call Screen Macro Not Exiting when call rejected

Brian West
Wed, 19 Jan 2005 18:15:27 -0000

[macro-screen]
exten => s,1,Playback(silence/1)
exten => s,2,Playback(screen-from)
exten => s,3,Read(ACCEPT|screen-accept|1||3)
exten => s,4,GotoIf($[${ACCEPT} = 1 ] ?6:5)
exten => s,5,SetVar(MACRO_RESULT=CONTINUE)
exten => s,6,NoOp

That works for me.  I think you need to check the args for Read.

bkw

> [macro-screen]
> ; Prompt operator to accept,reject or transfer the incoming call
> ; before the call is connected to them.
> exten => s,1,Wait(0.2)
> exten => s,2,Playback(og-welcome)
> exten => s,3,Read(ACCEPT||1)
> exten => s,4,GotoIf($[${ACCEPT} = 1]?6:5) ;1 = connect else return
> exten => s,5,SetVar(MACRO_RESULT=CONTINUE)
> exten => s,6,NOOP()