<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hello,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you Anthony. </DIV>
<DIV>&nbsp;</DIV>
<DIV>My problem now is when the call is put on hold, no music is heard from the caller.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you again.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Jean-Marc.<BR><BR>--- On <B>Tue, 7/7/09, Anthony Minessale <I>&lt;anthony.minessale@gmail.com&gt;</I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><BR>From: Anthony Minessale &lt;anthony.minessale@gmail.com&gt;<BR>Subject: Re: [Freeswitch-users] Controlling MOH from a java application<BR>To: freeswitch-users@lists.freeswitch.org<BR>Received: Tuesday, July 7, 2009, 4:37 PM<BR><BR>
<DIV id=yiv2060092293>FSAPI commands are accessed via the API obj<BR><BR>api = new API();<BR><BR>api.execute("uuid_hold", session.get_uuid());<BR>...<BR>api.execute("uuid_hold", "off " + session.get_uuid());<BR><BR><BR><BR>
<DIV class=gmail_quote>On Mon, Jul 6, 2009 at 10:21 PM, Jean-Marc Hyppolite <SPAN dir=ltr>&lt;<A href="http://ca.mc356.mail.yahoo.com/mc/compose?to=hyppolite72@yahoo.com" rel=nofollow target=_blank ymailto="mailto:hyppolite72@yahoo.com">hyppolite72@yahoo.com</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote>
<TABLE border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD style="FONT-FAMILY: inherit; font-size-adjust: inherit; font-stretch: inherit" vAlign=top>
<DIV>Hello Brian,</DIV>
<DIV>&nbsp;</DIV>
<DIV>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.<BR></DIV>
<DIV>&nbsp;</DIV>
<DIV>My code on the JAVA side (for test purposes)</DIV>
<DIV>&nbsp;</DIV>
<DIV>session.answer();<BR>session.sleep(500);</DIV>
<DIV>&nbsp;</DIV>
<DIV>session.execute("eval", "uuid_hold " + session.get_uuid());</DIV>
<DIV>&nbsp;</DIV>
<DIV>java_function(); // lasts 30 to 40 seconds</DIV>
<DIV>&nbsp;</DIV>
<DIV>session.execute("eval", "uuid_hold off " + session.get_uuid());</DIV>
<DIV>&nbsp;</DIV>
<DIV>session.sleep(500);</DIV>
<DIV>session.hangup();</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks for the help.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Jean-Marc.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>--- On <B>Mon, 7/6/09, Brian West <I>&lt;<A href="http://ca.mc356.mail.yahoo.com/mc/compose?to=brian@freeswitch.org" rel=nofollow target=_blank ymailto="mailto:brian@freeswitch.org">brian@freeswitch.org</A>&gt;</I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><BR>From: Brian West &lt;<A href="http://ca.mc356.mail.yahoo.com/mc/compose?to=brian@freeswitch.org" rel=nofollow target=_blank ymailto="mailto:brian@freeswitch.org">brian@freeswitch.org</A>&gt;<BR>Subject: Re: [Freeswitch-users] Controlling MOH from a java application<BR>To: <A href="http://ca.mc356.mail.yahoo.com/mc/compose?to=freeswitch-users@lists.freeswitch.org" rel=nofollow target=_blank ymailto="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</A><BR>Received: Monday, July 6, 2009, 7:27 PM
<DIV>
<DIV></DIV>
<DIV class=h5><BR><BR>
<DIV>uuid_hold &lt;uuid&gt; 
<DIV><BR></DIV>
<DIV>uuid_hold off &lt;uuid&gt;</DIV>
<DIV><BR></DIV>
<DIV>These two api's will do it.</DIV>
<DIV><BR></DIV>
<DIV>/b</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV><BR>
<DIV>
<DIV>On Jul 6, 2009, at 6:20 PM, Jean-Marc Hyppolite wrote:</DIV><BR>
<BLOCKQUOTE type="cite">
<TABLE border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV>Hello,</DIV>
<DIV>&nbsp;</DIV>
<DIV>First of all, I would like to thank Anthony, Brian and all the developers for this wonderful piece of software. Very good job.</DIV>
<DIV>&nbsp;</DIV>
<DIV>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).</DIV>
<DIV>&nbsp;</DIV>
<DIV>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. </DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks in advance.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Jean-Marc.</DIV></TD></TR></TBODY></TABLE><BR>
<DIV><BR></DIV>
<DIV style="TEXT-ALIGN: center" align=center><FONT size=3 face="Times New Roman"><SPAN style="FONT-SIZE: 12pt">
<HR align=center SIZE=1 width="100%">
</SPAN></FONT></DIV>
<DIV><FONT size=3 face="Times New Roman"><SPAN style="FONT-SIZE: 12pt"><IMG border=0 hspace=4 align=absBottom width=25 height=25><A href="http://ca.toolbar.yahoo.com/" rel=nofollow target=_blank><B><SPAN style="FONT-WEIGHT: bold" lang=NO-BOK>Yahoo! Canada Toolbar :</SPAN></B><SPAN lang=NO-BOK> Search from anywhere on the web and bookmark your favourite sites. Download it now! </SPAN></A></SPAN></FONT><SPAN lang=NO-BOK></SPAN></DIV></BLOCKQUOTE></DIV>_______________________________________________<BR>Freeswitch-users mailing list<BR><A href="http://ca.mc356.mail.yahoo.com/mc/compose?to=Freeswitch-users@lists.freeswitch.org" rel=nofollow target=_blank>Freeswitch-users@lists.freeswitch.org</A><BR><A href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel=nofollow target=_blank>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel=nofollow
 target=_blank>http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR><A href="http://www.freeswitch.org/" rel=nofollow target=_blank>http://www.freeswitch.org</A><BR></DIV></DIV></DIV></DIV></BLOCKQUOTE><BR><BR>-----Inline Attachment Follows-----
<DIV class=im><BR><BR>
<DIV>_______________________________________________<BR>Freeswitch-users mailing list<BR><A href="http://ca.mc356.mail.yahoo.com/mc/compose?to=Freeswitch-users@lists.freeswitch.org" rel=nofollow target=_blank>Freeswitch-users@lists.freeswitch.org</A><BR><A href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel=nofollow target=_blank>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel=nofollow target=_blank>http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR><A href="http://www.freeswitch.org/" rel=nofollow target=_blank>http://www.freeswitch.org</A><BR></DIV></DIV></TD></TR></TBODY></TABLE>
<DIV class=hm><BR>
<HR SIZE=1>
<A href="http://ca.promos.yahoo.com/newmail/overview2/" rel=nofollow target=_blank><B>All new Yahoo! Mail - </B></A>Get a sneak peak at messages with a handy reading pane.</DIV><BR>_______________________________________________<BR>Freeswitch-users mailing list<BR><A href="http://ca.mc356.mail.yahoo.com/mc/compose?to=Freeswitch-users@lists.freeswitch.org" rel=nofollow target=_blank ymailto="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</A><BR><A href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel=nofollow target=_blank>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel=nofollow target=_blank>http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR><A href="http://www.freeswitch.org/" rel=nofollow target=_blank>http://www.freeswitch.org</A><BR><BR></BLOCKQUOTE></DIV><BR><BR
 clear=all><BR>-- <BR>Anthony Minessale II<BR><BR>FreeSWITCH <A href="http://www.freeswitch.org/" rel=nofollow target=_blank>http://www.freeswitch.org/</A><BR>ClueCon <A href="http://www.cluecon.com/" rel=nofollow target=_blank>http://www.cluecon.com/</A><BR><BR>AIM: anthm<BR><A href="http://ca.mc356.mail.yahoo.com/mc/compose?to=MSN%3Aanthony_minessale@hotmail.com" rel=nofollow target=_blank ymailto="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</A><BR>GTALK/JABBER/<A href="http://ca.mc356.mail.yahoo.com/mc/compose?to=PAYPAL%3Aanthony.minessale@gmail.com" rel=nofollow target=_blank ymailto="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</A><BR>IRC: <A href="http://irc.freenode.net/" rel=nofollow target=_blank>irc.freenode.net</A> #freeswitch<BR><BR>FreeSWITCH Developer Conference<BR><A href="http://ca.mc356.mail.yahoo.com/mc/compose?to=sip%3A888@conference.freeswitch.org" rel=nofollow
 target=_blank ymailto="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</A><BR><A href="http://iax:guest@conference.freeswitch.org/888" rel=nofollow target=_blank>iax:guest@conference.freeswitch.org/888</A><BR><A href="http://ca.mc356.mail.yahoo.com/mc/compose?to=googletalk%3Aconf%2B888@conference.freeswitch.org" rel=nofollow target=_blank ymailto="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</A><BR>pstn:213-799-1400<BR></DIV><BR>-----Inline Attachment Follows-----<BR><BR>
<DIV class=plainMail>_______________________________________________<BR>Freeswitch-users mailing list<BR><A href="http://ca.mc356.mail.yahoo.com/mc/compose?to=Freeswitch-users@lists.freeswitch.org" ymailto="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</A><BR><A href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target=_blank>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target=_blank>http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR><A href="http://www.freeswitch.org/" target=_blank>http://www.freeswitch.org</A><BR></DIV></BLOCKQUOTE></td></tr></table><br>
      <hr size=1>
Looking for the perfect gift?<a href="http://www.flickr.com/gift/"><b> Give the gift of Flickr!</b></a>