[asterisk-users] deadagi and billsec or answeredtime
Giedrius Augys
voipas at gmail.com
Tue Aug 28 06:24:52 CDT 2007
I solve this problem. I'm not sure, but you get billsec when you use Dial
application. Using dial app , I get billsec.
2007/8/28, Atis <atis at best.eu.org>:
>
> On 8/28/07, Giedrius Augys <voipas at gmail.com> wrote:
> > Hello,
> > 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...
>
> It seems that there is problem with Answer(). Does it get executed
> from AGI? Do you hear voice prompts?
>
> You can try adding Answer() before DeadAgi().
>
> Regards,
> Atis
>
> > My extension.conf:
> > exten => _123,1,DeadAgi(rate.php)
> > exten => _123,2,hangup
> >
> > And my simple test php script rate.php
> > #!/usr/local/bin/php -q
> > <?php
> > include_once (dirname(__FILE__)."/phpagi.php");
> > $AGI = new AGI();
> >
> > $AGI->answer();
> >
> > $AGI->stream_file('demo-thanks');
> > $AGI->stream_file('vm-goodbye');
> >
> > $AGI->hangup();
> >
> > $billsec = get_var($AGI,"CDR(billsec)");
> > debug("Billsec: $billsec", 1);
> >
> > function debug($string, $level=3) {
> > global $AGI;
> > $AGI->verbose($string, $level);
> > }
> >
> > function get_var( $agi, $value) {
> > $r = $agi->get_variable( $value );
> >
> > if ($r['result'] == 1) {
> > $result = $r['data'];
> > return $result;
> > }
> > else
> > return '';
> > }
> >
> > ?>
> >
> >
> > _______________________________________________
> > --Bandwidth and Colocation Provided by http://www.api-digital.com--
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> >
>
>
> --
> Atis Lezdins,
> IT Responsible of BEST Riga,
> atis at BEST.eu.org
> ICQ: 142239285
> Skype: atis.lezdins
> Cell Phone: +371 28806004 [Tele2, Latvia]
> Work phone: +1 800 7502835 [Toll free, USA]
> ?BEST? -> www.BEST.eu.org
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
Pagarbiai / Best Regards,
Giedrius Augys
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070828/d52a83ad/attachment.htm
More information about the asterisk-users
mailing list