Hello,<br> I want to create php rate script and I'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 => _123,1,DeadAgi(rate.php)<br>exten => _123,2,hangup
<br><br>And my simple test php script rate.php<br>#!/usr/local/bin/php -q<br><?php<br>include_once (dirname(__FILE__)."/phpagi.php");<br>$AGI = new AGI();<br><br>$AGI->answer();<br><br>$AGI->stream_file('demo-thanks');
<br>$AGI->stream_file('vm-goodbye');<br> <br>$AGI->hangup();<br><br>$billsec = get_var($AGI,"CDR(billsec)");<br>debug("Billsec: $billsec", 1);<br><br>function debug($string, $level=3) {
<br> global $AGI;<br> $AGI->verbose($string, $level);<br>}<br><br>function get_var( $agi, $value) {<br> $r = $agi->get_variable( $value );<br> <br> if ($r['result'] == 1) {<br> $result = $r['data'];
<br> return $result;<br> }<br> else<br> return '';<br>}<br><br>?><br><br>