[asterisk-users] Add & play moh-files without reload

Jonas Kellens jonas.kellens at telenet.be
Tue Aug 17 14:34:04 CDT 2010


On 08/17/2010 08:36 PM, Danny Nicholas wrote:
>
> *From:* asterisk-users-bounces at lists.digium.com 
> [mailto:asterisk-users-bounces at lists.digium.com] *On Behalf Of *Jonas 
> Kellens
> *Subject:* [asterisk-users] Add & play moh-files without reload
>
> >Hello list,
> >is it normal that when adding new moh-files to the directory 
> /var/lib/asterisk/moh/, asterisk does not see these new files ?!
> >When I do a "moh reload", then Asterisk is aware of the new files...
> >Is there a solution that does not need a "moh reload" ?!
> >Kind regards,
> >Jonas.
>
> This is a reach, but if you make your moh "real-time" that would 
> probably resolve it.   Also, if you use mpg123 or some external player 
> as opposed to the built-in player, that might do it.  If you are doing 
> "out-of-the-box" reload is the only option.
>

For realtime music-on-hold I have this :

CREATE TABLE IF NOT EXISTS `RTmusiconhold` (
   `name` varchar(80) NOT NULL,
   `directory` varchar(255) NOT NULL default '',
   `application` varchar(255) NOT NULL default '',
   `mode` varchar(80) NOT NULL default '',
   `digit` char(1) NOT NULL default '',
   `sort` varchar(16) NOT NULL default '',
   `format` varchar(16) NOT NULL default '',
   PRIMARY KEY  (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `RTmusiconhold`
--

INSERT INTO `RTmusiconhold` (`name`, `directory`, `application`, `mode`, 
`digit`, `sort`, `format`) VALUES
('106002', '/var/lib/asterisk/moh/106002', '', 'files', '', '', '');


But Asterisk does not see this moh-class, even after a complete reload :

[Aug 17 21:27:36]   == Parsing '/etc/asterisk/extconfig.conf': [Aug 17 
21:27:36] Found
[Aug 17 21:27:36]   == Binding voicemail to mysql/asterisk/voicemail_users
[Aug 17 21:27:36]   == Binding sipusers to mysql/asterisk/sip_buddies
[Aug 17 21:27:36]   == Binding sippeers to mysql/asterisk/sip_buddies
[Aug 17 21:27:36]   == Binding queues to mysql/asterisk/queues
[Aug 17 21:27:36]   == Binding queue_members to mysql/asterisk/queue_members
[Aug 17 21:27:36]   == Binding meetme to mysql/asterisk/conference
[Aug 17 21:27:36]   == Binding musiconhold to mysql/asterisk/RTmusiconhold
asterisk*CLI> moh show classes
Class: default
     Mode: files
     Directory: /var/lib/asterisk/moh


In musiconhold.conf I have just the "default" class defined :

[default]
mode=files
directory=/var/lib/asterisk/moh
random=yes



Kind regards,

Jonas.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100817/449e0b72/attachment.htm 


More information about the asterisk-users mailing list