<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 26, 2014 at 10:42 PM, Todd R. <span dir="ltr"><<a href="mailto:tjrlist@live.com" target="_blank">tjrlist@live.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div><div dir="ltr">Does anyone know how to set the music on hold class with the Manager Interface in 1.8?<div><br></div><div>Here is what I am using but I end up just getting no music when I put this in place, when I remove it the default is back.</div><div><br></div><div>The classes I am setting work elsewhere just fine.</div><div><br></div><div>I did not include the opening of the socket, logging in etc because that's all working fine along with other things I am doing within the same login, socket session. Just trying to add this additional task.</div><div><br></div><div>This is from PHP as you may have recognized. I have also tried surrounding musicclass with CHANNEL() but that didn't work and didn't seem right anyhow since it already knows it's a channel variable.</div><div><br></div><div>Thanks in advance for any help on this.</div><div><pre style="background-color:rgb(0,34,64);color:rgb(255,255,255);font-family:Menlo;font-size:12pt"><span style="color:rgb(0,136,255);font-style:italic"># Set the Music on Hold<br></span><span style="color:rgb(128,255,187)">fputs</span><span style="color:rgb(225,239,255)">(</span><span style="color:rgb(255,128,225)">$socket2</span><span style="color:rgb(225,239,255)">, </span><span style="color:rgb(58,217,0)">"Action: Setvar</span><span style="color:rgb(255,98,140)">\r\n</span><span style="color:rgb(58,217,0)">"</span><span style="color:rgb(225,239,255)">);<br></span><span style="color:rgb(128,255,187)">fputs</span><span style="color:rgb(225,239,255)">(</span><span style="color:rgb(255,128,225)">$socket2</span><span style="color:rgb(225,239,255)">, </span><span style="color:rgb(58,217,0)">"Channel: "</span><span style="color:rgb(255,157,0)">.</span><span style="color:rgb(255,128,225)">$channel</span><span style="color:rgb(255,157,0)">.</span><span style="color:rgb(58,217,0)">"</span><span style="color:rgb(255,98,140)">\r\n</span><span style="color:rgb(58,217,0)">"</span><span style="color:rgb(225,239,255)">);<br></span><span style="color:rgb(128,255,187)">fputs</span><span style="color:rgb(225,239,255)">(</span><span style="color:rgb(255,128,225)">$socket2</span><span style="color:rgb(225,239,255)">, </span><span style="color:rgb(58,217,0)">"Variable: musicclass</span><span style="color:rgb(255,98,140)">\r\n</span><span style="color:rgb(58,217,0)">"</span><span style="color:rgb(225,239,255)">);<br></span><span style="color:rgb(128,255,187)">fputs</span><span style="color:rgb(225,239,255)">(</span><span style="color:rgb(255,128,225)">$socket2</span><span style="color:rgb(225,239,255)">, </span><span style="color:rgb(58,217,0)">"Value: "</span><span style="color:rgb(255,157,0)">.</span><span style="color:rgb(255,128,225)">$mohclass</span><span style="color:rgb(255,157,0)">.</span><span style="color:rgb(58,217,0)">"</span><span style="color:rgb(255,98,140)">\r\n</span><span style="color:rgb(58,217,0)">"</span><span style="color:rgb(225,239,255)">);</span></pre></div>                                       </div></div>
</blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra" style>Use the CHANNEL function:</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style><a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_CHANNEL">https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_CHANNEL</a><br></div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>Action: Setvar</div><div class="gmail_extra" style>Channel: (your channel name here)</div><div class="gmail_extra" style>Variable: CHANNEL(musicclass)</div><div class="gmail_extra" style>Value: (your MoH class here)</div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Matthew Jordan<br></div><div>Digium, Inc. | Engineering Manager</div><div>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA</div><div>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a></div></div>
</div></div>