Hi,<br><br>I&#39;m trying to write a AGI in PHP to get the numbers dialed (with read()), save it into a variable to insert it into a SQL server database. But I cannot see results into the variable, it always return NULL. <br>
Here is a piece of the AGI.<br><br>fwrite(STDOUT,&quot;exec Read my_var|/sound_to_play|5|||15 \n&quot;);<br>fflush(STDOUT);<br>$conn=odbc_connect(&#39;MSSQL&#39;, &#39;USER&#39;, &#39;PASS&#39;);<br>$query = odbc_exec($conn, &quot;INSERT INTO dialed(number) VALUES(&#39;$my_var&#39;)&quot;);
<br><br>Even if I only show my_var value or try to use it inside asterisk, the value is NULL.<br>There is another way to do it? Am I doing a mistake here?<br>I&#39;m using Asterisk 1.2.13.<br><br clear="all">Thank you all.
<br><br>-- <br>Ralph Liebessohn<br>ICQ: 74835911<br>Skype: liebessohn