[Freeswitch-users] Controlling MOH from a java application

Anthony Minessale anthony.minessale at gmail.com
Tue Jul 7 13:37:54 PDT 2009


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 at 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 at freeswitch.org>* wrote:
>
>
> From: Brian West <brian at freeswitch.org>
> Subject: Re: [Freeswitch-users] Controlling MOH from a java application
> To: freeswitch-users at 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.
>
>
>  ------------------------------
>
> *Yahoo! Canada Toolbar :* Search from anywhere on the web and bookmark
> your favourite sites. Download it now! <http://ca.toolbar.yahoo.com/>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org<http://ca.mc356.mail.yahoo.com/mc/compose?to=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 at lists.freeswitch.org<http://ca.mc356.mail.yahoo.com/mc/compose?to=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 - * <http://ca.promos.yahoo.com/newmail/overview2/>Get
> a sneak peak at messages with a handy reading pane.
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at 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 at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090707/db4c86d2/attachment-0002.html 


More information about the FreeSWITCH-users mailing list