RockWater !
2005-Jan-19 17:17 UTC
[Asterisk-Users] Call Screen Macro Not Exiting when call rejected
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@1010/13 -- Attempting native bridge of IAX2/1010@1010/13 and IAX2/1001/14 -- Channel 'IAX2/1001/14' ready to transfer -- Channel 'IAX2/1010@1010/13' ready to transfer -- Releasing IAX2/1010@1010/13 and IAX2/1001/14 -- Hungup 'IAX2/1001/14'
Brian West
2005-Jan-19 18:15 UTC
[Asterisk-Users] Call Screen Macro Not Exiting when call rejected
[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()
C F
2005-Jan-19 18:55 UTC
[Asterisk-Users] Call Screen Macro Not Exiting when call rejected
You have to apply this patch: http://bugs.digium.com/bug_view_page.php?bug_id=0002905 On Wed, 19 Jan 2005 19:15:27 -0600, Brian West <brian@bkw.org> wrote:> [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() > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Brian West
2005-Jan-19 19:03 UTC
[Asterisk-Users] Call Screen Macro Not Exiting when call rejected
Not anymore. bkw> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of C F > Sent: Wednesday, January 19, 2005 7:55 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] Call Screen Macro Not Exiting when call > rejected > > You have to apply this patch: > http://bugs.digium.com/bug_view_page.php?bug_id=0002905 > > > > On Wed, 19 Jan 2005 19:15:27 -0600, Brian West <brian@bkw.org> wrote: > > [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() > > > > _______________________________________________ > > Asterisk-Users mailing list > > Asterisk-Users@lists.digium.com > > http://lists.digium.com/mailman/listinfo/asterisk-users > > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
RockWater !
2005-Jan-19 19:07 UTC
[Asterisk-Users] Call Screen Macro Not Exiting when call rejected
Thanks for the prompt responses. I am aware of the patch but i can't figure out how to install it ? I have emailed mantis who told me the patch is included in the latest versions * which I beleive is 1.0.3.. or do I have to run the latest unstable version ? I would prefer to just apply the patch by itself to my system. Thanks for your help
RockWater !
2005-Jan-31 01:49 UTC
[Asterisk-Users] Call Screen Macro Not Exiting when call rejected
Thanks everyone for your help. The code in the dialplan was ok. I had to switch to CVS head and everything worked straight away. Any clues on when this will be working in the stable release ? Thanks