Damjan,<br><br>What I want to do is the following:<br><br>incoming call<br>- play a prompt<br>- bridge incoming to endpoint 1<br>- endpoint 1 hangs up<br>- park the incoming call<br><br>originate call to endpoint 2<br>- play a prompt to endpoint 2
<br>- bridge endpoint 2 to endpoint 3<br>- endpoint 3 hangs up<br>- bridge incoming call to endpoint 2<br><br>The details on how to accomplish this with mod_java are eluding me. Every approach I have attempted I have encountered roadblocks of either hitting execute blocking what I need to do or not having the right info (what needs to be passed to originate or how to play a prompt to endpoint2 or bridge to endpoint 3). I am getting stuck on the details and cannot find the docs to clarify.
<br><br>Jonathan<br><br><br><div class="gmail_quote">On Dec 10, 2007 10:05 PM, Damjan Jovanovic <<a href="mailto:damjan@ecntelecoms.com">damjan@ecntelecoms.com</a>> wrote:<br><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">X-ECN Telecoms-MailScanner-Information: Contact ECN Telecoms<br>X-ECN Telecoms-MailScanner: Found to be clean<br>X-ECN Telecoms-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,<br></div> score=-
101.233, required 6, autolearn=not spam, ALL_TRUSTED -1.80,<br> AWL 3.17, BAYES_00 -2.60, USER_IN_WHITELIST -100.00)<br><div class="Ih2E3d">X-ECN Telecoms-MailScanner-From: <a href="mailto:damjan@ecntelecoms.com">damjan@ecntelecoms.com
</a><br>X-Spam-Status: No<br><br></div><div><div></div><div class="Wj3C7c">On Mon, 2007-12-10 at 08:53 -0800, jonathan augenstine wrote:<br>><br>><br>><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<br>> using the<br>> > mod_java interface, I am hitting a deadend and I need some<br>> guidance.<br>> >
<br>> > What I want to do is to answer an incoming call (endpoint<br>> 1), play a<br>> > prompt to that call, and bridge that call to another<br>> endpoint<br>> > (endpoint 2). After the second endpoint (endpoint 2)
<br>> disconnects, I<br>> > want to park that call, originate a call to another endpoint<br>> (endpoint<br>> > 3), play a prompt to endpoint 3, and then bridge endpoint 3<br>
> to a new<br>> > endpoint (endpoint 4). After endpoint 4 hangs up, I want to<br>> bridge<br>> > endpoint 1 and endpoint 3. Then main issue I keep running<br>> into is
<br>> > that in the dialplan and in mod_java, calls appear to block,<br>> so that<br>> > it has blocked me from a solution.<br>><br>><br>> How do calls "block"? Use a remote debugger and see where it
<br>> happens.<br>><br>> If I run the following code:<br>><br>><br>> session = new JavaSession(sessionUuid);<br>> freeswitch.console_log("notice", "STARTED!!!\n");
<br>> session.streamFile<br>> ("/usr/local/freeswitch/sounds/intro.wav", 0);<br>> session.execute("bridge",<br>> "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<br>> callers from the "bridge" hangs up. The
<br>> session.execute("bridge",.....) call blocks.<br><br></div></div>session.execute() is supposed to block until the application finishes<br>running. I'm not sure why that's a problem, you only want to park the
<br>call after bridge is finished.<br><div><div></div><div class="Wj3C7c"><br>><br>> > My first question is, can you do this with the mod_java<br>> interface? If<br>> > so, how? Secondly, if it is not possible then do you need
<br>> to use the<br>> > event_socket interface to accomplish this app? Thank you.<br>><br>><br>> When there is no other function that does the job, try the<br>> execute()
<br>> method in mod_java. Event sockets can probably do the same,<br>> but I've<br>> found them harder to work with (don't know if there are any<br>> APIs that<br>> make it easier), and since they cost 2 sockets and probably 1
<br>> thread per<br>> call and if on the same machine double the number of context<br>> switches,<br>> they are more resource intensive too.<br>><br>> As illustrated above I am using the execute.
<br>><br>><br>><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>> ><br>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>> ><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>><br></div></div>> _______________________________________________<br><div><div></div><div class="Wj3C7c">> 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></div></div></blockquote></div><br>