[Freeswitch-users] API info

Gayatri Kulkarni xtpl.gayatri at gmail.com
Tue Sep 2 03:09:43 PDT 2008


Also, how to originate calls between endpoints registered to 2 different FSs??

Thanks a lot in advance,
Regards,
Gayatri Kulkarni

-----
Whenever you find yourself on the side of the majority, it is time to pause and reflect.



From: Gayatri Kulkarni 
Sent: Tuesday, September 02, 2008 2:45 AM
To: freeswitch-users at lists.freeswitch.org 
Subject: API info


Hi all,

Is there a way to find out what all API are accepted through the XML-RPC module and the list of parameters that each API would require?
Is there a way to find out the syntax expected by the XML-RPC module for invoking the API

I tried a code in Java to find out as follows:

<code>
getSipServices(XmlRpcClientConfigImpl conf, PrintStream services_file) {

try {

//create client:

    XmlRpcClient registryClient = new XmlRpcClient(conf.getServerURL());

String url_str = conf.getServerURL().toString();

//create collection

RemoteCollection Switch = new RemoteCollection(registryClient, getUri(url_str));

//actually obtain services:

.services = Switch.getServices();

.props = Switch.getProperties();

.props.list(services_file);

Enumeration prop_enum = props.elements();

System.out.println("--------------Properties----------------");

while (prop_enum.hasMoreElements()){

System.out.println(prop_enum.nextElement());

}

System.out.println("----------------------------------------");


String[] resources = Switch.listResources();

int i = 0;

System.out.println("--------------Resources----------------");

while(i < resources.length){

System.out.println(resources[i]);

}

System.out.println("----------------------------------------");


}

catch (Exception e) { ....}

return (services);

}

</code>

Unfortunately, the it does not return any properties! for resources, it returns an exception: 

java.lang.InstantiationError: org.apache.xmlrpc.XmlRpcRequest 

and services returned are:

    

-----List of available services--------

XPathQueryService

CollectionManagementService

UserManagementService

DatabaseInstanceManager

IndexQueryService

XUpdateQueryService

ValidationService

----------------------------------------

with these services, how do I originate a call from within my application




Regards,
Gayatri Kulkarni

-----
Whenever you find yourself on the side of the majority, it is time to pause and reflect.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080902/ad61aaa6/attachment-0002.html 


More information about the FreeSWITCH-users mailing list