AGI CDR Update (with set variable) problem.

Home » Asterisk Users » AGI CDR Update (with set variable) problem.
Asterisk Users No Comments

hello,

First of all i am using Asterisk 1.6.2.9-2

The following problem seem like a bug to me but im not sure.

Any help or comment will be great..

We are trying to implement our own billing software with AGI – Php Scripts.

When a hangup received, i am calling a script to calculate the bill and we
are trying to write the results to cdr database.

We added two fileds to cdr table as rate and cost.

When we call a number and the other party doesnt hang up, rate (the targets
rate according to our rates table) and cost (calculated cost according to
rate and billable seconds) is written to database correctly.(sure cost is 0
because of hangup.)

But, if other party picks up the phone, and makes the call, even at debug of
php, i can see all the data correctly, it doesnt update the cdr fileds
correct.

Here is the php script output and cdr output of the calls.

No answer:

aftercall.php: [agi_context] => DLPN_WorldcallDial

aftercall.php: [agi_extension] => h

aftercall.php: [agi_priority] => 2

aftercall.php: [agi_enhanced] => 0.0

aftercall.php: [agi_accountcode] =>

aftercall.php: [agi_threadid] => 139906110289680

aftercall.php: >code<: 200 aftercall.php: >result<: 1 aftercall.php: >data<: aftercall.php: >code<: 200 aftercall.php: >result<: 1 aftercall.php: >data<: 0.04830 aftercall.php: >>>>>>>>>>rate:0.04830

aftercall.php: >>>>>>>>>>duration: