[Freeswitch-users] execute_on_answer
David Villasmil
david.villasmil.work at gmail.com
Fri Apr 26 12:28:26 UTC 2019
Joli,
On you IVR, assuming you are using fs IVR? Please show us the IVR.
On Fri, 26 Apr 2019 at 06:19, John Covici <covici at ccs.covici.com> wrote:
> You have to have a bridge command in that dialplan to start the call
> after setting the execute_on_answer, the bridge does not belong in
> your samsclub script.
>
> On Fri, 26 Apr 2019 00:02:14 -0400,
> Joli Martinez wrote:
> >
> > [1 <multipart/alternative (7bit)>]
> > [1.1 <text/plain; UTF-8 (quoted-printable)>]
> > [1.2 <text/html; UTF-8 (quoted-printable)>]
> > Hello
> >
> > It is still not working. When I do just the application lua it works,
> but lua script starts running before I pick up. When I uncomment any of
> the two execute_on_answer the call fails. Below is the error messages. I
> am bridging the
> > call at the beginning of my lua script.
> >
> > <include>
> > <extension name="samsclub_ivr">
> > <condition field="destination_number" expression="^9176$">
> > <action application="answer"/>
> > <action application="sleep" data="2000"/>
> > <action application="send_dtmf" data="${ext}"/>
> > <action application="sleep" data="1000"/>
> > <!-- <action application="lua" data="samsclub.lua"/> -->
> > <!-- <action application="set"
> data="execute_on_answer=samsclub.lua"/> -->
> > <action application="export" data="nolocal:execute_on_answer=lua
> samsclub.lua"/>
> > </condition>
> > </extension>
> > </include>
> >
> > ----------------------------------------------------------------------
> >
> > 2019-04-25 20:51:24.351863 [DEBUG] switch_rtp.c:5108 Queue digit delay
> of 40ms
> > EXECUTE sofia/external/1112223333 set(execute_on_answer=test.lua)
> > 2019-04-25 20:51:24.471868 [DEBUG] mod_dptools.c:1548 SET
> sofia/external/1112223333 [execute_on_answer]=[test.lua]
> > 2019-04-25 20:51:24.471868 [NOTICE] switch_core_state_machine.c:385
> sofia/external/1112223333 has executed the last dialplan instruction,
> hanging up.
> > 2019-04-25 20:51:24.471868 [NOTICE] switch_core_state_machine.c:387
> Hangup sofia/external/1112223333 [CS_EXECUTE] [NORMAL_CLEARING]
> >
> > 2019-04-25 20:54:47.491863 [DEBUG] switch_rtp.c:5108 Queue digit delay
> of 40ms
> > EXECUTE sofia/external/1112223333 export(nolocal:execute_on_answer=lua
> test.lua)
> > 2019-04-25 20:54:47.631863 [DEBUG] switch_channel.c:1296 EXPORT
> (export_vars) (REMOTE ONLY) [execute_on_answer]=[lua test.lua]
> > 2019-04-25 20:54:47.631863 [NOTICE] switch_core_state_machine.c:385
> sofia/external/1112223333 has executed the last dialplan instruction,
> hanging up.
> > 2019-04-25 20:54:47.631863 [NOTICE] switch_core_state_machine.c:387
> Hangup sofia/external/1112223333 [CS_EXECUTE] [NORMAL_CLEARING]
> >
> > On Thu, Apr 25, 2019 at 5:34 PM David Villasmil <
> david.villasmil.work at gmail.com> wrote:
> >
> > You need to bridge the call SOMEWHERE before you can run
> execute_on_answer.
> > So what you have to do, send the call out setting the execute_on_answer.
> >
> > Something like:
> >
> > Answer()
> > Play some message
> > Bridge with {execute_on_answer=‘lua
> myanswer.lua’}sofia/gateway/mygw/1224
> >
> > Then, when the BRIDGE is answered, the lua will execute. You can’t
> execute on answer on a call that’s never answered.
> >
> > On Thu, 25 Apr 2019 at 20:08, Joli Martinez <mrjoli021 at gmail.com>
> wrote:
> >
> > Hello,
> >
> > ok, if I put the line back to just send the call to my lua script it
> works, but the script starts executing. I need for it to wait until
> someone answeres the phone before executing. so on my lua script instead
> of the first
> > line reading session:answer() can I replace it with
> session:execute_on_answer()?
> >
> > Or what would be the best way to tell my lua script to wait until the
> phone is answered before continuing execution?
> >
> > thanks,
> >
> > On Thu, Apr 25, 2019 at 1:16 PM David Villasmil <
> david.villasmil.work at gmail.com> wrote:
> >
> > I understand, but you're not doing anything with call. You need to set
> the execute on answer either befire the bridge or on the bridge itself.
> > If you want to manipulate the incoming call with the lua, then just do;
> >
> > <action application="lua" data="test.lua"/>
> >
> > Regards,
> >
> > David Villasmil
> > email: david.villasmil.work at gmail.com
> > phone: +34669448337
> >
> > On Thu, Apr 25, 2019 at 5:17 PM Joli Martinez <mrjoli021 at gmail.com>
> wrote:
> >
> > Hello,
> >
> > What I am trying to accomplish is that once the call gets answered by
> the initial IVR, the call gets sent to an extension. At that point the
> call waits for an answer and sends it to my lua script which bridges the
> call.
> >
> > If I just send the call without the wait_on_answer the call works, but
> my scripts starts executing right away, so by the time I answer the phone I
> am hearing the prompts half way through.
> >
> > What am I missing or how can I get it to work?
> >
> > thanks,
> >
> > On Thu, Apr 25, 2019 at 11:48 AM David Villasmil <
> david.villasmil.work at gmail.com> wrote:
> >
> > So you’re not bridging anywhere, nor answering the call, right? I ask
> because you talk about when the call is answered, but you’re not bridging
> it anywhere?
> >
> > On Thu, 25 Apr 2019 at 14:15, Joli Martinez <mrjoli021 at gmail.com>
> wrote:
> >
> > Hello,
> >
> > This is what I get when I uncomment the lines. I also did a reloadxml.
> >
> > right after the last DTMF digit it dies
> >
> > ------------------------------------------------------
> > 2019-04-25 05:46:07.911991 [DEBUG] switch_core_io.c:1894
> sofia/external/12223334444 send dtmf
> > digit=2 ms=250 samples=2000
> > EXECUTE sofia/external/12223334444 export(nolocal:execute_on_answer=lua
> samsclub.lua)
> > 2019-04-25 05:46:07.911991 [DEBUG] switch_channel.c:1296 EXPORT
> (export_vars) (REMOTE ONLY) [execute_on_answer]=[lua test.lua]
> > 2019-04-25 05:46:07.911991 [NOTICE] switch_core_state_machine.c:385
> sofia/external/12223334444 has executed the last dialplan instruction,
> hanging up.
> > 2019-04-25 05:46:07.911991 [NOTICE] switch_core_state_machine.c:387
> Hangup sofia/external/12223334444 [CS_EXECUTE] [NORMAL_CLEARING]
> >
> > ------------------------------------------------------------
> >
> > On Thu, Apr 25, 2019 at 6:24 AM David Villasmil <
> david.villasmil.work at gmail.com> wrote:
> >
> > Can you send the console log when it fails?
> >
> > On Thu, 25 Apr 2019 at 01:31, Joli Martinez <mrjoli021 at gmail.com>
> wrote:
> >
> > Hello,
> >
> > I need my dial plan to dial an extension within then wait until the
> extension picks up before starting the lua script. I got it to dial the
> extension but can't seem to get the syntax for the
> > "execute_on_answer" correct. When I uncomment it out it call just
> fails. What am I missing?
> >
> > -----------------------------
> > <extension name="my_dialplan">
> > <condition field="destination_number" expression="^9176$">
> > <action application="sleep" data="2000"/>
> > <action application="send_dtmf" data="1002"/>
> > <action application="lua" data="test.lua"/>
> > <!-- <action application="export"
> data="nolocal:execute_on_answer=lua test.lua"/> -->
> > </condition>
> > </extension>
> > </include>
> > ----------------------------------------
> >
> > On Wed, Apr 24, 2019 at 1:57 PM David Villasmil <
> david.villasmil.work at gmail.com> wrote:
> >
> > That should work properly, what are trying to accomplish exactly?
> >
> > On Wed, 24 Apr 2019 at 18:19, Joli Martinez <mrjoli021 at gmail.com>
> wrote:
> >
> > Hello,
> >
> > I am trying to find more info on the application "execute_on_answer".
> >
> > I have a script that calls an IVR then dials a users extension. I need
> to wait for the calling party extension to answer before executing the rest
> of my script. I don't seem to find much
> > documentation on this application. Is there another way to test if the
> calling party has been answered?
> >
> > thanks,
> >
> >
> _________________________________________________________________________
> >
> > The FreeSWITCH project is sponsored by SignalWire
> https://signalwire.com
> > Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> > Build your next product on our scalable cloud platform.
> >
> > Join our online community to chat in real time
> https://signalwire.community
> >
> > Professional FreeSWITCH Services
> > sales at freeswitch.com
> > https://freeswitch.com
> >
> > Official FreeSWITCH Sites
> > https://freeswitch.com/oss
> > https://freeswitch.org/confluence
> > https://cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> > https://freeswitch.com
> >
> > --
> > Regards,
> >
> > David Villasmil
> > email: david.villasmil.work at gmail.com
> > phone: +34669448337
> >
> _________________________________________________________________________
> >
> > The FreeSWITCH project is sponsored by SignalWire
> https://signalwire.com
> > Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> > Build your next product on our scalable cloud platform.
> >
> > Join our online community to chat in real time
> https://signalwire.community
> >
> > Professional FreeSWITCH Services
> > sales at freeswitch.com
> > https://freeswitch.com
> >
> > Official FreeSWITCH Sites
> > https://freeswitch.com/oss
> > https://freeswitch.org/confluence
> > https://cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> > https://freeswitch.com
> >
> >
> _________________________________________________________________________
> >
> > The FreeSWITCH project is sponsored by SignalWire
> https://signalwire.com
> > Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> > Build your next product on our scalable cloud platform.
> >
> > Join our online community to chat in real time
> https://signalwire.community
> >
> > Professional FreeSWITCH Services
> > sales at freeswitch.com
> > https://freeswitch.com
> >
> > Official FreeSWITCH Sites
> > https://freeswitch.com/oss
> > https://freeswitch.org/confluence
> > https://cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> > https://freeswitch.com
> >
> > --
> > Regards,
> >
> > David Villasmil
> > email: david.villasmil.work at gmail.com
> > phone: +34669448337
> >
> _________________________________________________________________________
> >
> > The FreeSWITCH project is sponsored by SignalWire
> https://signalwire.com
> > Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> > Build your next product on our scalable cloud platform.
> >
> > Join our online community to chat in real time
> https://signalwire.community
> >
> > Professional FreeSWITCH Services
> > sales at freeswitch.com
> > https://freeswitch.com
> >
> > Official FreeSWITCH Sites
> > https://freeswitch.com/oss
> > https://freeswitch.org/confluence
> > https://cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> > https://freeswitch.com
> >
> >
> _________________________________________________________________________
> >
> > The FreeSWITCH project is sponsored by SignalWire
> https://signalwire.com
> > Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> > Build your next product on our scalable cloud platform.
> >
> > Join our online community to chat in real time
> https://signalwire.community
> >
> > Professional FreeSWITCH Services
> > sales at freeswitch.com
> > https://freeswitch.com
> >
> > Official FreeSWITCH Sites
> > https://freeswitch.com/oss
> > https://freeswitch.org/confluence
> > https://cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> > https://freeswitch.com
> >
> > --
> > Regards,
> >
> > David Villasmil
> > email: david.villasmil.work at gmail.com
> > phone: +34669448337
> >
> _________________________________________________________________________
> >
> > The FreeSWITCH project is sponsored by SignalWire
> https://signalwire.com
> > Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> > Build your next product on our scalable cloud platform.
> >
> > Join our online community to chat in real time
> https://signalwire.community
> >
> > Professional FreeSWITCH Services
> > sales at freeswitch.com
> > https://freeswitch.com
> >
> > Official FreeSWITCH Sites
> > https://freeswitch.com/oss
> > https://freeswitch.org/confluence
> > https://cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> > https://freeswitch.com
> >
> >
> _________________________________________________________________________
> >
> > The FreeSWITCH project is sponsored by SignalWire
> https://signalwire.com
> > Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> > Build your next product on our scalable cloud platform.
> >
> > Join our online community to chat in real time
> https://signalwire.community
> >
> > Professional FreeSWITCH Services
> > sales at freeswitch.com
> > https://freeswitch.com
> >
> > Official FreeSWITCH Sites
> > https://freeswitch.com/oss
> > https://freeswitch.org/confluence
> > https://cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> > https://freeswitch.com
> >
> >
> _________________________________________________________________________
> >
> > The FreeSWITCH project is sponsored by SignalWire
> https://signalwire.com
> > Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> > Build your next product on our scalable cloud platform.
> >
> > Join our online community to chat in real time
> https://signalwire.community
> >
> > Professional FreeSWITCH Services
> > sales at freeswitch.com
> > https://freeswitch.com
> >
> > Official FreeSWITCH Sites
> > https://freeswitch.com/oss
> > https://freeswitch.org/confluence
> > https://cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> > https://freeswitch.com
> >
> >
> _________________________________________________________________________
> >
> > The FreeSWITCH project is sponsored by SignalWire
> https://signalwire.com
> > Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> > Build your next product on our scalable cloud platform.
> >
> > Join our online community to chat in real time
> https://signalwire.community
> >
> > Professional FreeSWITCH Services
> > sales at freeswitch.com
> > https://freeswitch.com
> >
> > Official FreeSWITCH Sites
> > https://freeswitch.com/oss
> > https://freeswitch.org/confluence
> > https://cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> > https://freeswitch.com
> >
> > --
> > Regards,
> >
> > David Villasmil
> > email: david.villasmil.work at gmail.com
> > phone: +34669448337
> >
> _________________________________________________________________________
> >
> > The FreeSWITCH project is sponsored by SignalWire
> https://signalwire.com
> > Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> > Build your next product on our scalable cloud platform.
> >
> > Join our online community to chat in real time
> https://signalwire.community
> >
> > Professional FreeSWITCH Services
> > sales at freeswitch.com
> > https://freeswitch.com
> >
> > Official FreeSWITCH Sites
> > https://freeswitch.com/oss
> > https://freeswitch.org/confluence
> > https://cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> > https://freeswitch.com
> > [2 <text/plain; utf-8 (base64)>]
> > _________________________________________________________________________
> >
> > The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> > Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> > Build your next product on our scalable cloud platform.
> >
> > Join our online community to chat in real time
> https://signalwire.community
> >
> > Professional FreeSWITCH Services
> > sales at freeswitch.com
> > https://freeswitch.com
> >
> > Official FreeSWITCH Sites
> > https://freeswitch.com/oss
> > https://freeswitch.org/confluence
> > https://cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > https://freeswitch.com
>
> --
> Your life is like a penny. You're going to lose it. The question is:
> How do
> you spend it?
>
> John Covici wb2una
> covici at ccs.covici.com
>
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> Build your next product on our scalable cloud platform.
>
> Join our online community to chat in real time
> https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> https://freeswitch.com
--
Regards,
David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20190426/f9ff1c5f/attachment-0001.html>
More information about the FreeSWITCH-users
mailing list