Hi again.<div><br></div><div>I'm having a little problem with the Java ESL.</div><div><br></div><div>I can do some basic things like answer the call, subscribe to events, put music in the caller... Thought I have som questions about API commands.</div>
<div><br></div><div>The flow right now in my program is this one:</div><div><br></div><div><ul><li>I begin listenning at port 8084 for ESL events</li><li><meta http-equiv="content-type" content="text/html; charset=utf-8">If I receive an event with the name "channel_data" I begin the iteration</li>
<li>I answer the call with <font class="Apple-style-span" color="#3333ff"><i>sendMsg, addcallcommand("execute") and addExecuteAppName("answer");</i></font></li><li>I subscribe to all events for debuging, I just use <i><font class="Apple-style-span" color="#3333ff">EslMessage response = sendSyncSingleLineCommand(channel, "event text all");</font></i></li>
<li>I put a tone on the caller with <meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color: rgb(51, 51, 255); "><i>sendMsg, addcallcommand("execute") and addExecuteAppName("playback");</i></span></li>
<li>Now here is a tricky part, I send a petition with HttpURLConnection to an APP server, this server is the one that controls the C2DM stuff, he answers me when he sends the push and I continue the flow, but still have to wait for the legB to connect to the freeswitch server</li>
<li>I have to control when the legB gets connected to freeswitch, this is something i have to work on, i don't want to be making continuous requests to freeswitch to avoid overloading, so right now I assume legB is connected by default.</li>
<li>It's time to originate the call, so I send <meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color: rgb(51, 51, 255); "><i>sendMsg, addcallcommand("execute"), addExecuteAppName("set") and addExecuteAppArg("{ignore_early_media='true'}sofia/internal/1002%10.166.108.139");</i></span> . <meta http-equiv="content-type" content="text/html; charset=utf-8"><i>I'm using a default destiny for testing</i></li>
<li>I have just tested that this also works <i><font class="Apple-style-span" color="#3333ff">EslMessage response = sendSyncSingleLineCommand(channel, "api originate {ignore_early_media='true'}sofia/internal/1002%10.166.108.139"); </font></i></li>
<li>And finally I bridge the call with <font class="Apple-style-span" color="#3333ff">SendMsg, addCallCommand("execute"), addExecuteAppName("bridge"), addExecuteAppArg("sofia/internal/1002%10.166.108.139") and addEventLock();</font></li>
</ul></div><div>This works well, but right now my major issue is knowing when the legB gets connected to freeswitch so I can begin originating the call, but I have some questions that I would like to know the answer too:</div>
<div><br></div><div><ul><li>The execute messages are for APP so they work like in the dialplan <action> field, I saw somewhere that to see the complete list one should look in the dialplan.xml, but I haven't found anything about a complete list :S</li>
<li>Things can be accomplished with API calls too, but I just dont get why I have to use "api" before "originate" to make a call, but not needing it for the events, it's a little confusing to use API commands like this, is there any simpler way to do it?</li>
<li>This makes my last question, is there any way to make freeswitch tell me when someone registers in the server or do I need to be continuosly asking freeswith with an API command if it is connected</li></ul><div><br></div>
</div><div>Thinks are going well, I have to begin working with the android client next to be able to process the C2DM messages, right now im using a default voip client.</div><div><br></div><div><br>Sorry for the long post and thanks for your attention.</div>
<div><br></div><div>Regards</div><div><br></div><div>Jose</div><div><br></div><div>P.S: Again, thanks to davidv for making possible the use of a Java ESL client :)</div><div><br></div><div><br><div class="gmail_quote">2011/7/11 Nacho <span dir="ltr"><<a href="mailto:leucaruth@gmail.com">leucaruth@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Cool, thanks for the tip David, I'm using your library and have it working.<div><br>The wiki should advice about the SWIGed library and it's problems with Java and outbound connections.</div>
<div><br></div><div>In a few days I will have news about the my progress.</div>
<div><br></div><div>Regards,</div><div><br></div><div>Jose</div><div><div><div></div><div class="h5"><br><div class="gmail_quote">2011/7/11 david varnes <span dir="ltr"><<a href="mailto:david.varnes@gmail.com" target="_blank">david.varnes@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Jose,<br>
<br>
If you want to use Java and ESL there are other alternatives<br>
than the SWIGed library.<br>
<br>
<a href="http://wiki.freeswitch.org/wiki/Java_ESL" target="_blank">http://wiki.freeswitch.org/wiki/Java_ESL</a><br>
<br>
I maintain the one here <a href="http://wiki.freeswitch.org/wiki/Java_ESL_Client" target="_blank">http://wiki.freeswitch.org/wiki/Java_ESL_Client</a><br>
<br>
I have a few pending changes that I want to commit for a new<br>
release, but the existing release is stable.<br>
<br>
hope this helps<br>
davidv<br>
<div><div></div><div><br>
On 11 July 2011 00:12, Nacho <<a href="mailto:leucaruth@gmail.com" target="_blank">leucaruth@gmail.com</a>> wrote:<br>
> I just noticed short before you answered :).<br>
> I have been reading it and I found it very interesting, but I have found a<br>
> problem in Java.<br>
> The constructor for an Outbound connection requires the File Descriptor (an<br>
> Int parameter) of the listening socket to create the ESL object, but as far<br>
> as I know, Java doesn't allow to get the int value of a File Descriptor from<br>
> a Socket. This would be veary easy to achieve in C, but I have no found any<br>
> means to get this to work with Java in Linux (Windows is out of the<br>
> question).<br>
> I tried to see the source code of the ESL client to see how it uses the int<br>
> value, but as I suspected is C code wrapped with SWIG. I have thought about<br>
> other ways to work with it, like using the FileDescriptor class in java and<br>
> Reflection, but I have not found any way to get the desired int value, so<br>
> i'm stuck about what to do right now.<br>
> Any ideas? if the constructor requires the int value of the File Descriptor<br>
> means that there is a way to get it, doesn't it?<br>
> Regards,<br>
> Jose<br>
><br>
> 2011/7/7 Kristian Kielhofner <<a href="mailto:kris@kriskinc.com" target="_blank">kris@kriskinc.com</a>><br>
>><br>
>> <a href="http://wiki.freeswitch.org/wiki/Event_Socket_Library" target="_blank">http://wiki.freeswitch.org/wiki/Event_Socket_Library</a><br>
>><br>
>> On Thu, Jul 7, 2011 at 7:35 AM, Nacho <<a href="mailto:leucaruth@gmail.com" target="_blank">leucaruth@gmail.com</a>> wrote:<br>
>> > Hi again<br>
>> > Im doing as Kristian suggested, at first is an easier solution that<br>
>> > making a<br>
>> > module.<br>
>> > I created a plan that redirects calls to a local port where I will do<br>
>> > the<br>
>> > testings with the server that will work with that call.<br>
>> > The call is parked and the connection is stablished as I can see with<br>
>> > netcat, so I was thinking about making a program with C or Java that<br>
>> > will<br>
>> > become the custom server. The problem is that I don't find info about<br>
>> > the<br>
>> > structure of the packages I'll receive from Freeswitch, how to deal with<br>
>> > them or even how can I send orders to freeswitch.<br>
>> > Any suggestions about where I could find some info about it would be<br>
>> > kindly<br>
>> > appreciated.<br>
>> > Regards,<br>
>> > Jose.<br>
>> > 2011/7/6 Robert-iPhone <<a href="mailto:rhuddleston@gmail.com" target="_blank">rhuddleston@gmail.com</a>><br>
>> >><br>
>> >> I have interest too! Considering mwi / voicemail push for apple<br>
>> >><br>
>> >> Sent from my iPhone<br>
>> >><br>
>> >> On Jul 5, 2011, at 5:49 PM, Anthony Minessale<br>
>> >> <<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>> wrote:<br>
>> >><br>
>> >> > it can be left out of FS code but still part of contrib if an<br>
>> >> > external<br>
>> >> > solution is developed.<br>
>> >> ><br>
>> >> ><br>
>> >> > On Tue, Jul 5, 2011 at 1:20 PM, Kristian Kielhofner<br>
>> >> > <<a href="mailto:kris@kriskinc.com" target="_blank">kris@kriskinc.com</a>><br>
>> >> > wrote:<br>
>> >> >> Jose,<br>
>> >> >><br>
>> >> >> Whether it's C2DM or APNS (Apple) this functionality is best left<br>
>> >> >> out of FreeSWITCH. FreeSWITCH has plenty of other existing means<br>
>> >> >> (XML_CURL, socket, etc) to drive dynamic call functionality and<br>
>> >> >> interact with other technologies.<br>
>> >> >><br>
>> >> >> How do you ask? An imcoming call to FreeSWITCH could hit static<br>
>> >> >> dialplan and execute a socket connection to some other custom<br>
>> >> >> server.<br>
>> >> >> This server could tell FreeSWITCH to do something (play media,<br>
>> >> >> ringback, messages, whatever) while it sends a PUSH (via C2DM or<br>
>> >> >> APNS,<br>
>> >> >> for example).<br>
>> >> >><br>
>> >> >> One could implement such a socket program easily. It can be<br>
>> >> >> extended and maintained separately as new push technologies become<br>
>> >> >> available.<br>
>> >> >><br>
>> >> >> On Mon, Jul 4, 2011 at 7:48 AM, Nacho <<a href="mailto:leucaruth@gmail.com" target="_blank">leucaruth@gmail.com</a>> wrote:<br>
>> >> >>> Hello all.<br>
>> >> >>> My name is Jose. This is my first post here. I joined the list<br>
>> >> >>> because<br>
>> >> >>> I was<br>
>> >> >>> wondering about developing a feature for Freeswitch and I would<br>
>> >> >>> like<br>
>> >> >>> to know<br>
>> >> >>> your opinion.<br>
>> >> >>> The idea is about making a non-persistent client for cell phones<br>
>> >> >>> that<br>
>> >> >>> works<br>
>> >> >>> with PUSH technology (C2DM and Android for example). These clients<br>
>> >> >>> wouldn't<br>
>> >> >>> be connected to the Freeswitch server at first, but if there is an<br>
>> >> >>> incoming<br>
>> >> >>> call, the Freeswitch server would send a PUSH message to these<br>
>> >> >>> clients, the<br>
>> >> >>> client would process it and, if accepted by the user, the client<br>
>> >> >>> would<br>
>> >> >>> awake, connect to Freeswitch and then receive the the call invite<br>
>> >> >>> message<br>
>> >> >>> and accept it automatically.<br>
>> >> >>> I don't know if this idea is plausible due to the real time<br>
>> >> >>> restrictions we<br>
>> >> >>> have to face in phone calls. If the delay introduced by C2DM<br>
>> >> >>> delivery<br>
>> >> >>> is<br>
>> >> >>> high, the waiting time for the caller is probably something that he<br>
>> >> >>> isn't<br>
>> >> >>> willing to accept in order to get his call answered.<br>
>> >> >>> Another question is about the battery life time it would save<br>
>> >> >>> because<br>
>> >> >>> the<br>
>> >> >>> application woulnd't need to be answering the "still alive" ACKS<br>
>> >> >>> from<br>
>> >> >>> Freeswitch.<br>
>> >> >>> I'm new in freeswitch developing and still learning about it, but<br>
>> >> >>> I'm<br>
>> >> >>> really<br>
>> >> >>> interested in this, so any help would be kindly appreciated.<br>
>> >> >>> --<br>
>> >> >>> Aquellos que hablan son esclavos de sus palabras y los que callan<br>
>> >> >>> dueńos de<br>
>> >> >>> su silencio.<br>
>> >> >>><br>
>> >> >>> _______________________________________________<br>
>> >> >>> Join us at ClueCon 2011, Aug 9-11, Chicago<br>
>> >> >>> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
>> >> >>><br>
>> >> >>> FreeSWITCH-dev mailing list<br>
>> >> >>> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
>> >> >>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>> >> >>><br>
>> >> >>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
>> >> >>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> >> >>><br>
>> >> >>><br>
>> >> >><br>
>> >> >><br>
>> >> >><br>
>> >> >> --<br>
>> >> >> Kristian Kielhofner<br>
>> >> >><br>
>> >> >> _______________________________________________<br>
>> >> >> Join us at ClueCon 2011, Aug 9-11, Chicago<br>
>> >> >> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
>> >> >><br>
>> >> >> FreeSWITCH-dev mailing list<br>
>> >> >> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
>> >> >> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>> >> >><br>
>> >> >> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
>> >> >> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> >> >><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > --<br>
>> >> > Anthony Minessale II<br>
>> >> ><br>
>> >> > FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
>> >> > ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
>> >> > Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br>
>> >> ><br>
>> >> > AIM: anthm<br>
>> >> > <a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
>> >> > GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
>> >> > IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
>> >> ><br>
>> >> > FreeSWITCH Developer Conference<br>
>> >> > <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
>> >> > <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
>> >> > pstn:+19193869900<br>
>> >> ><br>
>> >> > _______________________________________________<br>
>> >> > Join us at ClueCon 2011, Aug 9-11, Chicago<br>
>> >> > <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
>> >> ><br>
>> >> > FreeSWITCH-dev mailing list<br>
>> >> > <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
>> >> > <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>> >> ><br>
>> >> > UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
>> >> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> >><br>
>> >> _______________________________________________<br>
>> >> Join us at ClueCon 2011, Aug 9-11, Chicago<br>
>> >> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
>> >><br>
>> >> FreeSWITCH-dev mailing list<br>
>> >> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
>> >> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>> >> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
>> >> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > Aquellos que hablan son esclavos de sus palabras y los que callan dueńos<br>
>> > de<br>
>> > su silencio.<br>
>> ><br>
>> > _______________________________________________<br>
>> > Join us at ClueCon 2011, Aug 9-11, Chicago<br>
>> > <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
>> ><br>
>> > FreeSWITCH-dev mailing list<br>
>> > <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
>> > <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>> > UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
>> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Kristian Kielhofner<br>
>><br>
>> _______________________________________________<br>
>> Join us at ClueCon 2011, Aug 9-11, Chicago<br>
>> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
>><br>
>> FreeSWITCH-dev mailing list<br>
>> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
><br>
> --<br>
> Aquellos que hablan son esclavos de sus palabras y los que callan dueńos de<br>
> su silencio.<br>
><br>
> _______________________________________________<br>
> Join us at ClueCon 2011, Aug 9-11, Chicago<br>
> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
><br>
> FreeSWITCH-dev mailing list<br>
> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
</div></div>david varnes<br>
<br>
e: <a href="mailto:david.varnes@gmail.com" target="_blank">david.varnes@gmail.com</a><br>
p: +61 404 925 633<br>
</blockquote></div><br><br clear="all"><br></div></div>-- <br><div class="im">Aquellos que hablan son esclavos de sus palabras y los que callan dueńos de su silencio.<br>
</div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Aquellos que hablan son esclavos de sus palabras y los que callan dueńos de su silencio.<br>
</div>