Hi, I'm trying to figure out how to use the command API via XML-RPC. I want to do the two following things one after the other: 1) place a call, and 2) play an audio on the newly created call. The Java code for placing a call (copied from wiki) works fine and is following: XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); XmlRpcClient client = new XmlRpcClient(); config.setServerURL(new URL("http://192.168.50.70:8080/RPC2")); config.setBasicUserName("freeswitch"); config.setBasicPassword("works"); client.setConfig(config); String response= client.execute("freeswitch.api", new Object[] { "originate", "sofia/internal/1003 & park()" }) .toString();
From my understanding the code for playing the audio should be:
client.execute("freeswitch.api", new Object[] { "playback", "32a5e11a-8649-11dd-bb78-fd02030a93ef /var/lib/freeswitch/sounds/hello.wav" }); Unfortunately, the latter doesn't work. I suspect it's because the call has been parked. What is the proper way to address this? Thanks, Klaus. -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx
In this case you wouldn't use XML RPC you would use mod_event_socket. http://wiki.freeswitch.org/wiki/Mod_event_socket#SendMsg telnet localhost 8021 auth ClueCon <enter> <enter> sendmsg 32a5e11a-8649-11dd-bb78-fd02030a93ef call-command: execute execute-app-name: playback execute-app-arg: /var/lib/freeswitch/sounds/hello.wav <enter> <enter> /b On Sep 19, 2008, at 11:51 AM, Klaus Teller wrote:
From my understanding the code for playing the audio should be:
client.execute("freeswitch.api", new Object[] { "playback", "32a5e11a-8649-11dd-bb78-fd02030a93ef /var/lib/freeswitch/sounds/ hello.wav" });
Unfortunately, the latter doesn't work. I suspect it's because the call has been parked. What is the proper way to address this?
Thanks Brian. I have tried to avoid the socket interface; but now it seems i can't avoid it:) Right now, i want to send a message to read non-inband DTMF. Yet, i have troubles finding out which which argument i should pass to execute-app-name. That is, i cannot find the application name for reading non-inband DTMF. Any idea? In essence, I want to do something similar to getDigits(). I'm aware of "start_dtmf". But its description says that it is for inband DTMF only. What is the equivalent method for non-inband? Thanks, Klaus. -------- Original-Nachricht --------
Datum: Fri, 19 Sep 2008 11:59:42 -0500 Von: Brian West <brian@freeswitch.org> An: freeswitch-users@lists.freeswitch.org Betreff: Re: [Freeswitch-users] Using the Command API
In this case you wouldn't use XML RPC you would use mod_event_socket.
http://wiki.freeswitch.org/wiki/Mod_event_socket#SendMsg
telnet localhost 8021
auth ClueCon <enter> <enter>
sendmsg 32a5e11a-8649-11dd-bb78-fd02030a93ef call-command: execute execute-app-name: playback execute-app-arg: /var/lib/freeswitch/sounds/hello.wav <enter> <enter>
/b
On Sep 19, 2008, at 11:51 AM, Klaus Teller wrote:
From my understanding the code for playing the audio should be:
client.execute("freeswitch.api", new Object[] { "playback", "32a5e11a-8649-11dd-bb78-fd02030a93ef /var/lib/freeswitch/sounds/ hello.wav" });
Unfortunately, the latter doesn't work. I suspect it's because the call has been parked. What is the proper way to address this?
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
participants (2)
-
Brian West
-
Klaus Teller