[asterisk-users] realtime music on hold
Carlos Chavez
cursor at telecomabmex.com
Fri Jul 16 12:43:51 CDT 2010
On Fri, 2010-07-16 at 09:35 -0700, Kyle Kienapfel wrote:
> It looks like theres no much information out there about using realtime moh
>
> Have you tried making an extension that goes to MusicOnHold(testmoh)
>
> On Fri, Jul 16, 2010 at 8:21 AM, Jonas Kellens <jonas.kellens at telenet.be> wrote:
> > Hello list ?!
> >
> > Is there anyone that can point me to the documentation please ?
> >
> > I have added a new table like on http://www.voip-info.org/wiki/view/Asterisk+config+musiconhold.conf
> >
> > With the following values :
> >
> > `musiconhold` (`name`, `directory`, `application`, `mode`, `digit`, `sort`, `format`) VALUES
> > ('testmoh', '/var/lib/asterisk/moh/123456', '', 'files', '', '', '');
> >
> >
> > Asterisk does not see the new MusicOnHold :
> >
> > asterisk*CLI> module reload extconfig
> > [Jul 16 17:11:09] == Parsing '/etc/asterisk/extconfig.conf': [Jul 16 17:11:09] Found
> > [Jul 16 17:11:09] == Binding voicemail to mysql/asterisk/voicemail_users
> > [Jul 16 17:11:09] == Binding sipusers to mysql/asterisk/sip_buddies
> > [Jul 16 17:11:09] == Binding sippeers to mysql/asterisk/sip_buddies
> > [Jul 16 17:11:09] == Binding queues to mysql/asterisk/queues
> > [Jul 16 17:11:09] == Binding queue_members to mysql/asterisk/queue_members
> > [Jul 16 17:11:09] == Binding meetme to mysql/asterisk/conference
> > [Jul 16 17:11:09] == Binding musiconhold to mysql/asterisk/musiconhold
> > asterisk*CLI> moh reload
> > [Jul 16 17:12:53] == Parsing '/etc/asterisk/musiconhold.conf': [Jul 16 17:12:53] Found
> > asterisk*CLI> moh show classes
> > Class: default
> > Mode: files
> > Directory: /var/lib/asterisk/moh
> >
> >
> > My SIPuser test2 has a value "testmoh" for the field 'musiconhold', but when I put a caller on hold, the musiconhold class stays "default".
> >
> > [Jul 16 17:17:27] -- Called test6
> > [Jul 16 17:17:27] -- SIP/test6-0000000e is ringing
> > [Jul 16 17:17:30] -- SIP/test6-0000000e answered SIP/test2-0000000d
> > [Jul 16 17:17:33] -- Started music on hold, class 'default', on SIP/test6-0000000e
> >
Here is what 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;
SET character_set_client = @saved_cs_client;
INSERT INTO `musiconhold` VALUES
('default','/var/lib/asterisk/moh','','files','','random',''),('anuncios','/var/lib/asterisk/moh/anuncios','','files','','alpha','');
It works but it will not show anything with "moh show classes" or "moh
show files". This is the case with most realtime modules unless there
is a solution like rtcachefriends=yes in sip.conf. There is also a
comment somewhere that you need to have at least one definition in
musiconhold.conf for realtime to work. I usually leave the file as is
and realtime works.
--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez Prats
Director de Tecnología
+52-55-91169161 ext 2001
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20100716/40b8bd90/attachment.pgp
More information about the asterisk-users
mailing list