[Asterisk-Users] MySQL

Bill admin at vci.net
Fri Dec 10 10:06:35 MST 2004


    I've got it working better. I started using a different user with a
password instead of using root with no password and I see it trying in the
/var/log/mysql.log file. I also removed the old dbuser,dbpass, etc.. lines
from the voicemail.conf file.

    SELECT * FROM users WHERE mailbox = '540' AND context = 'default'

    Now I don't see where this 'default' context is coming from because I
have that set to 'from-sip' in my extentions.conf and my sip.conf files.
Any ideas where that is?

    extconfig.conf -    voicemail => mysql,asterisk,users  (I renamed the
table to "users" and created it as such)

    res_mysql.conf
        [general]
        dbhost = 127.0.0.1
        dbname = asterisk
        dbuser = asterisk
        dbpass = test
        dbport = 3306
        dbsock = /var/lib/mysql/mysql.sock

    The res_config_mysq.so is installed in the modules directory with the
others.

    What exactly is this new "RealTime" stuff? Is this an existing package
that's being integrated into Asterisk or something made from scratch?

      Bill





----- Original Message ----- 
From: Matthew Boehm
To: Asterisk Users Mailing List - Non-Commercial Discussion
Sent: Friday, December 10, 2004 10:02 AM
Subject: Re: [Asterisk-Users] MySQL


Post your extconfig.conf. Do you have
/usr/lib/asterisk/modules/res_config_mysql.so installed? Do you have
/etc/asterisk/res_mysql.conf?

-Matthew
----- Original Message ----- 
From: "Bill" <admin at vci.net>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
<asterisk-users at lists.digium.com>
Sent: Friday, December 10, 2004 8:14 AM
Subject: Re: [Asterisk-Users] MySQL


>     Matthew,
>
>     I followed these instructions this morning and something about it's
not
> working. I was using the voicemail.conf before and I could login and
> everything worked ok but now I can't login at all. One thing that did get
> fixed was the CDR records when I did the "make install" from the
> asterisk-addons folder.
>
>     In my /etc/my.conf file I have "log=/var/log/mysqld.log" so I can
watch
> what MySQL does. So far it never tries to do anything with the voicemail.
> That's how I noticed the CDR records started working.
>
>     Any ideas?
>
>       Bill
>
>
>
>
> ----- Original Message ----- 
> From: Matthew Boehm
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Sent: Thursday, December 09, 2004 5:29 PM
> Subject: Re: [Asterisk-Users] MySQL
>
>
> 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
>
> _______________________________________________
> 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
>
> _______________________________________________
> 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

_______________________________________________
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