How to exit an IVR from menu-exec-app
Hi there, I have a small Lua script that I run from an IVR <menu name = "my_ivr" ... ...
... <entry action = "menu-exec-app" digits="7" param="lua dosomething.lua" /> ... </menu> By default, when I press 7 - dosomething.lua runs and returns - and my_ivr repeats. I would like my_ivr to terminate when the lua script returns. Is this possible? Thanks in anticipation! Phil
There are probably better ways, but you could transfer the call to an extension that executes the script and drops the call after it finishes. From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Phillip Jones Sent: Monday, October 06, 2014 12:20 PM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] How to exit an IVR from menu-exec-app Hi there, I have a small Lua script that I run from an IVR <menu name = "my_ivr" ... ...
... <entry action = "menu-exec-app" digits="7" param="lua dosomething.lua" /> ... </menu> By default, when I press 7 - dosomething.lua runs and returns - and my_ivr repeats. I would like my_ivr to terminate when the lua script returns. Is this possible? Thanks in anticipation! Phil
Hector - Yeah thanks for that. I am not trying to drop the call. I want to IVR to terminate and pass control back to the point in the dialplan that called it.
https://wiki.freeswitch.org/wiki/IVR_Menu#See_Also Looks like you can map multiple actions to the same digit, so you can probably do something like: <entry action = "menu-exec-app" digits="7" param="lua dosomething.lua" /> <entry action = "menu-exit” /> The documentation states that actions will be executed on sequence. If the operations are executed asynchronously (ie the IVR exits while the script is still running), you can probably set the value of a variable (flag), exit the menu, then have a condition on the main dialplan that invoked the ivr menu, and this condition will check for the flag and execute the script accordingly. From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Phillip Jones Sent: Monday, October 06, 2014 12:42 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] How to exit an IVR from menu-exec-app Hector - Yeah thanks for that. I am not trying to drop the call. I want to IVR to terminate and pass control back to the point in the dialplan that called it.
Forgot to append the ‘digits’ arg to the second entry. <entry action = "menu-exit” digits=”7” /> Give it a shot From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Hector Geraldino Sent: Monday, October 06, 2014 1:09 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] How to exit an IVR from menu-exec-app https://wiki.freeswitch.org/wiki/IVR_Menu#See_Also Looks like you can map multiple actions to the same digit, so you can probably do something like: <entry action = "menu-exec-app" digits="7" param="lua dosomething.lua" /> <entry action = "menu-exit” /> The documentation states that actions will be executed on sequence. If the operations are executed asynchronously (ie the IVR exits while the script is still running), you can probably set the value of a variable (flag), exit the menu, then have a condition on the main dialplan that invoked the ivr menu, and this condition will check for the flag and execute the script accordingly. From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Phillip Jones Sent: Monday, October 06, 2014 12:42 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] How to exit an IVR from menu-exec-app Hector - Yeah thanks for that. I am not trying to drop the call. I want to IVR to terminate and pass control back to the point in the dialplan that called it.
Hector, Perfect - thank you. Works like a charm. <entry action = "menu-exec-app" digits="7" param="lua dosomething.lua" /> <entry action = "menu-exit” digits="7"/> Thanks again
participants (2)
-
Hector Geraldino
-
Phillip Jones