Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[Freeswitch-users] Controlling MOH from a java application


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
hyppolite72 at yahoo.com
Guest





PostPosted: Mon Jul 06, 2009 6:24 pm    Post subject: [Freeswitch-users] Controlling MOH from a java application Reply with quote

Hello, First of all, I would like to thank Anthony, Brian and all the developers for this wonderful piece of software. Very good job. I would like to know how I can start and stop Music On Hold from a JAVA script (using mod_java) similar to the StartMusicOnHold and StopMusicHold functions found in AGI (Asterisk-Java). I am using FreeSWITCH as an IVR server. I would like to be able to put the caller on hold while doing some other stuff. Thanks in advance. Jean-Marc.



Yahoo! Canada Toolbar : Search from anywhere on the web and bookmark your favourite sites. Download it now!
Back to top
brian at freeswitch.org
Guest





PostPosted: Mon Jul 06, 2009 6:28 pm    Post subject: [Freeswitch-users] Controlling MOH from a java application Reply with quote

uuid_hold <uuid>

uuid_hold off <uuid>


These two api's will do it.


/b





On Jul 6, 2009, at 6:20 PM, Jean-Marc Hyppolite wrote:
Quote:
Hello,

First of all, I would like to thank Anthony, Brian and all the developers for this wonderful piece of software. Very good job.

I would like to know how I can start and stop Music On Hold from a JAVA script (using mod_java) similar to the StartMusicOnHold and StopMusicHold functions found in AGI (Asterisk-Java).

I am using FreeSWITCH as an IVR server. I would like to be able to put the caller on hold while doing some other stuff.

Thanks in advance.

Jean-Marc.




Yahoo! Canada Toolbar : Search from anywhere on the web and bookmark your favourite sites. Download it now! _______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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
hyppolite72 at yahoo.com
Guest





PostPosted: Mon Jul 06, 2009 10:23 pm    Post subject: [Freeswitch-users] Controlling MOH from a java application Reply with quote

Hello Brian, Thank you for your quick answer. I tried the two API functions but with no result. The caller is not able to hear any music. But, when I use two extensions (one calling the other), MOH does work. My code on the JAVA side (for test purposes) session.answer();session.sleep(500); session.execute("eval", "uuid_hold " + session.get_uuid()); java_function(); // lasts 30 to 40 seconds session.execute("eval", "uuid_hold off " + session.get_uuid()); session.sleep(500); session.hangup(); Thanks for the help. Jean-Marc. --- On Mon, 7/6/09, Brian West <brian@freeswitch.org> wrote: From: Brian West <brian@freeswitch.org>Subject: Re: [Freeswitch-users] Controlling MOH from a java applicationTo: freeswitch-users@lists.freeswitch.orgReceived: Monday, July 6, 2009, 7:27 PM uuid_hold <uuid> uuid_hold off <uuid> These two api's will do it. /b On Jul 6, 2009, at 6:20 PM, Jean-Marc Hyppolite wrote: Hello, First of all, I would like to thank Anthony, Brian and all the developers for this wonderful piece of software. Very good job. I would like to know how I can start and stop Music On Hold from a JAVA script (using mod_java) similar to the StartMusicOnHold and StopMusicHold functions found in AGI (Asterisk-Java). I am using FreeSWITCH as an IVR server. I would like to be able to put the caller on hold while doing some other stuff. Thanks in advance. Jean-Marc. Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)http://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org-----Inline Attachment Follows----- _______________________________________________Freeswitch-users mailing listFreeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)http://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
All new Yahoo! Mail - Get a sneak peak at messages with a handy reading pane.
Back to top
anthony.minessale at g...
Guest





PostPosted: Tue Jul 07, 2009 3:40 pm    Post subject: [Freeswitch-users] Controlling MOH from a java application Reply with quote

FSAPI commands are accessed via the API obj

api = new API();

api.execute("uuid_hold", session.get_uuid());
...
api.execute("uuid_hold", "off " + session.get_uuid());



On Mon, Jul 6, 2009 at 10:21 PM, Jean-Marc Hyppolite <hyppolite72@yahoo.com (hyppolite72@yahoo.com)> wrote:
Quote:
Hello Brian,
 
Thank you for your quick answer. I tried the two API functions but with no result. The caller is not able to hear any music. But, when I use two extensions (one calling the other), MOH does work.

 
My code on the JAVA side (for test purposes)
 
session.answer();
session.sleep(500);
 
session.execute("eval", "uuid_hold " + session.get_uuid());
 
java_function(); // lasts 30 to 40 seconds
 
session.execute("eval", "uuid_hold off " + session.get_uuid());
 
session.sleep(500);
session.hangup();
 
Thanks for the help.
 
Jean-Marc.
 
 
 

--- On Mon, 7/6/09, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote:

Quote:

From: Brian West <brian@freeswitch.org (brian@freeswitch.org)>
Subject: Re: [Freeswitch-users] Controlling MOH from a java application
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Received: Monday, July 6, 2009, 7:27 PM


uuid_hold <uuid>

uuid_hold off <uuid>


These two api's will do it.


/b





On Jul 6, 2009, at 6:20 PM, Jean-Marc Hyppolite wrote:

Quote:
Hello,
 
First of all, I would like to thank Anthony, Brian and all the developers for this wonderful piece of software. Very good job.
 
I would like to know how I can start and stop Music On Hold from a JAVA script (using mod_java) similar to the StartMusicOnHold and StopMusicHold functions found in AGI (Asterisk-Java).
 
I am using FreeSWITCH as an IVR server. I would like to be able to put the caller on hold while doing some other stuff.
 
Thanks in advance.
 
Jean-Marc.





Yahoo! Canada Toolbar : Search from anywhere on the web and bookmark your favourite sites. Download it now!

_______________________________________________
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






-----Inline Attachment Follows-----

_______________________________________________
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



All new Yahoo! Mail - Get a sneak peak at messages with a handy reading pane.

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
hyppolite72 at yahoo.com
Guest





PostPosted: Tue Jul 07, 2009 9:24 pm    Post subject: [Freeswitch-users] Controlling MOH from a java application Reply with quote

Hello, Thank you Anthony. My problem now is when the call is put on hold, no music is heard from the caller. Thank you again. Jean-Marc.--- On Tue, 7/7/09, Anthony Minessale <anthony.minessale@gmail.com> wrote: From: Anthony Minessale <anthony.minessale@gmail.com>Subject: Re: [Freeswitch-users] Controlling MOH from a java applicationTo: freeswitch-users@lists.freeswitch.orgReceived: Tuesday, July 7, 2009, 4:37 PM FSAPI commands are accessed via the API objapi = new API();api.execute("uuid_hold", session.get_uuid());...api.execute("uuid_hold", "off " + session.get_uuid()); On Mon, Jul 6, 2009 at 10:21 PM, Jean-Marc Hyppolite <hyppolite72@yahoo.com (hyppolite72@yahoo.com)> wrote: Hello Brian, Thank you for your quick answer. I tried the two API functions but with no result. The caller is not able to hear any music. But, when I use two extensions (one calling the other), MOH does work. My code on the JAVA side (for test purposes) session.answer();session.sleep(500); session.execute("eval", "uuid_hold " + session.get_uuid()); java_function(); // lasts 30 to 40 seconds session.execute("eval", "uuid_hold off " + session.get_uuid()); session.sleep(500); session.hangup(); Thanks for the help. Jean-Marc. --- On Mon, 7/6/09, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote: From: Brian West <brian@freeswitch.org (brian@freeswitch.org)>Subject: Re: [Freeswitch-users] Controlling MOH from a java applicationTo: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)Received: Monday, July 6, 2009, 7:27 PM uuid_hold <uuid> uuid_hold off <uuid> These two api's will do it. /b On Jul 6, 2009, at 6:20 PM, Jean-Marc Hyppolite wrote: Hello, First of all, I would like to thank Anthony, Brian and all the developers for this wonderful piece of software. Very good job. I would like to know how I can start and stop Music On Hold from a JAVA script (using mod_java) similar to the StartMusicOnHold and StopMusicHold functions found in AGI (Asterisk-Java). I am using FreeSWITCH as an IVR server. I would like to be able to put the caller on hold while doing some other stuff. Thanks in advance. Jean-Marc. Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])IRC: sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])pstn:213-799-1400-----Inline Attachment Follows----- _______________________________________________Freeswitch-users mailing listFreeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)http://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
Looking for the perfect gift? Give the gift of Flickr!
Back to top
brian at freeswitch.org
Guest





PostPosted: Tue Jul 07, 2009 9:29 pm    Post subject: [Freeswitch-users] Controlling MOH from a java application Reply with quote

Can you open a jira please.

/b

On Jul 7, 2009, at 9:22 PM, Jean-Marc Hyppolite wrote:
Quote:
Hello,

Thank you Anthony.

My problem now is when the call is put on hold, no music is heard from the caller.

Thank you again.

Jean-Marc.
Back to top
hyppolite72 at yahoo.com
Guest





PostPosted: Tue Jul 07, 2009 9:55 pm    Post subject: [Freeswitch-users] Controlling MOH from a java application Reply with quote

Thank you Brian.--- On Tue, 7/7/09, Brian West <brian@freeswitch.org> wrote: From: Brian West <brian@freeswitch.org>Subject: Re: [Freeswitch-users] Controlling MOH from a java applicationTo: freeswitch-users@lists.freeswitch.orgReceived: Tuesday, July 7, 2009, 10:28 PM Can you open a jira please. /b On Jul 7, 2009, at 9:22 PM, Jean-Marc Hyppolite wrote: Hello, Thank you Anthony. My problem now is when the call is put on hold, no music is heard from the caller. Thank you again. Jean-Marc.-----Inline Attachment Follows----- _______________________________________________Freeswitch-users mailing listFreeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)http://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
Looking for the perfect gift? Give the gift of Flickr!
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