<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Rollin,</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>My real-time works fine, Nathan was the
original poster o this message. I simply added the table structure for real-time
voicemail </span></font><font size=2 color=navy face=Wingdings><span
style='font-size:10.0pt;font-family:Wingdings;color:navy'>J</span></font></p>
<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Damon,<br>
<br>
You may be querying the wrong table, because the following fields in your
Select statement do not exit<br>
in the table, voicemail_users, that you created:<br>
<br>
category,<br>
var_name,<br>
var_val,<br>
cat_metric,<br>
filename,<br>
commented<br>
<br>
Every item mentioned in a Select query must exist in the table that is being
queried.<br>
<br>
Rollin Weeks<br>
<br>
<br>
</span></font></p>
<div>
<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 8/10/05, <b><span style='font-weight:bold'>Damon
Estep</span></b> <<a href="mailto:damon@suburbanbroadband.net">damon@suburbanbroadband.net</a>>
wrote:</span></font></span></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
> I'm having a few issues with the MySQL realtime configuration in<br>
> CVS-HEAD. I tested it initially with realtime extensions (realtime_ext<br>
> => mysql,asterisk,extensions) and a realtime switch in extensions.conf <br>
> and that works fine, So I though I'd go back and test a static<br>
> configuration mapping.<br>
><br>
> I used the table structure from the asterisk guru postgres howto to<br>
> create something similar in MySQL (shown below) and included the <br>
> following in extconfig;<br>
><br>
> voicemail.conf => mysql,asterisk,voicemail_users<br>
><br>
> The result is that app_voicemail fails to load and it appears from the<br>
> debug that it is not happy with the table structure... however the <br>
names<br>
> it has for the fields seem strange (to me that is :))<br>
><br>
> If anyone has gone through the process of creating the correct tables<br>
in<br>
> MySQL and doesn't mind sharing I would be most appreciative. <br>
><br>
> Regards,<br>
><br>
> Nathan.<br>
><br>
><br>
> ####MySQL Table####<br>
> CREATE TABLE voicemail_users (<br>
> id int NOT NULL auto_increment,<br>
> customer_id varchar(255) NOT NULL default '0', <br>
> context varchar(255) NOT NULL default '',<br>
> mailbox varchar(255) NOT NULL default '',<br>
> password varchar(4) NOT NULL default '0',<br>
> fullname varchar(50) NOT NULL default '',<br>
> email varchar(50) NOT NULL default '', <br>
> pager varchar(50) NOT NULL default '',<br>
> stamp datetime NOT NULL default '0000-00-00 00:00:00',<br>
> PRIMARY KEY (`id`)<br>
> );<br>
> #######<br>
><br>
> ####res_mysql.conf####<br>
> [general] <br>
> dbhost = localhost<br>
> dbname = asterisk<br>
> dbuser = asterisk<br>
> dbpass = ********<br>
> dbport = 3306<br>
> dbsock = /var/run/mysqld/mysqld.sock<br>
> ####<br>
><br>
> ####Debug Log####<br>
> Aug 11 01:16:23 DEBUG[1028] res_config_mysql.c: MySQL RealTime: Static<br>
> SQL: SELECT category, var_name, var_val, cat_metric FROM<br>
voicemail_users<br>
> WHERE filename='voicemail.conf' and commented=0 ORDER BY filename, <br>
> cat_metric desc, var_metric asc, category, var_name, var_val, id<br>
> Aug 11 01:16:23 DEBUG[1028] res_config_mysql.c: MySQL RealTime:<br>
> Everything is fine.<br>
> Aug 11 01:16:23 DEBUG[1028] res_config_mysql.c: MySQL RealTime: Query: <br>
> SELECT category, var_name, var_val, cat_metric FROM voicemail_users<br>
> WHERE filename='voicemail.conf' and commented=0 ORDER BY filename,<br>
> cat_metric desc, var_metric asc, category, var_name, var_val, id <br>
> Aug 11 01:16:23 DEBUG[1028] res_config_mysql.c: MySQL RealTime: Query<br>
> Failed because: Unknown column 'category' in 'field list'<br>
> ####<br>
> _______________________________________________<br>
<br>
This works for voicemail in CVS-HEAD<br>
<br>
CREATE TABLE `voicemail` (<br>
`uniqueid` int(11) NOT NULL auto_increment,<br>
`customer_id` int(11) NOT NULL default '0',<br>
`context` varchar(50) NOT NULL default '',<br>
`mailbox` varchar(10) NOT NULL default '0', <br>
`password` varchar(4) NOT NULL default '0',<br>
`fullname` varchar(50) NOT NULL default '',<br>
`email` varchar(50) NOT NULL default '',<br>
`pager` varchar(50) NOT NULL default '',<br>
`stamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update <br>
CURRENT_TIMESTAMP,<br>
PRIMARY KEY (`uniqueid`),<br>
KEY `mailbox_context` (`mailbox`,`context`)<br>
) ENGINE=MyISAM DEFAULT CHARSET=latin1;<br>
_______________________________________________<br>
Asterisk-Users mailing list <br>
<a href="mailto:Asterisk-Users@lists.digium.com">Asterisk-Users@lists.digium.com</a><br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
</div>
</div>
</body>
</html>