<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>On Mon, 2007-12-10 at 00:38 -0800, jonathan augenstine wrote:
<br>&gt; I am trying to put together a prototype app for Freeswitch using the<br>&gt; mod_java interface, I am hitting a deadend and I need some guidance.<br>&gt;<br>&gt; What I want to do is to answer an incoming call (endpoint 1), play a
<br>&gt; prompt to that call, and bridge that call to another endpoint<br>&gt; (endpoint 2). &nbsp;After the second endpoint (endpoint 2) disconnects, I<br>&gt; want to park that call, originate a call to another endpoint (endpoint
<br>&gt; 3), play a prompt to endpoint 3, and then bridge endpoint 3 to a new<br>&gt; endpoint (endpoint 4). &nbsp;After endpoint 4 hangs up, I want to bridge<br>&gt; endpoint 1 and endpoint 3. &nbsp;Then main issue I keep running into is
<br>&gt; that in the dialplan and in mod_java, calls appear to block, so that<br>&gt; it has blocked me from a solution.<br><br></div>How do calls &quot;block&quot;? Use a remote debugger and see where it happens.</blockquote>
<div><br>If I run the following code:<br>&nbsp;<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session = new JavaSession(sessionUuid);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; freeswitch.console_log(&quot;notice&quot;, &quot;STARTED!!!\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.streamFile
(&quot;/usr/local/freeswitch/sounds/intro.wav&quot;, 0);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.execute(&quot;bridge&quot;, &quot;sofia/gateway/[gatewayname]/3237773456&quot;);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; freeswitch.console_log(&quot;notice&quot;, &quot;COMPLETED!!!\n&quot;);
<br><br>I do not see the &quot;COMPLETED!!!&quot; console message until one of the callers from the &quot;bridge&quot; hangs up.&nbsp; The session.execute(&quot;bridge&quot;,.....) call blocks.<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>&gt; My first question is, can you do this with the mod_java interface? &nbsp;If<br>&gt; so, how? &nbsp;Secondly, if it is not possible then do you need to use the<br>&gt; event_socket interface to accomplish this app? &nbsp;Thank you.
<br><br></div>When there is no other function that does the job, try the execute()<br>method in mod_java. Event sockets can probably do the same, but I&#39;ve<br>found them harder to work with (don&#39;t know if there are any APIs that
<br>make it easier), and since they cost 2 sockets and probably 1 thread per<br>call and if on the same machine double the number of context switches,<br>they are more resource intensive too.</blockquote><div><br>As illustrated above I am using the execute.
<br>&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br>&gt; Best Regards,<br>&gt; Jonathan<br>&gt;<br>&gt; _______________________________________________
<br>&gt; Freeswitch-users mailing list<br>&gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users
</a><br>&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><br>Damjan<br><br><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></blockquote></div><br>