[Asterisk-Users] MySQL
Matthew Boehm
mboehm at cytelcom.com
Thu Dec 9 16:29:51 MST 2004
Sure. (I really need to write a wiki on this.)
You have two choices here before we start. You can use RealTime one of 2
ways: ODBC or direct MySQL. Currently these are the only two supported
methods.
Since I don't use ODBC and as the author of the MySQL RealTime driver, I'm
going to instruct on how to use/install it.
The RealTime MySQL driver can be found inside asterisk-addons. Just do the
standard make, make install.
Now copy asterisk-addons/configs/res_mysql.conf.sample to
/etc/asterisk/res_mysql.conf (or whereever your conf dir is).
Edit the res_mysql.conf to your liking.
Now edit /etc/asterisk/extconfig.conf. Down at the bottom is the RealTime
config stuff. If you want voicemail, add this line:
voicemail => mysql,asterisk,voicemail_users
This basically says "Please use the RealTime MySQL driver, the database
asterisk and the table voicemail_users and bind that to the voicemail
family". You can change to your liking:
voicemail => <driver>,<databasename>,<tablename>
Now go into your mysql server and make the following table:
CREATE TABLE `voicemail_users` (
`uniqueid` int(11) NOT NULL auto_increment,
`customer_id` int(11) NOT NULL default '0',
`context` varchar(50) NOT NULL default '',
`mailbox` int(5) NOT NULL default '0',
`password` int(4) NOT NULL default '0',
`fullname` varchar(50) NOT NULL default '',
`email` varchar(50) NOT NULL default '',
`pager` varchar(50) NOT NULL default '',
`options` varchar(100) NOT NULL default '',
`stamp` timestamp(14) NOT NULL,
PRIMARY KEY (`uniqueid`)
) TYPE=MyISAM;
Put in some rows. Restart asterisk and it should work. Please let me know if
it works/doesn't work.
-Matthew
----- Original Message -----
From: "VCI Help Desk" <admin at vci.net>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
<asterisk-users at lists.digium.com>
Sent: Thursday, December 09, 2004 4:44 PM
Subject: [Asterisk-Users] MySQL
> Does anyone have any instructions for setting up MySQL with the latest
> CVS? I upgraded from an older version this week and none of the MySQL
works
> now and I believe it's due to the newer Realtime Architecture. I can't
find
> any instructions that explain it very well anywhere. Any help would be
> appreciated.
>
> Bill
>
> _______________________________________________
> 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
More information about the asterisk-users
mailing list