[asterisk-bugs] [JIRA] (ASTERISK-27425) Calls are not billed correctly by a2billing - Asterisk 12 and 13

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Mon Nov 20 08:04:07 CST 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240173#comment-240173 ] 

Richard Mudgett edited comment on ASTERISK-27425 at 11/20/17 8:02 AM:
----------------------------------------------------------------------

Hi,
Complement the description of the problem :

1. We were using Asterisk 1.8 and upgraded to Asterisk 13.13-current.  After this  upgrade we've found that the Answered time registered by Asterisk was no longer the actual call time according to [1] so we start using CDR(billsec), however we've noticed that the right time is not being registered.   After debugging the issue according to [2] we found that the right billsec time is being registered in the bridged CDR thread according to the logs attached.

2. The behavior expected is to have the bridged call cdr time registered instead of the time being registered right now which is the time from the initial call and not the bridged one.  This is a DISA service.

3. The behavior encountered is that the CDR registered is the one from the complete call and not the bridged one.

According to this issue [3] it may be possible to do that what we want but is not clear how.

Attached log of the tests performed cdr_log2.txt

Thanks in advance for your help

[1] ASTERISK-25336
[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+CDR+Specification
[3] ASTERISK-24652



was (Author: jansuar):
Hi,
Complement the description of the problem :

1. We were using Asterisk 1.8 and upgraded to Asterisk 13.13-current.  After this  upgrade we've found that the Answered time registered by Asterisk was no longer the actual call time according to [1] so we start using CDR(billsec), however we've noticed that the right time is not being registered.   After debugging the issue according to [2] we found that the right billsec time is being registered in the bridged CDR thread according to the logs attached.

2. The behavior expected is to have the bridged call cdr time registered instead of the time being registered right now which is the time from the initial call and not the bridged one.  This is a DISA service.

3. The behavior encountered is that the CDR registered is the one from the complete call and not the bridged one.

According to this issue [3] it may be possible to do that what we want but is not clear how.

Attached log of the tests performed cdr_log2.txt

Thanks in advance for your help

[1] https://issues.asterisk.org/jira/browse/ASTERISK-25336
[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+CDR+Specification
[3] https://issues.asterisk.org/jira/browse/ASTERISK-24652


> Calls are not billed correctly by a2billing - Asterisk 12 and 13
> ----------------------------------------------------------------
>
>                 Key: ASTERISK-27425
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27425
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_dial, CDR/General, Functions/func_cdr
>    Affects Versions: 12.0.0, 13.13.0
>         Environment: A2Billing 2.20 and Asterisk  13.13-current
>            Reporter: Andrea Suarique
>            Assignee: Unassigned
>         Attachments: cdr_log2.txt, cdr_log.txt
>
>
> The CDR(billsec) and (ANSWEREDTIME) is not measuring the answered time accurately.
> We debugging the issue and found what may the problem be.
> According to [1] it seem that the CDR(billsec) is registering the answered time of the initial call and not the answered time of the bridged one (I mean after dialing the number on the DISA and the other party answering the call )
> We CDR debug we found the right answered time data in the bridged CDR thread as shown in this log:
> {noformat}
>     -- SIP/sipetb-00000009 is ringing
>     -- SIP/sipetb-00000009 is making progress passing it to SIP/sipetb-00000008
>     -- SIP/sipetb-00000009 answered SIP/sipetb-00000008
> 0x7f2c04002830 - Set answered time to 1510800709.529550
> Dial End message for SIP/sipetb-00000008, SIP/sipetb-00000009: 1510800709.00529783
> 0x7f2c04000970 - Processing Dial End message for channel SIP/sipetb-00000008, peer SIP/sipetb-00000009
> 0x7f2c04000970 - Transitioning CDR for SIP/sipetb-00000008 from state Dial to DialedPending
>     -- Channel SIP/sipetb-00000009 joined 'simple_bridge' basic-bridge <40047399-8742-427f-8b36-e9f4eec1f8bc>
> Bridge Enter message for channel SIP/sipetb-00000009: 1510800709.00529977
> 0x7f2c04002830 - Updating Party A SIP/sipetb-00000009 snapshot
> 0x7f2c04002830 - Processing bridge enter for SIP/sipetb-00000009
> 0x7f2c04002830 - Transitioning CDR for SIP/sipetb-00000009 from state Single to Bridged
>     -- Channel SIP/sipetb-00000008 joined 'simple_bridge' basic-bridge <40047399-8742-427f-8b36-e9f4eec1f8bc>
>        
> Bridge Enter message for channel SIP/sipetb-00000008: 1510800709.00530039
> 0x7f2c04000970 - Updating Party A SIP/sipetb-00000008 snapshot
> 0x7f2c04000970 - Processing bridge enter for SIP/sipetb-00000008
> 0x7f2c04000970 - Transitioning CDR for SIP/sipetb-00000008 from state DialedPending to Dial
> 0x7f2c04000970 - Transitioning CDR for SIP/sipetb-00000008 from state Dial to Bridged
>     -- Remote UNIX connection
>     -- Remote UNIX connection disconnected
>     -- Remote UNIX connection
>     -- Remote UNIX connection disconnected
>     -- Remote UNIX connection
>     -- Remote UNIX connection disconnected
>     -- Channel SIP/sipetb-00000009 left 'simple_bridge' basic-bridge <40047399-8742-427f-8b36-e9f4eec1f8bc>
>     -- Channel SIP/sipetb-00000008 left 'simple_bridge' basic-bridge <40047399-8742-427f-8b36-e9f4eec1f8bc>
> Bridge Leave message for SIP/sipetb-00000009: 1510800739.00509557
> 0x7f2c04002830 - Processing Bridge Leave for SIP/sipetb-00000009
> 0x7f2c04002830 - Transitioning CDR for SIP/sipetb-00000009 from state Bridged to Finalized
> 0x7f2c04000970 - Transitioning CDR for SIP/sipetb-00000008 from state Bridged to Finalized
> 0x7f2c04002830 - Beginning finalize/dispatch for SIP/sipetb-00000009
> 0x7f2c04002830 - Dispatching CDR for Party A SIP/sipetb-00000009, Party B <none>
> Bridge Leave message for SIP/sipetb-00000008: 1510800739.00509705
>  a2billing_cc3.php,6: file:Class.RateEngine.php - line:1281 - uniqueid:1510800680.13 - DIAL SIP/sipetb/033168456954,60,rL(20460000:0)
>  a2billing_cc3.php,6: file:Class.RateEngine.php - line:1164 - uniqueid:1510800680.13 - [TRUNK STATUS UPDATE : UPDATE cc_trunk SET inuse=inuse-1 WHERE id_trunk='2']
>  a2billing_cc3.php,6: file:Class.RateEngine.php - line:1433 - uniqueid:1510800680.13 - -> dialstatus : ANSWER, answered time is 47
>  a2billing_cc3.php,6:
>  a2billing_cc3.php,6: file:Class.RateEngine.php - line:1437 - uniqueid:1510800680.13 - [USEDRATECARD=0]
>  a2billing_cc3.php,6: file:a2billing_cc3.php - line:736 - uniqueid:1510800680.13 - :[DIALEDTIME: ->59<- ]17366200
>  a2billing_cc3.php,6: file:a2billing_cc3.php - line:740 - uniqueid:1510800680.13 - :[DIALSTATUS: ->ANSWER<- ]17366200
>  a2billing_cc3.php,6: file:a2billing_cc3.php - line:744 - uniqueid:1510800680.13 - :[CDRSTARTTIME: ->2017-11-15 21:51:31<- ]17366200
>  a2billing_cc3.php,6: file:a2billing_cc3.php - line:748 - uniqueid:1510800680.13 - :[CDRANSWER: ->2017-11-15 21:51:31<- ]17366200
>  a2billing_cc3.php,6: file:a2billing_cc3.php - line:752 - uniqueid:1510800680.13 - :[CDRend: ->2017-11-15 21:52:19<- ]17366200
>  a2billing_cc3.php,6: file:a2billing_cc3.php - line:756 - uniqueid:1510800680.13 - :[CDRduration: ->47<- ]17366200
>  a2billing_cc3.php,6: file:a2billing_cc3.php - line:760 - uniqueid:1510800680.13 - :[CDRbillsec: ->47<- ]17366200
>  a2billing_cc3.php,6: file:a2billing_cc3.php - line:764 - uniqueid:1510800680.13 - :[CDRdisposition: ->ANSWERED<- ]17366200
>  a2billing_cc3.php,6: file:a2billing_cc3.php - line:768 - uniqueid:1510800680.13 - :[ANSWERED: ->59<-]
> {noformat}
> What we need to do is to make the CDRANSWER variable to take the answered time registered in CDR thread 0x7f2c04002830 instead of using the one provided by the CDR thread 0x7f2c04000970



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list