[Asterisk-Users] Still stuck trying to make Asterisk read MySQL
Joe Dennick
joe at dennick.net
Sat Feb 12 15:39:55 MST 2005
I've been working with RealTime configuration from MySQL Server, and have had
good results. You might check it out. You can do a search for 'realtime' on
the Wiki and get some good documentation on how to set it up. I think in the
extconfig.conf file, not only do you need to identify the engine (ODBC in your
case), but you also need to identify the actual table you used for your
Voicemail configuration. If I recall correctly, the default is a table named
'voicemail' and since you are using a different name, you need to specify the
name in the extconfig.conf file so it can find it.
beonice (beonice at yahoo.com) wrote:
>
> I've been continuing to experiment with MySQL. I'm
> having absolutely no luck getting asterisk to read
> voicemail configuration data and mailbox configuration
> data from mysql tables instead of from voicemail.conf.
>
>
> The default Asterisk setup that reads from
> voicemail.conf and extensions.conf works fine. I'm
> using
> Asterisk CVS-v1-0-12/12/04-15:58:29 on a Whitebox
> Enterprise Linux box. I'm not using any telephony
> hardware or SIP phones. I've just got a voicepulse DID
> talking to asterisk via IAX.
>
> I've got mysql downloaded and installed and have
> successfully got the contributed script reading from
> my asterisk_vm database to set up the extensions.conf,
> as per the instructions at:
> http://www.voip-info.org/wiki-Asterisk+extensions+from+mysql
>
> Now I'm trying to get Asterisk to look up voicemail
> configs from the asterisk_vm database. In order to do
> this, I've been following the instructions at:
> http://www.voip-info.org/wiki-Asterisk+voicemail+database
>
> So, I've:
> 1) Updated the /usr/src/asterisk/apps/Makefile to have
> USE_MYSQL_VM_INTERFACE=1 and recompiled asterisk, with
> make clean; make; make install
>
> 2) Updated voicemail.conf to have the appropriate
> entries:
> dbuser=username ;; Yes I changed this to my username
> dbpass=password ;; Yes I changed this to my password
> dbhost=localhost
> dbname=asterisk_vm
>
>
> 3) Created the users table in the asterisk_vm
> database.
> +---------+------------+----------+--------------+-------------------+-------+------------+----------------+
> | context | mailbox | password | fullname |
> email | pager | options | stamp
> |
> +---------+------------+----------+--------------+-------------------+-------+------------+----------------+
> | default | 1111 | 1234 | Moron Tester |
> me at mydomain.com | | attach=yes | 20050211131641
> |
> +---------+------------+----------+--------------+-------------------+-------+------------+----------------+
>
> 4) Updated extensions.conf to have the following line:
> exten => 1111,1,VoiceMail(u1111)
>
> I tried restarting asterisk at this point, called in
> and tried to leave voicemail for extension (and
> mailbox) 1111. Here's the message I get:
>
> *CLI> Feb 11 13:21:36 WARNING[18393]:
> app_voicemail.c:1539 leave_voicemail: No entry in
> voicemail config file for '1111'
>
>
> So I dug around some more and found
> http://www.voip-info.org/wiki-Asterisk+res_config
>
> Decided to try these instructions as well. So:
>
> 5) I created the ast_config table as directed:
> Here is the data:
>
> +----+------------+------------+-----------+----------------+----------+----------+---------+
> | id | cat_metric | var_metric | commented | filename
> | category | var_name | var_val |
> +----+------------+------------+-----------+----------------+----------+----------+---------+
> | 1 | 0 | 0 | 0 |
> voicemail.conf | default | | |
> +----+------------+------------+-----------+----------------+----------+----------+---------+
>
> 6) I edited /etc/asterisk/configs/res_odbc.conf to
> contain:
> [mysql1]
> dsn = MySQL-asterisk
> username = myuser
> password = mypass
> pre-connect = yes
> [mysql1]
> dsn = asterisk_vm
> username = myuser ;; changed to my userid on mysql
> password = mypass ;; changed to my password on mysql
> pre-connect = yes
>
> [mysql2]
> dsn = MySQL2-asterisk
> username = myuser2
> password = mypass2
> enabled = no
>
> [ENV]
> VAR=VALUE
>
> 7) Inserted glue to tell asterisk where to look:
> ; /etc/asterisk/res_config_odbc.conf
> [settings]
> table = ast_config
> connection = mysql1
>
> 8) Rerouted Asterisk's config engine:
> ; /etc/asterisk/extconfig.conf
> [settings]
> ;queues.conf => odbc
> voicemail.conf => odbc
>
> 9) I modified the sample script load_res_config.pl and
> ran it, it successfully updated my ast_config table,
> stuffing in all the settings that I'm used to seeing
> in voicemail.conf.
>
> 10) I restarted asterisk _again_.
> I get the exact same message.
> Feb 11 14:18:40 WARNING[18528]: app_voicemail.c:1539
> leave_voicemail: No entry in voicemail config file for
> '1111'
>
> I'm totally out of ideas now. Anyone else got a clue
> to lend me?
>
> Thanks,
> Maya
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Take Yahoo! Mail with you! Get it on your mobile phone.
> http://mobile.yahoo.com/maildemo
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
Joe Dennick
joe at dennick.net
More information about the asterisk-users
mailing list