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

RockWater ! rockwater321 at msn.com
Wed Jan 19 17:17:09 MST 2005


This is a followup to the posting earlier about Hunt Groups with Call 
Screening.

I have implemented the following macro and for some reason the Macro does 
not exit and continue the context it was called from when the called party 
rejects the call - It always drops through to the NoOp at the end and 
connects the call.

Below are two examples of the dial commands I am using to call the macro.  
The macro itself is below and following is the output from the console. In 
the example on the console the 'User Entered '2' '  and conrol is passed to 
priority 5 which is correct.  At this point the macro should exit and go 
back to the next priority in the context that called it.

The system is running Asterisk v 1.0.3


[example_context]
....
exten => 
2,2,DIAL(IAX2/${USER}:${SECRET}@${PEER}/${MOBILE_CRAIG},15,mM(screen))
......
exten => 3,1,DIAL(IAX2/${TEST},15,mgM(screen))


[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()


Output from Console --


    -- Executing Wait("IAX2/1001/14", "0.2") in new stack
    -- Executing Playback("IAX2/1001/14", "og-accept_reject") in new stack
    -- Playing 'og-accept_reject' (language 'en')
    -- Executing Read("IAX2/1001/14", "ACCEPT||1") in new stack
    -- Accepting a maximum of 1 digits.
    -- User entered '2'
    -- Executing GotoIf("IAX2/1001/14", "0?6:5") in new stack
    -- Goto (macro-screen,s,5)
    -- Executing SetVar("IAX2/1001/14", "MACRO_RESULT=CONTINUE") in new 
stack
    -- Executing NoOp("IAX2/1001/14", "") in new stack
    -- Stopped music on hold on IAX2/1010 at 1010/13
    -- Attempting native bridge of IAX2/1010 at 1010/13 and IAX2/1001/14
    -- Channel 'IAX2/1001/14' ready to transfer
    -- Channel 'IAX2/1010 at 1010/13' ready to transfer
    -- Releasing IAX2/1010 at 1010/13 and IAX2/1001/14
    -- Hungup 'IAX2/1001/14'





More information about the asterisk-users mailing list