<div dir="ltr">Borris, you are great. Actually, this code worked like charm, with no changes.<br>I will edit the xmlrpc-example wiki page to include the Java example, shortly.<br><br>Thanks once again.<br><br><div class="gmail_quote">
On Fri, Aug 22, 2008 at 6:26 PM, Boris Krivonog <span dir="ltr"><<a href="mailto:boris.krivonog@gmail.com">boris.krivonog@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The easiest way would be using XML-RPC<br>
(<a href="http://wiki.freeswitch.org/wiki/Freeswitch_XML-RPC" target="_blank">http://wiki.freeswitch.org/wiki/Freeswitch_XML-RPC</a>), with Apache<br>
XML-RPC (<a href="http://ws.apache.org/xmlrpc/client.html" target="_blank">http://ws.apache.org/xmlrpc/client.html</a>) libraries the code<br>
would look something like:<br>
<br>
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();<br>
config.setServerURL( new URL("http://<freeswitchip>:8080/RPC2") );<br>
config.setBasicPassword("freeswitch");<br>
config.setBasicUserName("works");<br>
XmlRpcClient client = new XmlRpcClient();<br>
client.setConfig(config);<br>
Object[] params = new Object[]{ "originate",<br>
"sofia/gateway/gizmo2/01160176xxxxxx &park()" };<br>
client.execute( "freeswitch.api", params );<br>
<br>
Since the code above is written "from my memory", take it for<br>
illustrative purpose only, however you should get the idea.<br>
<br>
If you need more control over the call(s), consider using<br>
<a href="http://wiki.freeswitch.org/wiki/Event_Socket" target="_blank">http://wiki.freeswitch.org/wiki/Event_Socket</a>.<br>
<br>
Hope this helps,<br>
Boris<br>
<br>
<br>
On Fri, Aug 22, 2008 at 12:24 PM, Boris Krivonog<br>
<<a href="mailto:boris.krivonog@gmail.com">boris.krivonog@gmail.com</a>> wrote:<br>
><br>
> The easiest way would be using XML-RPC (<a href="http://wiki.freeswitch.org/wiki/Freeswitch_XML-RPC" target="_blank">http://wiki.freeswitch.org/wiki/Freeswitch_XML-RPC</a>), with Apache XML-RPC (<a href="http://ws.apache.org/xmlrpc/client.html" target="_blank">http://ws.apache.org/xmlrpc/client.html</a>) libraries the code would look something like:<br>
><br>
> XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();<br>
> config.setServerURL( new URL("http://<freeswitchip>:8080/RPC2") );<br>
> XmlRpcClient client = new XmlRpcClient();<br>
> client.setConfig(config);<br>
> Object[] params = new Object[]{ "originate", "sofia/gateway/gizmo2/01160176xxxxxx &park()" };<br>
> client.execute( "freeswitch.api", params );<br>
><br>
> Since the code above is written "from my memory",<br>
<div><div></div><div class="Wj3C7c">><br>
><br>
><br>
> Adeel Ansari wrote:<br>
><br>
> Hi All,<br>
><br>
> I had success in bridging a session, using my Java Program as a hook, and manage to connect one mobile phone to another. It goes like below.<br>
><br>
> ===<br>
> --> originate sofia/gateway/gizmo2/01160176xxxxxx &java(net.digitalapps.freeswitch.CallTest)<br>
> ===<br>
><br>
> In this case, freeswitch call my Java program. Now, My intension is to not use console at all, instead use my java program to originate a session in freeswitch and then bridge the session. So, call freeswitch from my program, not the other way around.<br>
><br>
> Is it possible? Need suggestions in any case. I mean if I need to come up with my own client. Actually, I was looking JAIN-SIP to achieve this. But then thought of asking your suggestions. With JAIN I might go like this, place a call, hit the dial plan invoke my Java Hook Program and bridge the call. But I am afraid that it might connect my client with the mobile phone, not one phone to another.<br>
><br>
> Thanks.<br>
><br>
> --<br>
> Best,<br>
> Adeel Ansari<br>
><br>
> <a href="http://www.linkedin.com/in/adeelansari" target="_blank">http://www.linkedin.com/in/adeelansari</a><br>
><br>
</div></div><div><div></div><div class="Wj3C7c">> ________________________________<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>
<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><br clear="all"><br>-- <br>Best,<br>Adeel Ansari<br><br><a href="http://www.linkedin.com/in/adeelansari">http://www.linkedin.com/in/adeelansari</a><br>
</div>