Just my luck. It didn't work :(
Here is what I did...

    <extension name="MY TEST">
      <condition field="destination_number" expression="8027">
            <action application="answer"/>
            <action application="set" data="transfer_ringback=/tmp/WPJ_MUSIC_QUEUE_4.wav"/>
            <action application="set" data="tts_engine=flite"/>
            <action application="set" data="tts_voice=kal"/>
            <action application="play_and_get_digits" data="4 16 3 7000 # phrase:Callidus_OD_Prompt phrase:Callidus_invalid_entry case_number \d+" />
            <action application="transfer" data="data_dip"/>
       </condition>
    </extension>

<extension name="data dip">
  <condition field="destination_number" expression="^data_dip$">
    <action application="pre_answer"/> <!-- tried both pre_answer and ring_ready -->
    <action application="lua" data="callidus_get_customer_info.lua ${case_number} OnDemand" />
    <action application="answer"/>
  </condition>
</extension>

The following is the logs from FS

2013-01-25 18:20:59.210491 [DEBUG] switch_rtp.c:1927 Starting timer [soft] 160 bytes per 20ms
2013-01-25 18:20:59.210491 [DEBUG] sofia_glue.c:3609 Set 2833 dtmf send payload to 101
2013-01-25 18:20:59.210491 [DEBUG] sofia_glue.c:3615 Set 2833 dtmf receive payload to 101
2013-01-25 18:20:59.210491 [DEBUG] sofia_glue.c:3642 sofia/external/16502928610@10.191.210.148 Set rtp dtmf delay to 40
2013-01-25 18:20:59.210491 [NOTICE] sofia_glue.c:4253 Pre-Answer sofia/external/16502928610@10.191.210.148!
2013-01-25 18:20:59.210491 [DEBUG] switch_channel.c:3083 (sofia/external/16502928610@10.191.210.148) Callstate Change RINGING -> EARLY
2013-01-25 18:20:59.210491 [DEBUG] mod_sofia.c:854 Local SDP sofia/external/16502928610@10.191.210.148:
v=0
o=FreeSWITCH 1359139145 1359139146 IN IP4 10.191.210.141
s=FreeSWITCH
c=IN IP4 10.191.210.141
t=0 0
m=audio 27714 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

2013-01-25 18:20:59.210491 [DEBUG] switch_core_session.c:823 Send signal sofia/external/16502928610@10.191.210.148 [BREAK]
2013-01-25 18:20:59.210491 [DEBUG] switch_channel.c:3342 (sofia/external/16502928610@10.191.210.148) Callstate Change EARLY -> ACTIVE
2013-01-25 18:20:59.210491 [NOTICE] mod_dptools.c:1176 Channel [sofia/external/16502928610@10.191.210.148] has been answered
2013-01-25 18:20:59.210491 [DEBUG] switch_core_session.c:969 Send signal sofia/external/16502928610@10.191.210.148 [BREAK]
2013-01-25 18:20:59.210491 [DEBUG] sofia.c:5591 Channel sofia/external/16502928610@10.191.210.148 entering state [completed][200]
EXECUTE sofia/external/16502928610@10.191.210.148 set(transfer_ringback=/tmp/WPJ_MUSIC_QUEUE_4.wav)
2013-01-25 18:20:59.210491 [DEBUG] mod_dptools.c:1344 sofia/external/16502928610@10.191.210.148 SET [transfer_ringback]=[/tmp/WPJ_MUSIC_QUEUE_4.wav]
EXECUTE sofia/external/16502928610@10.191.210.148 set(tts_engine=flite)
2013-01-25 18:20:59.210491 [DEBUG] mod_dptools.c:1344 sofia/external/16502928610@10.191.210.148 SET [tts_engine]=[flite]
EXECUTE sofia/external/16502928610@10.191.210.148 set(tts_voice=kal)
2013-01-25 18:20:59.210491 [DEBUG] mod_dptools.c:1344 sofia/external/16502928610@10.191.210.148 SET [tts_voice]=[kal]
EXECUTE sofia/external/16502928610@10.191.210.148 play_and_get_digits(4 16 3 7000 # phrase:Callidus_OD_Prompt phrase:Callidus_invalid_entry case_number \d+)
2013-01-25 18:20:59.210491 [DEBUG] switch_ivr_play_say.c:67 No language specified - Using [en]
2013-01-25 18:20:59.231540 [DEBUG] switch_ivr_play_say.c:244 Handle play-file:[/usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-please_enter_the.wav] (en:en)
2013-01-25 18:20:59.231540 [DEBUG] switch_ivr_play_say.c:1309 Codec Activated L16@8000hz 1 channels 20ms
2013-01-25 18:20:59.231540 [DEBUG] switch_core_session.c:969 Send signal sofia/external/16502928610@10.191.210.148 [BREAK]
2013-01-25 18:20:59.231540 [DEBUG] switch_core_session.c:969 Send signal sofia/external/16502928610@10.191.210.148 [BREAK]
2013-01-25 18:20:59.231540 [DEBUG] switch_core_session.c:969 Send signal sofia/external/16502928610@10.191.210.148 [BREAK]
2013-01-25 18:20:59.250478 [DEBUG] sofia.c:5591 Channel sofia/external/16502928610@10.191.210.148 entering state [ready][200]
2013-01-25 18:20:59.291532 [DEBUG] switch_rtp.c:3606 Correct ip/port confirmed.
2013-01-25 18:20:59.950314 [DEBUG] switch_ivr_play_say.c:1682 done playing file /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-please_enter_the.wav
2013-01-25 18:21:00.010301 [DEBUG] switch_ivr_play_say.c:244 Handle speak-text:[case number,] (en:en)
2013-01-25 18:21:00.010301 [DEBUG] switch_ivr_play_say.c:2481 OPEN TTS flite
2013-01-25 18:21:00.010301 [DEBUG] switch_ivr_play_say.c:2490 Raw Codec Activated
2013-01-25 18:21:00.030327 [DEBUG] switch_ivr_play_say.c:2172 Speaking text: case number,
2013-01-25 18:21:01.710910 [DEBUG] switch_ivr_play_say.c:2369 done speaking text
2013-01-25 18:21:01.770904 [DEBUG] switch_ivr_play_say.c:244 Handle play-file:[/usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-followed_by_pound.wav] (en:en)
2013-01-25 18:21:01.770904 [DEBUG] switch_ivr_play_say.c:1309 Codec Activated L16@8000hz 1 channels 20ms
2013-01-25 18:21:03.690471 [DEBUG] switch_ivr_play_say.c:1682 done playing file /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-followed_by_pound.wav
2013-01-25 18:21:04.350311 [DEBUG] switch_rtp.c:3809 RTP RECV DTMF 3:800
2013-01-25 18:21:04.790211 [DEBUG] switch_rtp.c:3809 RTP RECV DTMF 0:800
2013-01-25 18:21:05.250108 [DEBUG] switch_rtp.c:3809 RTP RECV DTMF 0:800
2013-01-25 18:21:05.690999 [DEBUG] switch_rtp.c:3809 RTP RECV DTMF 0:800
2013-01-25 18:21:06.049934 [DEBUG] switch_rtp.c:3809 RTP RECV DTMF 3:800
2013-01-25 18:21:06.470825 [DEBUG] switch_rtp.c:3809 RTP RECV DTMF 1:800
2013-01-25 18:21:06.790751 [DEBUG] switch_rtp.c:3809 RTP RECV DTMF 8:800
2013-01-25 18:21:07.191718 [DEBUG] switch_rtp.c:3809 RTP RECV DTMF 4:800
2013-01-25 18:21:08.230423 [DEBUG] switch_rtp.c:3809 RTP RECV DTMF #:800
2013-01-25 18:21:08.230423 [DEBUG] switch_ivr_play_say.c:2034 Test Regex [30003184][\d+]
EXECUTE sofia/external/16502928610@10.191.210.148 transfer(data_dip)
2013-01-25 18:21:08.230423 [DEBUG] switch_ivr.c:1761 (sofia/external/16502928610@10.191.210.148) State Change CS_EXECUTE -> CS_ROUTING
2013-01-25 18:21:08.230423 [DEBUG] switch_core_session.c:1275 Send signal sofia/external/16502928610@10.191.210.148 [BREAK]
2013-01-25 18:21:08.230423 [DEBUG] switch_core_session.c:823 Send signal sofia/external/16502928610@10.191.210.148 [BREAK]
2013-01-25 18:21:08.230423 [NOTICE] switch_ivr.c:1767 Transfer sofia/external/16502928610@10.191.210.148 to XML[data_dip@public]
2013-01-25 18:21:08.230423 [DEBUG] switch_core_state_machine.c:477 (sofia/external/16502928610@10.191.210.148) State EXECUTE going to sleep
2013-01-25 18:21:08.230423 [DEBUG] switch_core_state_machine.c:415 (sofia/external/16502928610@10.191.210.148) Running State Change CS_ROUTING
2013-01-25 18:21:08.230423 [DEBUG] switch_channel.c:1960 (sofia/external/16502928610@10.191.210.148) Callstate Change ACTIVE -> RINGING
2013-01-25 18:21:08.230423 [DEBUG] switch_core_state_machine.c:470 (sofia/external/16502928610@10.191.210.148) State ROUTING
2013-01-25 18:21:08.230423 [DEBUG] mod_sofia.c:149 sofia/external/16502928610@10.191.210.148 SOFIA ROUTING
2013-01-25 18:21:08.230423 [DEBUG] switch_core_state_machine.c:117 sofia/external/16502928610@10.191.210.148 Standard ROUTING
2013-01-25 18:21:08.230423 [INFO] mod_dialplan_xml.c:497 Processing dev7jptest#16502928610#X <16502928610>->data_dip in context public
Dialplan: sofia/external/16502928610@10.191.210.148 parsing [public->unloop] continue=false
Dialplan: sofia/external/16502928610@10.191.210.148 Regex (PASS) [unloop] ${unroll_loops}(true) =~ /^true$/ break=on-false
Dialplan: sofia/external/16502928610@10.191.210.148 Regex (FAIL) [unloop] ${sip_looped_call}() =~ /^true$/ break=on-false
Dialplan: sofia/external/16502928610@10.191.210.148 parsing [public->outside_call] continue=true
Dialplan: sofia/external/16502928610@10.191.210.148 Absolute Condition [outside_call]
Dialplan: sofia/external/16502928610@10.191.210.148 Action set(outside_call=true)
Dialplan: sofia/external/16502928610@10.191.210.148 Action export(RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)})
Dialplan: sofia/external/16502928610@10.191.210.148 parsing [public->call_debug] continue=true
Dialplan: sofia/external/16502928610@10.191.210.148 Regex (FAIL) [call_debug] ${call_debug}(false) =~ /^true$/ break=never
Dialplan: sofia/external/16502928610@10.191.210.148 parsing [public->public_extensions] continue=false
Dialplan: sofia/external/16502928610@10.191.210.148 Regex (FAIL) [public_extensions] destination_number(data_dip) =~ /^(10[01][0-9])$/ break=on-false
Dialplan: sofia/external/16502928610@10.191.210.148 parsing [public->public_did] continue=false
Dialplan: sofia/external/16502928610@10.191.210.148 Regex (FAIL) [public_did] destination_number(data_dip) =~ /^(5551212)$/ break=on-false
Dialplan: sofia/external/16502928610@10.191.210.148 parsing [public->9010] continue=false
Dialplan: sofia/external/16502928610@10.191.210.148 Regex (FAIL) [9010] destination_number(data_dip) =~ /^(9010)$/ break=on-false
Dialplan: sofia/external/16502928610@10.191.210.148 parsing [public->Callidus_OnDemand_IVR] continue=false
Dialplan: sofia/external/16502928610@10.191.210.148 Regex (FAIL) [Callidus_OnDemand_IVR] destination_number(data_dip) =~ /^(9005)$/ break=on-false
Dialplan: sofia/external/16502928610@10.191.210.148 parsing [public->Callidus_OnPremise_IVR] continue=false
Dialplan: sofia/external/16502928610@10.191.210.148 Regex (FAIL) [Callidus_OnPremise_IVR] destination_number(data_dip) =~ /^(9006)$/ break=on-false
Dialplan: sofia/external/16502928610@10.191.210.148 parsing [public->MY TEST] continue=false
Dialplan: sofia/external/16502928610@10.191.210.148 Regex (FAIL) [MY TEST] destination_number(data_dip) =~ /8027/ break=on-false
Dialplan: sofia/external/16502928610@10.191.210.148 parsing [public->data dip] continue=false
Dialplan: sofia/external/16502928610@10.191.210.148 Regex (PASS) [data dip] destination_number(data_dip) =~ /^data_dip$/ break=on-false
Dialplan: sofia/external/16502928610@10.191.210.148 Action pre_answer()
Dialplan: sofia/external/16502928610@10.191.210.148 Action lua(callidus_get_customer_info.lua ${case_number} OnDemand)
Dialplan: sofia/external/16502928610@10.191.210.148 Action answer()
2013-01-25 18:21:08.230423 [DEBUG] switch_core_state_machine.c:167 (sofia/external/16502928610@10.191.210.148) State Change CS_ROUTING -> CS_EXECUTE
2013-01-25 18:21:08.230423 [DEBUG] switch_core_session.c:1275 Send signal sofia/external/16502928610@10.191.210.148 [BREAK]
2013-01-25 18:21:08.230423 [DEBUG] switch_core_state_machine.c:470 (sofia/external/16502928610@10.191.210.148) State ROUTING going to sleep
2013-01-25 18:21:08.230423 [DEBUG] switch_core_state_machine.c:415 (sofia/external/16502928610@10.191.210.148) Running State Change CS_EXECUTE
2013-01-25 18:21:08.230423 [DEBUG] switch_channel.c:1962 (sofia/external/16502928610@10.191.210.148) Callstate Change RINGING -> ACTIVE
2013-01-25 18:21:08.230423 [DEBUG] switch_core_state_machine.c:477 (sofia/external/16502928610@10.191.210.148) State EXECUTE
2013-01-25 18:21:08.230423 [DEBUG] mod_sofia.c:242 sofia/external/16502928610@10.191.210.148 SOFIA EXECUTE
2013-01-25 18:21:08.230423 [DEBUG] switch_core_state_machine.c:209 sofia/external/16502928610@10.191.210.148 Standard EXECUTE
EXECUTE sofia/external/16502928610@10.191.210.148 set(outside_call=true)
2013-01-25 18:21:08.230423 [DEBUG] mod_dptools.c:1344 sofia/external/16502928610@10.191.210.148 SET [outside_call]=[true]
EXECUTE sofia/external/16502928610@10.191.210.148 export(RFC2822_DATE=Fri, 25 Jan 2013 18:21:08 -0800)
2013-01-25 18:21:08.230423 [DEBUG] switch_channel.c:1118 EXPORT (export_vars) [RFC2822_DATE]=[Fri, 25 Jan 2013 18:21:08 -0800]
EXECUTE sofia/external/16502928610@10.191.210.148 pre_answer()
EXECUTE sofia/external/16502928610@10.191.210.148 lua(callidus_get_customer_info.lua 30003184 OnDemand)
2013-01-25 18:21:08.230423 [DEBUG] mod_curl.c:121 method: get, url: http://vm6devc11.dev.whitepj.net:8080/edsa/object/SupportCase/CaseNumber___SearchStringField%20is%20SC30003184/assigned,Company?agent=dev7jptest~~jp&_type=json
2013-01-25 18:21:14.449993 [DEBUG] mod_curl.c:121 method: get, url: http://vm6devc11.dev.whitepj.net:8080/edsa/object/employee/InternalIdNumber___SearchLongField%20equalTo%20413056/custentity_vcc_agent_id,custentity_vcc_phone_queue_id?agent=dev7jptest~~jp&_type=json
2013-01-25 18:21:20.090845 [DEBUG] mod_curl.c:121 method: get, url: http://dev7jptest:2e3de0389b11796554e2c9dac9717688@vm6devc11.dev.whitepj.net:8080/tstats/rtstats/agent/test.json
2013-01-25 18:21:22.150301 [DEBUG] switch_cpp.cpp:1007 sofia/external/16502928610@10.191.210.148 destroy/unlink session from object
EXECUTE sofia/external/16502928610@10.191.210.148 answer()
2013-01-25 18:21:22.150301 [NOTICE] switch_core_state_machine.c:262 sofia/external/16502928610@10.191.210.148 has executed the last dialplan instruction, hanging up.
2013-01-25 18:21:22.150301 [DEBUG] switch_channel.c:2941 (sofia/external/16502928610@10.191.210.148) Callstate Change ACTIVE -> HANGUP
2013-01-25 18:21:22.150301 [NOTICE] switch_core_state_machine.c:264 Hangup sofia/external/16502928610@10.191.210.148 [CS_EXECUTE] [NORMAL_CLEARING]
2013-01-25 18:21:22.150301 [DEBUG] switch_channel.c:2964 Send signal sofia/external/16502928610@10.191.210.148 [KILL]
2013-01-25 18:21:22.150301 [DEBUG] switch_core_session.c:1275 Send signal sofia/external/16502928610@10.191.210.148 [BREAK]
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:477 (sofia/external/16502928610@10.191.210.148) State EXECUTE going to sleep
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:415 (sofia/external/16502928610@10.191.210.148) Running State Change CS_HANGUP
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:665 (sofia/external/16502928610@10.191.210.148) State HANGUP
2013-01-25 18:21:22.150301 [DEBUG] mod_sofia.c:501 Channel sofia/external/16502928610@10.191.210.148 hanging up, cause: NORMAL_CLEARING
2013-01-25 18:21:22.150301 [DEBUG] mod_sofia.c:550 Sending BYE to sofia/external/16502928610@10.191.210.148
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:48 sofia/external/16502928610@10.191.210.148 Standard HANGUP, cause: NORMAL_CLEARING
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:665 (sofia/external/16502928610@10.191.210.148) State HANGUP going to sleep
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:446 (sofia/external/16502928610@10.191.210.148) State Change CS_HANGUP -> CS_REPORTING
2013-01-25 18:21:22.150301 [DEBUG] switch_core_session.c:1275 Send signal sofia/external/16502928610@10.191.210.148 [BREAK]
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:415 (sofia/external/16502928610@10.191.210.148) Running State Change CS_REPORTING
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:747 (sofia/external/16502928610@10.191.210.148) State REPORTING
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:92 sofia/external/16502928610@10.191.210.148 Standard REPORTING, cause: NORMAL_CLEARING
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:747 (sofia/external/16502928610@10.191.210.148) State REPORTING going to sleep
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:440 (sofia/external/16502928610@10.191.210.148) State Change CS_REPORTING -> CS_DESTROY
2013-01-25 18:21:22.150301 [DEBUG] switch_core_session.c:1275 Send signal sofia/external/16502928610@10.191.210.148 [BREAK]
2013-01-25 18:21:22.150301 [DEBUG] switch_core_session.c:1480 Session 64 (sofia/external/16502928610@10.191.210.148) Locked, Waiting on external entities
2013-01-25 18:21:22.150301 [NOTICE] switch_core_session.c:1498 Session 64 (sofia/external/16502928610@10.191.210.148) Ended
2013-01-25 18:21:22.150301 [NOTICE] switch_core_session.c:1502 Close Channel sofia/external/16502928610@10.191.210.148 [CS_DESTROY]
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:554 (sofia/external/16502928610@10.191.210.148) Callstate Change HANGUP -> DOWN
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:557 (sofia/external/16502928610@10.191.210.148) Running State Change CS_DESTROY
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:567 (sofia/external/16502928610@10.191.210.148) State DESTROY
2013-01-25 18:21:22.150301 [DEBUG] mod_sofia.c:394 sofia/external/16502928610@10.191.210.148 SOFIA DESTROY
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:99 sofia/external/16502928610@10.191.210.148 Standard DESTROY
2013-01-25 18:21:22.150301 [DEBUG] switch_core_state_machine.c:567 (sofia/external/16502928610@10.191.210.148) State DESTROY going to sleep
freeswitch@internal>


On Fri, Jan 25, 2013 at 5:42 PM, Michael Collins <msc@freeswitch.org> wrote:
Well, I did think of one thing that you could try. If it works it would be kind of cute:

Answer the call like you currently do, grab the digits from the caller
Set the transfer_ringback variable to ${hold_music} (or whatever you want them to hear)
Transfer the call to another extension, like this:
<action application="transfer" data="data_dip"/>

Create a new extension like this:

<extension name="data dip">
  <condition field="destination_number" expression="^data_dip$">
    <action application="ring_ready"/> <!-- or maybe pre_answer (?) -->

    <action application="lua" data="get_customer_info.lua ${case_number}"/>
    <action application="answer"/>
    ... do whatever you need to do with the call after the data dip
  </condition>
</extension>

The theory is that the "please hold while we look up your info..." sound is the "transfer ringback" sound. The target extension "data_dip" then "rings" while it's looking up the info and then "answers" after the lookup is complete.

I didn't try it so please remember that the standard disclaimer applies. Let us know if you make any headway on this.

-MC


On Fri, Jan 25, 2013 at 4:32 PM, JP <jaykris@gmail.com> wrote:
MC,
Thanks for the info. Unfortunately outbound event socket application is not an option for me right now. I was wondering if the following "ideas" can be of any use to me( I know I am trying clutch at straws, but hope is eternal :))
1. Use "bgapi". Although on the wiki I only see this used with "originate".
2. Can I use a conference to park the caller there while playing music on another call leg of the conference. Meanwhile can I execute the Lua script :))
3. Can I launch another Lua script from my original one asynchronously?
4. Can I have a start up Lua script running in the background listening for some custom events and I can have the main caller thread generate the custom event and then start playing long music file. Once the background Lua script is done with the data dip, it can just break the music on the other channel.

That's it from me. Someone help me from sinking... please.

Thanks,
-JP


On Fri, Jan 25, 2013 at 4:10 PM, Michael Collins <msc@freeswitch.org> wrote:
The problem you're running into is that you are trying to do two different things inside of the thread that is controlling the call flow. Playing sound files and running Lua scripts are synchronous in this context. This seems more suited for an outbound event socket application. Using the event socket you can control the call while doing other things.

Just curious - does anyone have an ESL example of this kind of thing? The wiki could definitely use this kind of example as it is quite useful. I'll look around and see if I can find anything.

-MC


On Fri, Jan 25, 2013 at 3:00 PM, JP <jaykris@gmail.com> wrote:
Avi,
Thanks for the response. Unfortunately that did not work. This is what I did


    <extension name="MyExtension">
      <condition field="destination_number" expression="9005">
            <action application="answer"/>
            <action application="play_and_get_digits" data="4 16 3 7000 # phrase:MyPrompt phrase:My_invalid_entry case_number \d+" />
            <action application="playback" data="phrase:wait_msg" />
            <action application="sched_broadcast" data="+0 playback::/tmp/WPJ_MUSIC_QUEUE_4.wav"/> 
            <action application="lua" data="get_customer_info.lua ${case_number}" />
       </condition>
    </extension>

The music only plays after the Lua script exits. I played around with the timer value, but that did not help either. Any other ideas?

Thanks
JP


On Fri, Jan 25, 2013 at 1:22 AM, Avi Marcus <avi@avimarcus.net> wrote:
ESL gives you more control, especially to execute things in parallel.
If you want to do it within FS, that's a little more complicated, since most things are sequential.

However, if you use the async APIs, then I think it could work:
1) sched_broadcast -- schedule the playback of your file on the UUID of the channel, for +0, meaning now.
2) run your lua script
3) Then stop (break) the playback on that uuid: break
4) Continue with your execution.

Please wikify your results and let us know how that works out!
-Avi

On Fri, Jan 25, 2013 at 3:34 AM, JP <jaykris@gmail.com> wrote:
I want to do the following...

1. Play a long music file from a dialplan.
2. While the music is playing, I want to launch a Lua script to do some data dip.
3. Once the data is fetched and Lua exits, I want to interrupt the music and continue in the dialplan

How do I do this. Any sample code or pointers would be greatly appreciated.

Thanks

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org