<div>We user mySQL in certain instances of AGI and it works great.&nbsp; This information has helped us quite a bit.&nbsp; If you are using php - make sure you are using the CLI version.</div>
<div>&nbsp;</div>
<div><a href="http://phpagi.sourceforge.net/">http://phpagi.sourceforge.net/</a></div>
<div>&nbsp;</div>
<div>Here is a code snip of how we are doing it.</div>
<div>&nbsp;</div>
<div>#!/usr/local/bin/php -q<br>&lt;?php<br>/**<br>* @package phpAGI_examples<br>* @version 2.0<br>*/<br>#<br>set_time_limit(60);<br>require('phpagi.php');<br>$agi = new AGI();<br>$agi-&gt;verbose(&quot;Launching AGI...&quot;);
<br>#<br>$link = mysql_connect(&quot;<a href="http://0.0.0.0">0.0.0.0</a>&quot;, &quot;dbname&quot;, &quot;dbpass&quot;)<br>or die(&quot;Could not connect: &quot; . mysql_error());<br>#<br>mysql_select_db(&quot;dbname&quot;)
<br>or die ('The database specified in database_name must exist and must be accessible by the user specified in mysql_connect');<br>#<br>$query = &quot;SELECT * FROM yourtable&quot;;<br>$agi-&gt;verbose($query);<br>$result = mysql_query ($query)
<br>or die('could not select yourtable file!');<br>$arow = mysql_fetch_array($result);<br>...and so on...<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 6/15/06, <b class="gmail_sendername">Frederic Jean</b> &lt;<a href="mailto:fjean@sunnetgroup.net">fjean@sunnetgroup.net</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div id="ridBody" style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Century Gothic" bgcolor="#ffffff" background="/mail/?view=att&amp;disp=emb&amp;attid=0.0.1&amp;th=10bd7e37f793a2e1">
<div><font face="Arial">Walid,</font></div>
<div><font face="Arial"></font>&nbsp;</div>
<div><font face="Arial">Check the ASTCC agi script ; it just does exactly that:</font></div>
<div><font face="Arial"></font>&nbsp;</div>
<div><font face="Arial"><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.voip-info.org/wiki-ASTCC" target="_blank">http://www.voip-info.org/wiki-ASTCC</a></font></div>
<div><font face="Arial"></font>&nbsp;</div>
<div><font face="Arial">Cheers,</font></div>
<div><font face="Arial">Fred</font></div>
<blockquote style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"></blockquote></div>
<div><span class="e" id="q_10bd7e37f793a2e1_1">
<div style="FONT: 10pt arial">----- Original Message ----- </div>
<div style="BACKGROUND: #e4e4e4; FONT: 10pt arial"><b>From:</b> <a title="wazab@noor.net" onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:wazab@noor.net" target="_blank">Walid Azab</a> </div>
<div style="FONT: 10pt arial"><b>To:</b> <a title="asterisk-users@lists.digium.com" onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com
</a> </div>
<div style="FONT: 10pt arial"><b>Sent:</b> Thursday, June 15, 2006 11:14</div>
<div style="FONT: 10pt arial"><b>Subject:</b> [Asterisk-Users] AGI to read MySQL</div>
<div><br>&nbsp;</div>
<p><span>Hello everyone,</span></p>
<p><span>I am not an expert in Asterisk programming yet. So, can someone help me put my first steps on how to use AGI to access MySQL tables and do queries. Any reference or help is appreciated. My target is to get Festival to read TTS from data stored in MySQL table based on the ID that the caller will input after his call is answered.
</span></p>
<p><span>Thanks</span></p>
<p><span></span>&nbsp;</p></span></div>
<div>
<p>
<hr>

<p></p>_______________________________________________<br>--Bandwidth and Colocation provided by <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://easynews.com/" target="_blank">Easynews.com</a> --<br>
<br>Asterisk-Users mailing list<br>To UNSUBSCRIBE or update options visit:<br>&nbsp;&nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br>
<p></p>
<blockquote></blockquote></p></div></div><br>_______________________________________________<br>--Bandwidth and Colocation provided by <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://easynews.com/" target="_blank">
Easynews.com</a> --<br><br>Asterisk-Users mailing list<br>To UNSUBSCRIBE or update options visit:<br>&nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">
http://lists.digium.com/mailman/listinfo/asterisk-users</a><br><br><br></blockquote></div><br><br clear="all"><br>-- <br>Origination that includes real support!<br><a href="http://www.VoIPStreet.com">http://www.VoIPStreet.com
</a>