Hi Warren

According to the book I'm using as well as the documentation on Asterisk 1.8 
you should remove the musiconhold.conf file from /etc/asterisk if you want to 
read it from a database. From what you say it looks as if you can have both. 
Maybe not with the same classes?

You are right about the bug ticket. From what I can gather, the database is 
defined once for the ODBC driver for each connector (in /etc/odbc.ini). To 
connect Asterisk to ODBC you need to define a class in res_odbc.conf which 
points to the ODBC connector. After thinking about this I suppose that what is 
actually going on is this:


1)      In odbc.ini you define one or more ODBC connectors. Each connector has 
one database.

2)      In /etc/asterisk/res_odbc.conf you specify one or more ODBC Asterisk 
connectors, each pointing to an ODBC connector.

3)      In /etc/asterisk/extconfig.conf you put in a line that calls the ODBC 
driver, the Asterisk connector and optional database. So the syntax of a line 
should be:

<filename> => <driver>,<Asterisk connector >[,<table name>]

In my case, the database user and Asterisk connector were both named 
"asterisk", which confused me into thinking that the extconfig.conf file needed 
the username. That's not very logical, so I tried changing my Asterisk 
connector name to [asterisk-odbc] and the line in extconfig.conf to:
                             Musiconhold.conf = 
odbc,asterisk-odbc,asterisk_files

This works fine. In the book, all things are named "asterisk" - the database 
user, the database and the Asterisk connector. If I had done the same, 
everything would have worked fine for me. But since I am working on an 
RoR-based management interface (just for fun ...) I needed a database with the 
_development extension, and from there everything went wrong.

Anyway i've sent in a bug ticket as you suggested, this may of course be 
something that has changed since version 1.14 , and anyway, the "bug" is really 
in the documentation in the Asterisk Wiki and not in Asterisk as such.

Regards

Binni

Fra: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] På vegne af Warren Selby
Sendt: 17. december 2011 21:42
Til: Asterisk Users Mailing List - Non-Commercial Discussion
Emne: Re: [asterisk-users] ODBC problem - static realtime file not loading

On Fri, Dec 16, 2011 at 6:06 AM, Brynjolfur Thorvardsson 
<bi...@itanet.nu<mailto:bi...@itanet.nu>> wrote:
<snip>

After connecting, the asterisk user never sends another SQL statement, at least 
nothing that shows up in the General log. Asterisk is running as root. I've 
deleted the musiconhold.conf file from /etc/asterisk


I had always thought you still needed the musiconhold.conf file with at least 
one MOH class defined so that asterisk will load the MOH module.  Once it loads 
the module, then it should read from the database as well.  I don't know why 
this works, but it's the way I've always done it. If this behavior resolves 
your issue, perhaps a bug ticket is in order on 
https://issues.asterisk.org/jira/ .


--
Thanks,
--Warren Selby, dCAP
http://www.SelbyTech.com<http://www.selbytech.com>


--
_____________________________________________________________________
-- 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

Reply via email to