[asterisk-bugs] [JIRA] (ASTERISK-16998) AGI CDR Update bug

Matt Jordan (JIRA) noreply at issues.asterisk.org
Sun Jun 16 22:45:03 CDT 2013


     [ https://issues.asterisk.org/jira/browse/ASTERISK-16998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Jordan closed ASTERISK-16998.
----------------------------------

    Resolution: Not A Bug
    
> AGI CDR Update bug
> ------------------
>
>                 Key: ASTERISK-16998
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-16998
>             Project: Asterisk
>          Issue Type: Bug
>          Components: Applications/General
>            Reporter: Oguzhan Kayhan
>            Severity: Minor
>
> We are trying to adapt an php-agi script to calculate billing. At hangup detected, we run a script called aftercall.php to calculate total bill and set this value to CDR. We added two additional fields as cost and rate to CDR table.
> in aftercall.php we calculate the values and update the fields with 
> $agi->exec("set", "CDR(userfield)={$cost}");
> $agi->exec("set", "CDR(rate)={$rateArray['data']}");
> $agi->exec("set", "CDR(cost)={$cost}");
> When a call made and other party doenst answer, it updates rate field correctly(which is a constant value) but, if other party answers set function doesnt work and no data written to this 2 fields . THis is when hangup deteceted without anwer:
> aftercall.php: >>>>>>>>>>rate:0.04830
> aftercall.php: >>>>>>>>>>duration:
>     -- AGI Script Executing Application: (set) Options: (CDR(userfield)=0)
>     -- AGI Script Executing Application: (set) Options: (CDR(rate)=0.04830)
>     -- AGI Script Executing Application: (set) Options: (CDR(cost)=0) aftercall.php: >>>>>>>>>>>>>>>>cost:0
>     -- <SIP/10010-0000000c>AGI Script aftercall.php completed, returning 0
> at the end cdr fields (rate and cost field) set correctly on logs.
> This is call after answer:
> aftercall.php: >>>>>>>>>>duration:5
>     -- AGI Script Executing Application: (set) Options:
> (CDR(userfield)=0.0483)
>     -- AGI Script Executing Application: (set) Options: (CDR(rate)=0.04830)
>     -- AGI Script Executing Application: (set) Options: (CDR(cost)=0.0483)
>  aftercall.php: >>>>>>>>>>>>>>>>cost:0.0483
> At the end cdr fields rate and cost set empty (As default values of sql 0.00)
> There is no difference between 2 calls except one is no answer, other is answered.
> ****** ADDITIONAL INFORMATION ******
> Asterisk version of default debian resp. 1.6.2.9-2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list