Hello,<br>&nbsp; I want to create php rate script and I&#39;m using Deadagi. But I allways get billsec 0 , or nothing. Can you help me to solve this problem...<br>My extension.conf:<br>exten =&gt; _123,1,DeadAgi(rate.php)<br>exten =&gt; _123,2,hangup
<br><br>And my simple test php script rate.php<br>#!/usr/local/bin/php -q<br>&lt;?php<br>include_once (dirname(__FILE__).&quot;/phpagi.php&quot;);<br>$AGI = new AGI();<br><br>$AGI-&gt;answer();<br><br>$AGI-&gt;stream_file(&#39;demo-thanks&#39;);
<br>$AGI-&gt;stream_file(&#39;vm-goodbye&#39;);<br>&nbsp;&nbsp;&nbsp; <br>$AGI-&gt;hangup();<br><br>$billsec = get_var($AGI,&quot;CDR(billsec)&quot;);<br>debug(&quot;Billsec: $billsec&quot;, 1);<br><br>function debug($string, $level=3) {
<br>&nbsp;&nbsp;&nbsp; global $AGI;<br>&nbsp;&nbsp;&nbsp; $AGI-&gt;verbose($string, $level);<br>}<br><br>function get_var( $agi, $value) {<br>&nbsp;&nbsp;&nbsp; $r = $agi-&gt;get_variable( $value );<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; if ($r[&#39;result&#39;] == 1) &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $result = $r[&#39;data&#39;];
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return $result;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return &#39;&#39;;<br>}<br><br>?&gt;<br><br>