FSAPI commands are accessed via the API obj<br><br>api = new API();<br><br>api.execute(&quot;uuid_hold&quot;, session.get_uuid());<br>...<br>api.execute(&quot;uuid_hold&quot;, &quot;off &quot; + 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="mailto:hyppolite72@yahoo.com">hyppolite72@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
<div>Hello Brian,</div>
<div> </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> </div>
<div>My code on the JAVA side (for test purposes)</div>
<div> </div>
<div>session.answer();<br>session.sleep(500);</div>
<div> </div>
<div>session.execute(&quot;eval&quot;, &quot;uuid_hold &quot; + session.get_uuid());</div>
<div> </div>
<div>java_function(); // lasts 30 to 40 seconds</div>
<div> </div>
<div>session.execute(&quot;eval&quot;, &quot;uuid_hold off &quot; + session.get_uuid());</div>
<div> </div>
<div>session.sleep(500);</div>
<div>session.hangup();</div>
<div> </div>
<div>Thanks for the help.</div>
<div> </div>
<div>Jean-Marc.</div>
<div> </div>
<div> </div>
<div> </div>
<div><br>--- On <b>Mon, 7/6/09, Brian West <i>&lt;<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>&gt;</i></b> wrote:<br></div>
<blockquote style="border-left: 2px solid rgb(16, 16, 255); padding-left: 5px; margin-left: 5px;"><br>From: Brian West &lt;<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>&gt;<br>Subject: Re: [Freeswitch-users] Controlling MOH from a java application<br>
To: <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">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&#39;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" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td valign="top">
<div>Hello,</div>
<div> </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> </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> </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> </div>
<div>Thanks in advance.</div>
<div> </div>
<div>Jean-Marc.</div></td></tr></tbody></table><br>
<div><br></div>
<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr align="center" size="1" width="100%">
</span></font></div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><img align="absbottom" border="0" height="25" hspace="4" width="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></p>
</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" 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></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" target="_blank">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></div></td></tr></tbody></table><div class="hm"><br>
      <hr size="1"><a href="http://ca.promos.yahoo.com/newmail/overview2/" 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="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>
<br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>