[asterisk-dev] Problem in Voicemail Database Connectivity

jamshed zaidi jamshed_z at hotmail.com
Tue Feb 20 01:36:43 MST 2007


I already have an access from my mysql support panel to use database but the 
problem is still there... How do i change contents of voicemail.. like pass, 
username etc as comedian mail menu change it. Is there any way to handle 
voicemail contents with mysql database???.I want that i use database named 
"asterisk" and when i update its table "voicemail" through perl script  then 
these changes will also appear on the voicemail.conf file. How can i do it 
??????????? any one can help me.
<html><div><PRE class=quote><IMG height=2 
src="http://graphics.hotmail.com/greypixel.gif" width="100%" 
vspace=9></PRE><PRE class=quote><FONT face="Courier New, Courier, Monospace" 
color=#000033 size=2>Syed Jamshed Zaidi
<BR>Asterisk Admin/Developer
<BR>@ Axvoice +92-0321-4087492
<BR>(JAMY-VIRUS)</FONT></PRE><PRE class=quote><PRE class=quote><FONT 
face="Courier New, Courier, Monospace" color=#000033 size=2>"Shoot for the 
moon. Even if you miss, you'll land among the 
stars"</FONT></PRE></PRE></div></html>




>From: "Alexandr Olekhnovich" <a.olekhnovich at gmail.com>
>Reply-To: Asterisk Developers Mailing List <asterisk-dev at lists.digium.com>
>To: "Asterisk Developers Mailing List" <asterisk-dev at lists.digium.com>
>Subject: Re: [asterisk-dev] Problem in Voicemail Database Connectivity
>Date: Mon, 19 Feb 2007 14:44:52 +0200
>
>I'm not sure, but I think DB user has no access to mysql tables. Try to
>connect to mysql database from the command prompt and give grant options to
>myuser.
>
>Something like that:
>
>shell> mysql --user=root mysql
>
>If you have assigned a password to the root account, you'll also need to
>supply a --password or -p
>option for this mysql command and also for those later in this section.
>After connecting to the server as root, you can add new accounts. The
>following statements use
>
>GRANT to set up four new accounts:
>
>mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
>-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
>mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
>-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
>mysql> GRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost';
>mysql> GRANT USAGE ON *.* TO 'dummy'@'localhost';
>
>For Asterisk Voice mail you have to write something like
>mysql> GRANT ALL PRIVILEGES ON Asterisk.Voicemail TO
>'myuser'@'localhost' IDENTIFIED
>BY 'mypass' WITH GRANT OPTION;
>
>Note: In the example above Asterisk is a Database name and Voicemail is a
>Voice mail table.
>
>
>On 2/19/07, jamshed zaidi <jamshed_z at hotmail.com> wrote:
>>
>>
>>Hi Guys, I am new to asterisk development. I am facing real problems in
>>accessing voicemail contents like its password, username etc.... I am
>>writing the perl script for web interface that will reset the the password
>>of voicemail from mysql database as  commedian voicemail does change it in
>>asterisk.  I am facing list of problems
>>
>>1). How do i enable mysql support for voicemail in Asterisk1.4.0. For this
>>i
>>have gone through the following article
>>http://www.voip-info.org/wiki/view/Asterisk+voicemail+database
>>but i didnt find "mysql-vm-routines.h"  in asterisk-addonns-1.4.0.
>>
>>i updated my voicemail.conf file with
>>dbuser=myuser
>>dbname=asterisk
>>dbpass=mypass
>>dbhost=localhost
>>
>>when i run my following perl script
>>my $DB_Name="asterisk";
>>my $DB_Host= "127.0.0.1";
>>my $DB_User="myuser";
>>my $DB_Pass="mypass";
>>
>>my $dbh =
>>DBI->connect("DBI:mysql:$dbname=$DB_Name","$DB_User","$DB_Pass");
>>my $sth = $dbh->prepare(qq{select fullname,context from voicemail where
>>mailbox='1234' and password='1234' and context='[default]'});
>>
>>THEN IT SHOWS THE FOLLOWING ERROR
>>
>>"DBI connect('=asterisk','myuser',...) failed: Access denied for user
>>'myuser'@'localhost' (using password: YES) at resetPass.pl line 15
>>Can't call method "prepare" on an undefined value at resetPass.pl line 16,
>><STDIN> line 1."
>>
>>Please reply me as soon as possible.....thanx in advance
>>
>>
>><html><div><PRE class=quote><IMG height=2
>>src="http://graphics.hotmail.com/greypixel.gif" width="100%"
>>vspace=9></PRE><PRE class=quote><FONT face="Courier New, Courier,
>>Monospace"
>>color=#000033 size=2>Syed Jamshed Zaidi
>><BR>Asterisk Admin/Developer
>><BR>@ Axvoice +92-0321-4087492
>><BR>(JAMY-VIRUS)</FONT></PRE><PRE class=quote><PRE class=quote><FONT
>>face="Courier New, Courier, Monospace" color=#000033 size=2>"Shoot for the
>>moon. Even if you miss, you'll land among the
>>stars"</FONT></PRE></PRE></div></html>
>>
>>_________________________________________________________________
>>Don't just search. Find. Check out the new MSN Search!
>>http://search.msn.com/
>>
>>_______________________________________________
>>--Bandwidth and Colocation provided by Easynews.com --
>>
>>asterisk-dev mailing list
>>To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>>
>
>
>
>--
>Best Regards
>Alexandr Olekhnovich


>_______________________________________________
>--Bandwidth and Colocation provided by Easynews.com --
>
>asterisk-dev mailing list
>To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



More information about the asterisk-dev mailing list