<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>> I am trying to put together a prototype app for Freeswitch using the<br>> mod_java interface, I am hitting a deadend and I need some guidance.<br>><br>> What I want to do is to answer an incoming call (endpoint 1), play a
<br>> prompt to that call, and bridge that call to another endpoint<br>> (endpoint 2). After the second endpoint (endpoint 2) disconnects, I<br>> want to park that call, originate a call to another endpoint (endpoint
<br>> 3), play a prompt to endpoint 3, and then bridge endpoint 3 to a new<br>> endpoint (endpoint 4). After endpoint 4 hangs up, I want to bridge<br>> endpoint 1 and endpoint 3. Then main issue I keep running into is
<br>> that in the dialplan and in mod_java, calls appear to block, so that<br>> it has blocked me from a solution.<br><br></div>How do calls "block"? Use a remote debugger and see where it happens.</blockquote>
<div><br>If I run the following code:<br> <br></div><div> session = new JavaSession(sessionUuid);<br> freeswitch.console_log("notice", "STARTED!!!\n");<br> session.streamFile
("/usr/local/freeswitch/sounds/intro.wav", 0);<br> session.execute("bridge", "sofia/gateway/[gatewayname]/3237773456"); <br> freeswitch.console_log("notice", "COMPLETED!!!\n");
<br><br>I do not see the "COMPLETED!!!" console message until one of the callers from the "bridge" hangs up. The session.execute("bridge",.....) call blocks.<br> </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>> My first question is, can you do this with the mod_java interface? If<br>> so, how? Secondly, if it is not possible then do you need to use the<br>> event_socket interface to accomplish this app? 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've<br>found them harder to work with (don'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> <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>> Best Regards,<br>> Jonathan<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>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>