[asterisk-users] deadagi and billsec or answeredtime
Atis
atis at BEST.eu.org
Tue Aug 28 07:25:57 CDT 2007
On 8/28/07, Giedrius Augys <voipas at gmail.com> wrote:
> I solve this problem. I'm not sure, but you get billsec when you use Dial
> application. Using dial app , I get billsec.
Well, Dial usually changes ANSWER status, because you usually answer
phone that is ringing. If you won't answer, you won't get billsec.
Regards,
Atis
> 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
> _______________________________________________
> --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
More information about the asterisk-users
mailing list