[Freeswitch-users] execute_on_answer

Joli Martinez mrjoli021 at gmail.com
Sat Apr 27 14:10:02 UTC 2019


Hello,

Not sure I follow, the only variable in this case is the EXT and it is set
above the execute_on_answer command.  What other var should I set?  Call
originates from FS to an IVR,  IVR answers and FS dials EXT (1002), FS wait
for EXT to answer then executes lua script.  In this case I have stripped
down my script to just play a file.  So my lua script does not take any
parameters.

thanks,


On Sat, Apr 27, 2019 at 8:26 AM Vallimamod Abdullah <vma at vallimamod.org>
wrote:

> Hi,
>
> You need to set the execute_on_answer var before calling the answer
> application.
> Once the call is answered or bridged, it's too late.
>
>
> Best Regards,
> --
> Vallimamod Abdullah
> SIP Solutions
> vma at sip.solutions
> linkedin.com/in/vallimamod
> .
>
>
> On 27 Apr 2019, at 03:00, Joli Martinez <mrjoli021 at gmail.com> wrote:
>
> Hello,
>
> When I just use the  "<action application="lua" data="test.lua"/>"  the
> call goes through and sends the correct DTMF from the channel variable
> passed which is 1002.  When I uncomment the "<action application="set"
> data="execute_on_answer=lua test.lua"/>" and comment out the other line,
> then do a reloadxml on fs.  The DTMF is not passed correctly and the call
> fails.  I have stripped down my test.lua script to just basic to only play
> a file and it still fails.  In this scenario I am testing calling from the
> freeswitch box to another freeswitch IVR, but this should work regardless
> of what IVR it calls.  Below is the output of the both boxes.
>
>
> --------------xml----------------------
> <include>
>   <extension name="test_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="test.lua"/> -->
>       <action application="set" data="execute_on_answer=lua test.lua"/>
>     </condition>
>   </extension>
> </include>
> --------------xml----------------------
>
> --------------test.lua----------------------
> #!/bin/lua
>
> soundDir = "/etc/freeswitch/scripts/sounds/"
> welcome = soundDir .. "welcome.wav"
>
> freeswitch.consoleLog("INFO", "got here\n")
>
> --Starts Playing welcome message and accepts digits
> value = session:playAndGetDigits(2, 4, 3, 3000, "#", welcome, "", "\\d+")
>
> freeswitch.consoleLog("INFO", "got digits " ..value.. "\n")
> --------------test.lua----------------------
>
> --------------this FS box----------------------
> Dialplan: sofia/external/1112223333 Regex (PASS) [test_ivr]
> destination_number(9176) =~ /^9176$/ break=on-false
> Dialplan: sofia/external/1112223333 Action sleep(2000)
> Dialplan: sofia/external/1112223333 Action send_dtmf(1002)
> Dialplan: sofia/external/1112223333 Action sleep(1000)
> Dialplan: sofia/external/1112223333 Action set(execute_on_answer=lua
> test.lua)
> 2019-04-26 17:52:22.511865 [INFO] switch_channel.c:3129
> sofia/external/1112223333 Flipping CID from "" <3337777777> to "Outbound
> Call" <>
> 2019-04-26 17:52:22.511865 [DEBUG] switch_core_state_machine.c:286
> (sofia/external/1112223333) State Change CS_ROUTING -> CS_EXECUTE
> 2019-04-26 17:52:22.511865 [DEBUG] switch_core_state_machine.c:643
> (sofia/external/1112223333) State ROUTING going to sleep
> 2019-04-26 17:52:22.511865 [DEBUG] switch_core_state_machine.c:584
> (sofia/external/1112223333) Running State Change CS_EXECUTE (Cur 1 To)
> 2019-04-26 17:52:22.511865 [DEBUG] switch_core_state_machine.c:650
> (sofia/external/1112223333) State EXECUTE
> 2019-04-26 17:52:22.511865 [DEBUG] mod_sofia.c:198
> sofia/external/1112223333 SOFIA EXECUTE
> 2019-04-26 17:52:22.511865 [DEBUG] switch_core_state_machine.c:328
> sofia/external/1112223333 Standard EXECUTE
> EXECUTE sofia/external/1112223333 set(open=true)
> 2019-04-26 17:52:22.511865 [DEBUG] mod_dptools.c:1548 SET
> sofia/external/1112223333 [open]=[true]
> EXECUTE sofia/external/1112223333 sleep(2000)
> EXECUTE sofia/external/1112223333 send_dtmf(1002)
> 2019-04-26 17:52:24.511881 [DEBUG] switch_core_io.c:1894
> sofia/external/1112223333 send dtmf
> digit=1 ms=250 samples=2000
> 2019-04-26 17:52:24.511881 [DEBUG] switch_core_io.c:1894
> sofia/external/1112223333 send dtmf
> digit=0 ms=250 samples=2000
> 2019-04-26 17:52:24.511881 [DEBUG] switch_core_io.c:1894
> sofia/external/1112223333 send dtmf
> digit=0 ms=250 samples=2000
> 2019-04-26 17:52:24.511881 [DEBUG] switch_core_io.c:1894
> sofia/external/1112223333 send dtmf
> digit=2 ms=250 samples=2000
> EXECUTE sofia/external/1112223333 sleep(1000)
> 2019-04-26 17:52:24.531872 [DEBUG] switch_rtp.c:5261 Send start packet for
> [1] ts=160 dur=160/160/2000 seq=16436 lw=160
> 2019-04-26 17:52:24.531872 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [1] ts=160 dur=320/320/2000 seq=16437 lw=320
> 2019-04-26 17:52:24.551861 [DEBUG] switch_rtp.c:7308 Correct audio ip/port
> confirmed.
> 2019-04-26 17:52:24.551861 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [1] ts=160 dur=480/480/2000 seq=16438 lw=480
> 2019-04-26 17:52:24.571862 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [1] ts=160 dur=640/640/2000 seq=16439 lw=640
> 2019-04-26 17:52:24.591872 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [1] ts=160 dur=800/800/2000 seq=16440 lw=800
> 2019-04-26 17:52:24.611866 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [1] ts=160 dur=960/960/2000 seq=16441 lw=960
> 2019-04-26 17:52:24.631863 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [1] ts=160 dur=1120/1120/2000 seq=16442 lw=1120
> 2019-04-26 17:52:24.651858 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [1] ts=160 dur=1280/1280/2000 seq=16443 lw=1280
> 2019-04-26 17:52:24.671867 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [1] ts=160 dur=1440/1440/2000 seq=16444 lw=1440
> 2019-04-26 17:52:24.691863 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [1] ts=160 dur=1600/1600/2000 seq=16445 lw=1600
> 2019-04-26 17:52:24.711874 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [1] ts=160 dur=1760/1760/2000 seq=16446 lw=1760
> 2019-04-26 17:52:24.731866 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [1] ts=160 dur=1920/1920/2000 seq=16447 lw=1920
> 2019-04-26 17:52:24.751872 [DEBUG] switch_rtp.c:5160 Send end packet for
> [1] ts=160 dur=2080/2080/2000 seq=16448 lw=1920
> 2019-04-26 17:52:24.751872 [DEBUG] switch_rtp.c:5160 Send end packet for
> [1] ts=160 dur=2080/2080/2000 seq=16449 lw=1920
> 2019-04-26 17:52:24.751872 [DEBUG] switch_rtp.c:5160 Send end packet for
> [1] ts=160 dur=2080/2080/2000 seq=16450 lw=1920
> 2019-04-26 17:52:24.751872 [DEBUG] switch_rtp.c:5108 Queue digit delay of
> 40ms
> 2019-04-26 17:52:25.151870 [DEBUG] switch_rtp.c:5261 Send start packet for
> [0] ts=2400 dur=160/160/2000 seq=16451 lw=2400
> 2019-04-26 17:52:25.171870 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [0] ts=2400 dur=320/320/2000 seq=16452 lw=2560
> 2019-04-26 17:52:25.191863 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [0] ts=2400 dur=480/480/2000 seq=16453 lw=2720
> 2019-04-26 17:52:25.211881 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [0] ts=2400 dur=640/640/2000 seq=16454 lw=2880
> 2019-04-26 17:52:25.231878 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [0] ts=2400 dur=800/800/2000 seq=16455 lw=3040
> 2019-04-26 17:52:25.251862 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [0] ts=2400 dur=960/960/2000 seq=16456 lw=3200
> 2019-04-26 17:52:25.271866 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [0] ts=2400 dur=1120/1120/2000 seq=16457 lw=3360
> 2019-04-26 17:52:25.291874 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [0] ts=2400 dur=1280/1280/2000 seq=16458 lw=3520
> 2019-04-26 17:52:25.311871 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [0] ts=2400 dur=1440/1440/2000 seq=16459 lw=3680
> 2019-04-26 17:52:25.331864 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [0] ts=2400 dur=1600/1600/2000 seq=16460 lw=3840
> 2019-04-26 17:52:25.351866 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [0] ts=2400 dur=1760/1760/2000 seq=16461 lw=4000
> 2019-04-26 17:52:25.371873 [DEBUG] switch_rtp.c:5160 Send middle packet
> for [0] ts=2400 dur=1920/1920/2000 seq=16462 lw=4160
> 2019-04-26 17:52:25.391864 [DEBUG] switch_rtp.c:5160 Send end packet for
> [0] ts=2400 dur=2080/2080/2000 seq=16463 lw=4160
> 2019-04-26 17:52:25.391864 [DEBUG] switch_rtp.c:5160 Send end packet for
> [0] ts=2400 dur=2080/2080/2000 seq=16464 lw=4160
> 2019-04-26 17:52:25.391864 [DEBUG] switch_rtp.c:5160 Send end packet for
> [0] ts=2400 dur=2080/2080/2000 seq=16465 lw=4160
> 2019-04-26 17:52:25.391864 [DEBUG] switch_rtp.c:5108 Queue digit delay of
> 40ms
> EXECUTE sofia/external/1112223333 set(execute_on_answer=lua test.lua)
> 2019-04-26 17:52:25.531882 [DEBUG] mod_dptools.c:1548 SET
> sofia/external/1112223333 [execute_on_answer]=[lua test.lua]
> 2019-04-26 17:52:25.531882 [NOTICE] switch_core_state_machine.c:385
> sofia/external/1112223333 has executed the last dialplan instruction.
> 2019-04-26 17:52:25.531882 [NOTICE] switch_core_state_machine.c:387 Hangup
> sofia/external/1112223333 [CS_EXECUTE] [NORMAL_CLEARING]
> --------------this FS box----------------------
>
> --------------receiving FS box----------------------2019-04-26
> 20:53:34.216925 [NOTICE] mod_dptools.c:1312 Channel [sofia/internal/+
> 13337777777 at 10.21.10.4] has been answered
> 2019-04-26 20:53:34.216925 [DEBUG] switch_channel.c:3773 (sofia/internal/+
> 13337777777 at 10.21.10.4) Callstate Change RINGING -> ACTIVE
> EXECUTE sofia/internal/+13337777777 at 10.21.10.4 sleep(1000)
> 2019-04-26 20:53:34.636985 [DEBUG] switch_rtp.c:7308 Correct audio ip/port
> confirmed.
> 2019-04-26 20:53:34.676971 [DEBUG] sofia.c:7084 Channel sofia/internal/+
> 13337777777 at 10.21.10.4 entering state [ready][200]
> EXECUTE sofia/internal/+13337777777 at 10.21.10.4
> set(hangup_after_bridge=true)
> 2019-04-26 20:53:35.216977 [DEBUG] mod_dptools.c:1548 SET sofia/internal/+
> 13337777777 at 10.21.10.4 [hangup_after_bridge]=[true]
> EXECUTE sofia/internal/+13337777777 at 10.21.10.4
> set(ringback=local_stream://default)
> 2019-04-26 20:53:35.216977 [DEBUG] mod_dptools.c:1548 SET sofia/internal/+
> 13337777777 at 10.21.10.4 [ringback]=[local_stream://default]
> EXECUTE sofia/internal/+13337777777 at 10.21.10.4 set(presence_id=
> 9000 at 10.21.10.4)
> 2019-04-26 20:53:35.216977 [DEBUG] mod_dptools.c:1548 SET sofia/internal/+
> 13337777777 at 10.21.10.4 [presence_id]=[9000 at 10.21.10.4]
> EXECUTE sofia/internal/+13337777777 at 10.21.10.4
> set(transfer_ringback=local_stream://default)
> 2019-04-26 20:53:35.216977 [DEBUG] mod_dptools.c:1548 SET sofia/internal/+
> 13337777777 at 10.21.10.4 [transfer_ringback]=[local_stream://default]
> EXECUTE sofia/internal/+13337777777 at 10.21.10.4
> set(ivr_menu_uuid=d67bb786-a0bc-4094-91fa-76f7db68caeb)
> 2019-04-26 20:53:35.216977 [DEBUG] mod_dptools.c:1548 SET sofia/internal/+
> 13337777777 at 10.21.10.4
> [ivr_menu_uuid]=[d67bb786-a0bc-4094-91fa-76f7db68caeb]
> EXECUTE sofia/internal/+13337777777 at 10.21.10.4
> ivr(d67bb786-a0bc-4094-91fa-76f7db68caeb)
> 2019-04-26 20:53:35.236936 [DEBUG] freeswitch_lua.cpp:365 DBH handle
> 0x7f3c6005cdf0 Connected.
> 2019-04-26 20:53:35.236936 [DEBUG] freeswitch_lua.cpp:382 DBH handle
> 0x7f3c6005cdf0 released.
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_menu.c:743
> switch_ivr_menu_stack_xml_add binding 'menu-exit'
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_menu.c:743
> switch_ivr_menu_stack_xml_add binding 'menu-sub'
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_menu.c:743
> switch_ivr_menu_stack_xml_add binding 'menu-exec-app'
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_menu.c:743
> switch_ivr_menu_stack_xml_add binding 'menu-play-sound'
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_menu.c:743
> switch_ivr_menu_stack_xml_add binding 'menu-back'
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_menu.c:743
> switch_ivr_menu_stack_xml_add binding 'menu-top'
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_menu.c:880 building menu
> 'd67bb786-a0bc-4094-91fa-76f7db68caeb'
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_menu.c:964 binding menu
> action 'menu-exec-app' to '1'
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_menu.c:964 binding menu
> action 'menu-exec-app' to '/^(\d{2,11})$/'
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_menu.c:964 binding menu
> action 'menu-exec-app' to '/^(\d{2,11})$/'
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_menu.c:964 binding menu
> action 'menu-exec-app' to '/^(\d{2,11})$/'
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_menu.c:483 Executing IVR
> menu d67bb786-a0bc-4094-91fa-76f7db68caeb
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_play_say.c:3025 OPEN TTS
> flite
> 2019-04-26 20:53:35.236936 [DEBUG] switch_ivr_play_say.c:3035 Raw Codec
> Activated
> 2019-04-26 20:53:35.376916 [DEBUG] switch_ivr_play_say.c:2729 Speaking
> text:  Hello World, This is a test IVR
> 2019-04-26 20:53:37.236985 [DEBUG] switch_rtp.c:7534 RTP RECV DTMF 1:2080
> 2019-04-26 20:53:37.236985 [INFO] switch_channel.c:515 RECV DTMF 1:2080
> 2019-04-26 20:53:37.236985 [DEBUG] switch_ivr_play_say.c:2907 done
> speaking text
> 2019-04-26 20:53:37.236985 [DEBUG] switch_ivr_menu.c:377 waiting for 3/4
> digits t/o 2000
> 2019-04-26 20:53:37.876935 [DEBUG] switch_rtp.c:7534 RTP RECV DTMF 0:2080
> 2019-04-26 20:53:37.876935 [INFO] switch_channel.c:515 RECV DTMF 0:2080
> 2019-04-26 20:53:37.896923 [NOTICE] sofia.c:1012 Hangup sofia/internal/+
> 13337777777 at 10.21.10.4 [CS_EXECUTE] [NORMAL_CLEARING]
> --------------receiving FS box----------------------
>
> On Fri, Apr 26, 2019 at 8:53 AM David Villasmil <
> david.villasmil.work at gmail.com> wrote:
>
>> 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
>> _________________________________________________________________________
>>
>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20190427/c67a3fce/attachment-0001.html>


More information about the FreeSWITCH-users mailing list