Just curious - would a bind_meta_app call work for you? I ask because you can&#39;t do asynchronous operations like you described when calling scripts from the dialplan. I&#39;m afraid you will need to graduate to ESL. :) Check out ESL and the event socket on the wiki and chapter 9 of the FreeSWITCH book. <br>

<br>Some things you will want to check out:<br>uuid_broadcast (to play media to a channel)<br>the DTMF event (<a href="http://wiki.freeswitch.org/wiki/Event_list#DTMF" target="_blank">http://wiki.freeswitch.org/wiki/Event_list#DTMF</a>)<br>

fs-ivrd (example of a daemon that sits there and connects outbound event socket connects to an ESL script)<br><br>Using the event socket allows total and complete 3rd party control of your sessions. The drawback is the the learning curve. It&#39;s a bit steep but it&#39;s worth it.<br>
<br>-MC<br><br><br><div class="gmail_quote">On Wed, Oct 6, 2010 at 9:18 AM, Mike van Lammeren <span dir="ltr">&lt;<a href="mailto:mike@van.lammeren.net" target="_blank">mike@van.lammeren.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Hello!<div><br></div><div>I&#39;m a huge FreeSWITCH fan and am always amazed at how much I can do with it. I have a Lua script that has been working great, but now have been tasked with enhancing it, and have run into a problem.</div>


<div><br></div><div>I want to be able to play media, detect DTMF and hang up a call after bridging two sessions, but my Lua script blocks on freeswitch.bridge(), and doesn&#39;t resume until one side or the other hangs up.</div>


<div><br></div><div>Here is my problem reduced to a Lua script in its simplest form:</div><div><br></div><blockquote style="margin: 0pt 0pt 0pt 40px; border: medium none; padding: 0px;"><div><font face="&#39;courier new&#39;, monospace">-- first session</font></div>


<div><font face="&#39;courier new&#39;, monospace">session1 = session</font></div><div><font face="&#39;courier new&#39;, monospace">-- call out</font></div><div><font face="&#39;courier new&#39;, monospace">session2 = freeswitch.Session(&quot;{ignore_early_media=true}sofia/gateway/<a href="http://etc.com/" target="_blank">etc.com/</a>&quot; .. phoneNumber)</font></div>


<div><font face="&#39;courier new&#39;, monospace">-- bridge the calls</font></div><div><div><font face="&#39;courier new&#39;, monospace">freeswitch.bridge(session1, session2)</font></div>
</div><div><div><font face="&#39;courier new&#39;, monospace">-- this next line doesn&#39;t execute until after either session 1 or 2 hangs up</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">freeswitch.consoleLog(&quot;info&quot;, &quot;This is a test.\n&quot;)</font></div>


</div></blockquote><div><br></div><div>How can I do an asynchronous bridge, and still be able to play media and detect dtmf afterwards?</div><div><br></div><font color="#888888"><div>Mike van Lammeren</div><div><br></div>


</font><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>