<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
On 08/17/2010 08:36 PM, Danny Nicholas wrote:
<blockquote cite="mid:201008171810.o7HIA4rM010180@mail.debsinc.com"
 type="cite">
  <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1">
  <meta name="Generator" content="Microsoft Word 11 (filtered medium)">
  <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
  </style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
  <div class="Section1">
  <div>
  <p class="MsoNormal"><b><font size="2" color="black" face="Tahoma"><span
 style="font-size: 10pt; font-family: Tahoma; color: windowtext; font-weight: bold;">From:</span></font></b><font
 size="2" color="black" face="Tahoma"><span
 style="font-size: 10pt; font-family: Tahoma; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>
[<a class="moz-txt-link-freetext" href="mailto:asterisk-users-bounces@lists.digium.com">mailto:asterisk-users-bounces@lists.digium.com</a>] <b><span
 style="font-weight: bold;">On Behalf Of </span></b>Jonas Kellens<br>
  <b><span style="font-weight: bold;">Subject:</span></b>
[asterisk-users] Add
&amp; play moh-files without reload</span></font><font color="black"><span
 style="color: windowtext;"><o:p></o:p></span></font></p>
  </div>
  <p class="MsoNormal"><font size="3" color="black"
 face="Times New Roman"><span style="font-size: 12pt;"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font size="3" color="navy" face="Helvetica"><span
 style="font-size: 12pt; font-family: Helvetica; color: navy;">&gt;</span></font><font
 face="Helvetica"><span style="font-family: Helvetica;">Hello list,<br>
  </span></font><font color="navy" face="Helvetica"><span
 style="font-family: Helvetica; color: navy;">&gt;</span></font><font
 face="Helvetica"><span style="font-family: Helvetica;">is it normal
that when adding new moh-files to the directory
/var/lib/asterisk/moh/, asterisk does not see these new files ?!<br>
  </span></font><font color="navy" face="Helvetica"><span
 style="font-family: Helvetica; color: navy;">&gt;</span></font><font
 face="Helvetica"><span style="font-family: Helvetica;">When I do a
"moh reload", then Asterisk is aware of the
new files...<br>
  </span></font><font color="navy" face="Helvetica"><span
 style="font-family: Helvetica; color: navy;">&gt;</span></font><font
 face="Helvetica"><span style="font-family: Helvetica;">Is there a
solution that does not need a "moh reload" ?!<br>
  </span></font><font color="navy" face="Helvetica"><span
 style="font-family: Helvetica; color: navy;">&gt;</span></font><font
 face="Helvetica"><span style="font-family: Helvetica;">Kind regards,<br>
  </span></font><font color="navy" face="Helvetica"><span
 style="font-family: Helvetica; color: navy;">&gt;</span></font><font
 face="Helvetica"><span style="font-family: Helvetica;">Jonas.</span></font><font
 color="navy" face="Helvetica"><span
 style="font-family: Helvetica; color: navy;"><o:p></o:p></span></font></p>
  <p class="MsoNormal"><font size="2" color="navy" face="Arial"><span
 style="font-size: 10pt; font-family: Arial; color: navy;"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font size="2" color="navy" face="Arial"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">This is a
reach, but if you make your moh &#8220;real-time&#8221;
that would probably resolve it.&nbsp;&nbsp; Also, if you use mpg123 or some
external
player as opposed to the built-in player, that might do it.&nbsp; If you are
doing &#8220;out-of-the-box&#8221;
reload is the only option.</span></font></p>
  </div>
</blockquote>
<br>
For realtime music-on-hold I have this :<br>
<br>
CREATE TABLE IF NOT EXISTS `RTmusiconhold` (<br>
&nbsp; `name` varchar(80) NOT NULL,<br>
&nbsp; `directory` varchar(255) NOT NULL default '',<br>
&nbsp; `application` varchar(255) NOT NULL default '',<br>
&nbsp; `mode` varchar(80) NOT NULL default '',<br>
&nbsp; `digit` char(1) NOT NULL default '',<br>
&nbsp; `sort` varchar(16) NOT NULL default '',<br>
&nbsp; `format` varchar(16) NOT NULL default '',<br>
&nbsp; PRIMARY KEY&nbsp; (`name`)<br>
) ENGINE=MyISAM DEFAULT CHARSET=latin1;<br>
<br>
--<br>
-- Dumping data for table `RTmusiconhold`<br>
--<br>
<br>
INSERT INTO `RTmusiconhold` (`name`, `directory`, `application`,
`mode`, `digit`, `sort`, `format`) VALUES<br>
('106002', '/var/lib/asterisk/moh/106002', '', 'files', '', '', '');<br>
<br>
<br>
But Asterisk does not see this moh-class, even after a complete reload :<br>
<br>
[Aug 17 21:27:36]&nbsp;&nbsp; == Parsing '/etc/asterisk/extconfig.conf': [Aug 17
21:27:36] Found<br>
[Aug 17 21:27:36]&nbsp;&nbsp; == Binding voicemail to
mysql/asterisk/voicemail_users<br>
[Aug 17 21:27:36]&nbsp;&nbsp; == Binding sipusers to mysql/asterisk/sip_buddies<br>
[Aug 17 21:27:36]&nbsp;&nbsp; == Binding sippeers to mysql/asterisk/sip_buddies<br>
[Aug 17 21:27:36]&nbsp;&nbsp; == Binding queues to mysql/asterisk/queues<br>
[Aug 17 21:27:36]&nbsp;&nbsp; == Binding queue_members to
mysql/asterisk/queue_members<br>
[Aug 17 21:27:36]&nbsp;&nbsp; == Binding meetme to mysql/asterisk/conference<br>
[Aug 17 21:27:36]&nbsp;&nbsp; == Binding musiconhold to
mysql/asterisk/RTmusiconhold<br>
asterisk*CLI&gt; moh show classes <br>
Class: default<br>
&nbsp;&nbsp;&nbsp; Mode: files<br>
&nbsp;&nbsp;&nbsp; Directory: /var/lib/asterisk/moh<br>
<br>
<br>
In musiconhold.conf I have just the "default" class defined :<br>
<br>
[default]<br>
mode=files<br>
directory=/var/lib/asterisk/moh<br>
random=yes<br>
<br>
<br>
<br>
Kind regards,<br>
<br>
Jonas.<br>
<br>
</body>
</html>