Thanks Carlos, I have created the table and changed the extconfig to : musiconhold => mysql,asterisk,musiconhold
It works fine. Yaron On Mon, Feb 23, 2015 at 6:57 PM, Carlos Chavez <[email protected]> wrote: > On 2/23/15 3:03 AM, Yaron Nachum wrote: > >> Hello everyone, >> I am trying to activate Music On Hold using DB on Asterisk 13. >> It works fine but in order to use new Music On hold definitions I have to >> reload the moh module. >> >> - The following is my configuration in extconfig.conf - I added the >> following line: >> musiconhold.conf => mysql,asterisk,bit_ast_config >> >> - The following is the table in the database: >> mysql> select * from bit_ast_config; >> +----+------------+-------------+----------------+---------- >> -------------+-----------+---------------+----------+ >> | id | cat_metric | var_metric | commented | filename | >> category | var_name | var_val | >> +----+------------+-------------+----------------+---------- >> -------------+-----------+---------------+----------+ >> | 2 | 0 | 0 | 0 | >> musiconhold.conf | yaron | directory | moh | >> | 3 | 0 | 0 | 0 | >> musiconhold.conf | yaron | mode | files | >> | 10 | 0 | 0 | 0 | >> musiconhold.conf | yaron1 | directory | moh | >> | 11 | 0 | 0 | 0 | >> musiconhold.conf | yaron1 | mode | files | >> +----+------------+-------------+----------------+---------- >> -------------+-----------+---------------+----------+ >> >> >> Is there a way to do automatically add new moh definitions without >> reloading the moh module? >> Thanks, >> Yaron. >> > 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: > > https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration > > Here is the structure I use: > > CREATE TABLE `musiconhold` ( > `name` varchar(80) COLLATE utf8_unicode_ci NOT NULL, > `directory` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', > `application` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', > `mode` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', > `digit` char(1) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', > `sort` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', > `format` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', > PRIMARY KEY (`name`) > ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; > > -- Telecomunicaciones Abiertas de México S.A. de C.V. Carlos Chávez +52 >> (55)9116-91161 >> > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
