<div dir="ltr">Thanks Carlos,<div>I have created the table and changed the extconfig to :</div><div>musiconhold => mysql,asterisk,musiconhold</div><div><br></div><div>It works fine.</div><div><br></div><div>Yaron</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 23, 2015 at 6:57 PM, Carlos Chavez <span dir="ltr"><<a href="mailto:cursor@telecomabmex.com" target="_blank">cursor@telecomabmex.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 2/23/15 3:03 AM, Yaron Nachum wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello everyone,<br>
I am trying to activate Music On Hold using DB on Asterisk 13.<br>
It works fine but in order to use new Music On hold definitions I have to reload the moh module.<br>
<br>
- The following is my configuration in extconfig.conf - I added the following line:<br>
 musiconhold.conf => mysql,asterisk,bit_ast_config<br>
<br>
- The following is the table in the database:<br>
mysql> select * from bit_ast_config;<br>
+----+------------+-----------<u></u>--+----------------+----------<u></u>-------------+-----------+----<u></u>-----------+----------+<br>
| id   | cat_metric | var_metric | commented | filename              | category | var_name  | var_val |<br>
+----+------------+-----------<u></u>--+----------------+----------<u></u>-------------+-----------+----<u></u>-----------+----------+<br>
|  2   |             0 |             0   |             0      | musiconhold.conf | yaron      | directory     | moh   |<br>
|  3   |             0 |             0   |             0      | musiconhold.conf | yaron      | mode          | files      |<br>
| 10  |             0 |               0 |             0    | musiconhold.conf | yaron1    | directory     | moh |<br>
| 11  |             0 |               0 |             0    | musiconhold.conf | yaron1    | mode          | files    |<br>
+----+------------+-----------<u></u>--+----------------+----------<u></u>-------------+-----------+----<u></u>-----------+----------+<br>
<br>
<br>
Is there a way to do automatically add new moh definitions without reloading the moh module?<br>
Thanks,<br>
Yaron.<br>
</blockquote></div></div>
    You actually want to use the "realtime" database and not the "static".  With the realtime database all changes will take effect immediately.  The following link explains the difference between realtime and static:<br>
<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration" target="_blank">https://wiki.asterisk.org/<u></u>wiki/display/AST/Realtime+<u></u>Database+Configuration</a><br>
<br>
    Here is the structure I use:<br>
<br>
CREATE TABLE `musiconhold` (<br>
  `name` varchar(80) COLLATE utf8_unicode_ci NOT NULL,<br>
  `directory` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',<br>
  `application` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',<br>
  `mode` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',<br>
  `digit` char(1) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',<br>
  `sort` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',<br>
  `format` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',<br>
  PRIMARY KEY (`name`)<br>
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-- Telecomunicaciones Abiertas de México S.A. de C.V. Carlos Chávez +52 (55)9116-91161<span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
______________________________<u></u>______________________________<u></u>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
              <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
  <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/<u></u>mailman/listinfo/asterisk-<u></u>users</a><br>
</font></span></blockquote></div><br></div>