<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thanks Matt.<div><br></div><div>I tried that already, no luck.<div><br></div><div>Still, I get blank nothingness instead of MOH. I will try again just to be sure I didn't miss something.<br></div><div><br></div><div><span style="font-size: 12pt;">>>>></span></div><div>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>>>>></div><div><br></div><div><div><br><div><hr id="stopSpelling">Date: Mon, 27 Oct 2014 08:51:42 -0500<br>Subject: Re: [asterisk-users] Setting Music on Hold with the Manager Interface<br>From: mjordan@digium.com<br>To: tjrlist@live.com; asterisk-users@lists.digium.com<br><br><div dir="ltr"><br><div class="ecxgmail_extra"><br><div class="ecxgmail_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="ecxgmail_quote" style="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="ecxgmail_extra"><br></div><div class="ecxgmail_extra">Use the CHANNEL function:</div><div class="ecxgmail_extra"><br></div><div class="ecxgmail_extra"><a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_CHANNEL" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_CHANNEL</a><br></div><div class="ecxgmail_extra"><br></div><div class="ecxgmail_extra">Action: Setvar</div><div class="ecxgmail_extra">Channel: (your channel name here)</div><div class="ecxgmail_extra">Variable: CHANNEL(musicclass)</div><div class="ecxgmail_extra">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><br></div><div><br></div><div><br></div></div>
</div></div></div></div></div></div> </div></body>
</html>