I have this code which was taken from the phpagi project page along with the following in extensions_conf and the output from the asterisk CLI.  When I call the 311 extension, I does nothing then hangs up.  What am I doing wrong??
<br><br>----php code------------<br><br>#!/usr/local/bin/php -q<br>&lt;?php<br>&nbsp; set_time_limit(30);<br>&nbsp; require(&#39;phpagi.php&#39;);<br><br>&nbsp; $agi = new AGI();<br>&nbsp; $agi-&gt;answer();<br>&nbsp; $cid = $agi-&gt;parse_callerid();
<br>&nbsp; $agi-&gt;text2wav(&quot;Hello, {$cid[&#39;name&#39;]}.&nbsp; Let&#39;s enter some text.&quot;);<br>&nbsp; $text = $agi-&gt;text_input(&#39;UPPERCASE&#39;);<br>&nbsp; $agi-&gt;text2wav(&quot;You entered $text&quot;);<br>&nbsp; $agi-&gt;text2wav(&#39;Goodbye&#39;);
<br>&nbsp; $agi-&gt;hangup();<br>?&gt;<br><br>------extensions_custom.php------------<br>exten =&gt; 311,1,Answer<br>exten =&gt; 311,2 Wait(1)<br>exten =&gt; 311,3,DigitTimeout(7)<br>exten =&gt; 311,4,ResponseTimeout(10)<br>exten =&gt; 311,5,AGI(
input.php)<br><br>------CLI output ----------------------<br>&nbsp;-- Executing Answer(&quot;SIP/200-09b20488&quot;, &quot;&quot;) in new stack<br>&nbsp; == Spawn extension (from-internal, 311, 2) exited non-zero on &#39;SIP/200-09b20488&#39;
<br>&nbsp;&nbsp;&nbsp; -- Executing Macro(&quot;SIP/200-09b20488&quot;, &quot;hangupcall&quot;) in new stack<br>&nbsp;&nbsp;&nbsp; -- Executing ResetCDR(&quot;SIP/200-09b20488&quot;, &quot;w&quot;) in new stack<br>&nbsp;&nbsp;&nbsp; -- Executing NoCDR(&quot;SIP/200-09b20488&quot;, &quot;&quot;) in new stack
<br>&nbsp;&nbsp;&nbsp; -- Executing Wait(&quot;SIP/200-09b20488&quot;, &quot;5&quot;) in new stack<br>&nbsp;&nbsp;&nbsp; -- Executing Hangup(&quot;SIP/200-09b20488&quot;, &quot;&quot;) in new stack<br>&nbsp; == Spawn extension (macro-hangupcall, s, 4) exited non-zero on &#39;SIP/200-09b20488&#39; in macro &#39;hangupcall&#39;
<br>&nbsp; == Spawn extension (macro-hangupcall, s, 4) exited non-zero on &#39;SIP/200-09b20488&#39;