Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Using the Command API


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
klaus.teller at gmx.net
Guest





PostPosted: Fri Sep 19, 2008 11:54 am    Post subject: [Freeswitch-users] Using the Command API Reply with quote

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();

Quote:
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

_______________________________________________
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
Back to top
brian at freeswitch.org
Guest





PostPosted: Fri Sep 19, 2008 12:02 pm    Post subject: [Freeswitch-users] Using the Command API Reply with quote

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:

Quote:

Quote:
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
Back to top
klaus.teller at gmx.net
Guest





PostPosted: Mon Sep 22, 2008 8:36 am    Post subject: [Freeswitch-users] Using the Command API Reply with quote

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 --------
Quote:
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

Quote:
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:

Quote:

Quote:
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

_______________________________________________
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services