<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6000.16705" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px"
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Arial size=2>Guys I made a stupid mistake again</FONT></DIV>
<DIV><FONT face=Arial size=2>guess what - I didn’t specify the port number in
the URL !!!</FONT></DIV>
<DIV><FONT face=Arial size=2>anyways, the code worked</FONT></DIV>
<DIV><FONT face=Arial size=2>the exception was because I was using an older
version of XMLRPC API.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Anyways, Adeel you can modify the Java example on
the wiki with this one. I think this one's better than what you already have
posted there - if you don’t mind that is!</FONT></DIV>
<DIV><FONT face=Arial size=2>I don’t mean to offend you.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks a lot anyways!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,<BR>Gayatri Kulkarni</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>-----<BR>Whenever you find yourself on the side of
the majority, it is time to pause and reflect.<BR></FONT></DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=xtpl.gayatri@gmail.com
href="mailto:xtpl.gayatri@gmail.com">Gayatri Kulkarni</A> </DIV>
<DIV><B>Sent:</B> Tuesday, September 02, 2008 4:29 AM</DIV>
<DIV><B>To:</B> <A title=freeswitch-users@lists.freeswitch.org
href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</A>
</DIV>
<DIV><B>Subject:</B> Re: [Freeswitch-users] How to originate a session from
outside</DIV></DIV></DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hey Adeel,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Remember, <STRONG><FONT face=Courier>originate
sofia/internal/1001 &bridge(sofia/internal/1003</FONT></STRONG><FONT
face="Times New Roman" size=3>) had worked the other day?</FONT></FONT></DIV>
<DIV> </DIV>
<DIV>Well, now it isn't working!</DIV>
<DIV>FS is still saying No_ROUTE_DESTINATION</DIV>
<DIV><FONT face=Arial size=2>And, it is also giving me a
SAXParseException!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>You want to have a look at the code?</FONT></DIV>
<DIV><FONT face=Arial size=2>Here it is:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Courier size=2>/**<BR> * <BR> */<BR>package
localcall;</FONT></DIV>
<DIV><FONT face=Courier></FONT> </DIV>
<DIV><FONT face=Courier size=2>import java.lang.String;<BR>import
java.net.*;</FONT></DIV>
<DIV><FONT face=Courier></FONT> </DIV>
<DIV><FONT face=Courier size=2>import
org.apache.xmlrpc.XmlRpcException;<BR>import
org.apache.xmlrpc.client.XmlRpcClient;<BR>import
org.apache.xmlrpc.client.XmlRpcClientConfigImpl;</FONT></DIV>
<DIV><FONT face=Courier></FONT> </DIV>
<DIV><FONT face=Courier size=2>/**<BR> * @author Gayatri
Kulkarni<BR> *<BR> */<BR>public class LocalCall {</FONT></DIV>
<DIV><FONT face=Courier></FONT> </DIV>
<DIV><FONT face=Courier size=2> /**<BR> * <BR>
*/<BR> public LocalCall() {<BR> // TODO Auto-generated
constructor stub<BR> }</FONT></DIV>
<DIV><FONT face=Courier></FONT> </DIV>
<DIV><FONT size=2><FONT face=Courier> public XmlRpcClientConfigImpl
setConfig(){<BR> XmlRpcClientConfigImpl conf = new
XmlRpcClientConfigImpl();<BR> String server = "</FONT><A
href="http://192.168.10.36/RPC2"><FONT
title="http://192.168.10.36/RPC2 CTRL + Click to follow link"
face=Courier>http://192.168.10.36/RPC2</FONT></A><FONT
face=Courier>";<BR> String uname =
"freeswitch";<BR> String pswd = "works";<BR> try
{<BR> URL server_url = new
URL(server);<BR> conf.setServerURL(server_url);<BR> }<BR> catch
(MalformedURLException e){<BR> System.out.println("Cannot
generate server
URL");<BR> }<BR> conf.setBasicPassword(pswd);<BR> conf.setBasicUserName(uname);<BR> <BR> return
(conf);<BR> }<BR> <BR> public void
placeCall(XmlRpcClientConfigImpl conf){<BR> XmlRpcClient rpcClient =
new XmlRpcClient();<BR> String api =
"freeswitch.api";<BR> rpcClient.setConfig(conf);<BR>
Object[] params = new Object[]{
"originate",<BR> "sofia/internal/1001
&bridge(sofia/internal/1002)" };<BR> try
{<BR> rpcClient.execute(api, params
);<BR> }<BR> catch
(XmlRpcException excpn){<BR>
System.out.println("Could not execute service.
\n");<BR>
excpn.printStackTrace();<BR>
}<BR> }</FONT></FONT></DIV>
<DIV><FONT face=Courier></FONT> </DIV>
<DIV><FONT face=Courier size=2> /**<BR> * @param args<BR>
*/<BR> public static void main(String[] args) {<BR> // TODO
Auto-generated method stub<BR> <BR> LocalCall call = new
LocalCall();</FONT></DIV>
<DIV><FONT face=Courier></FONT> </DIV>
<DIV><FONT face=Courier
size=2> call.placeCall(call.setConfig());<BR> }</FONT></DIV>
<DIV><FONT face=Courier></FONT> </DIV>
<DIV><FONT face=Courier size=2>}</FONT></DIV>
<DIV><FONT face=Courier size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have done load mod_xml_rpc on the CLI of
FS.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks a lot,</FONT></DIV>
<DIV><FONT face=Arial size=2>Regards,<BR>Gayatri Kulkarni</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-----<BR>Whenever you find yourself on the side of
the majority, it is time to pause and reflect.<BR></FONT></DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><FONT face=Arial></FONT><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=adeel.gnome@gmail.com
href="mailto:adeel.gnome@gmail.com">Adeel Ansari</A> </DIV>
<DIV><B>Sent:</B> Wednesday, August 27, 2008 1:20 AM</DIV>
<DIV><B>To:</B> <A title=freeswitch-users@lists.freeswitch.org
href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</A>
</DIV>
<DIV><B>Subject:</B> Re: [Freeswitch-users] How to originate a session from
outside</DIV></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT><BR></DIV>
<DIV dir=ltr>Show your program. Further, try the example given in here after
appropriate modification.<BR><A
title="http://wiki.freeswitch.org/wiki/Freeswitch_XML-RPC#Java_Example CTRL + Click to follow link"
href="http://wiki.freeswitch.org/wiki/Freeswitch_XML-RPC#Java_Example">http://wiki.freeswitch.org/wiki/Freeswitch_XML-RPC#Java_Example</A><BR><BR>
<DIV class=gmail_quote>On Wed, Aug 27, 2008 at 3:56 PM, Gayatri Kulkarni <SPAN
dir=ltr><<A
title="mailto:xtpl.gayatri@gmail.com CTRL + Click to follow link"
href="mailto:xtpl.gayatri@gmail.com">xtpl.gayatri@gmail.com</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px"
name="Compose message area" bgcolor="#ffffff">
<DIV><FONT face=Arial size=2>Thanks a lot!</FONT></DIV>
<DIV><FONT face=Arial size=2>it worked - <B><I>but why?</I></B></FONT></DIV>
<DIV><FONT face=Arial size=2>When I did the same thing through the program it
gave me :</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Courier size=2>
<DIV class=Ih2E3d> at
RMIServer.main(RMIServer.java:49)<BR></DIV>Caused
by:<BR>org.xml.sax.<B>SAXParseException</B>: Unknown type:
string<BR> at
org.apache.xmlrpc.parser.RecursiveTypeParserImpl.startElement(Recursi<BR>veTypeParserImpl.java:115)<BR>
at
org.apache.xmlrpc.parser.XmlRpcResponseParser.startElement(XmlRpcResp<BR>onseParser.java:126)<BR>
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startEle<BR>ment(Unknown
Source)<BR> at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scan<BR>StartElement(Unknown
Source)<BR> at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp<BR>l$FragmentContentDriver.next(Unknown
Source)<BR> at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(U<BR>nknown
Source)<BR> at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next<BR>(Unknown
Source)<BR> at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp<BR>l.scanDocument(Unknown
Source)<BR> at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U<BR>nknown
Source)<BR> at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U<BR>nknown
Source)<BR> at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
So<BR>urce)<BR> at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Un<BR>known
Source)<BR> at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p<BR>arse(Unknown
Source)<BR> at
org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStr<BR>eamTransport.java:265)
<DIV class=Ih2E3d><FONT
face=Arial></FONT><BR> at
org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStre<BR></DIV>amTransport.java:216)
<DIV class=Ih2E3d><FONT
face=Arial></FONT><BR> at
org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorke<BR>r.java:53)<BR>
at
org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)<BR>
at
org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)<BR>
at
org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)<BR>
at
RMIServer.makeACall(RMIServer.java:36)<BR>
at RMIServer.main(RMIServer.java:49)</DIV></FONT></DIV>
<DIV style="FONT: 10pt Tahoma; font-size-adjust: none; font-stretch: normal">
<DIV><FONT face=Arial></FONT><BR></DIV>
<DIV
style="BACKGROUND: rgb(245,245,245); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<DIV><B>From:</B> <A title=adeel.gnome@gmail.com
href="mailto:adeel.gnome@gmail.com" target=_blank>Adeel Ansari</A> </DIV>
<DIV><B>Sent:</B> Wednesday, August 27, 2008 12:21 AM</DIV>
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c>
<DIV><B>To:</B> <A title=freeswitch-users@lists.freeswitch.org
href="mailto:freeswitch-users@lists.freeswitch.org"
target=_blank>freeswitch-users@lists.freeswitch.org</A> </DIV>
<DIV><B>Subject:</B> Re: [Freeswitch-users] How to originate a session from
outside</DIV></DIV></DIV></DIV></DIV>
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><BR></DIV>
<DIV dir=ltr>Try this,<BR><FONT face=Arial size=2><FONT
face=Courier><B>originate sofia/internal/1001
&bridge(sofia/internal/1003</B></FONT></FONT>)<BR><BR>Cheers.<BR><BR></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV></DIV></BODY></HTML>