Hello!<div><br></div><div>Thank you for your suggestions!</div><div><br></div><div>I took a look at bind_meta_app in the wiki, and although it might be possible to do what I need, I think the best route will be to re-write my app to use mod_event_socket. There are some other feature requests that will be easier to support that way. I think I&#39;m at the limit of what can be done with a Lua script.</div>
<div><br></div><div><div><a href="http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_bind_meta_app">http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_bind_meta_app</a></div><div><a href="http://wiki.freeswitch.org/wiki/Event_Socket">http://wiki.freeswitch.org/wiki/Event_Socket</a></div>
</div><div><br></div><div>I&#39;ll also be placing an order for the FreeSWITCH book!</div><div><br></div><div>Thanks again!<br><br></div><div>Mike van Lammeren</div><div><br></div><div><br><div class="gmail_quote">On Wed, Oct 6, 2010 at 7:44 PM, Michael Collins <span dir="ltr">&lt;<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">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"><div><div></div><div class="h5">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>
</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div class="h5">

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></div></div>_______________________________________________<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>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">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></div>