[asterisk-bugs] [JIRA] (ASTERISK-24652) Confbridge interaction with CDR

Matt Jordan (JIRA) noreply at issues.asterisk.org
Wed Jan 14 20:27:34 CST 2015


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

Matt Jordan commented on ASTERISK-24652:
----------------------------------------

The CDR specification is pretty clear about this:

[https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+CDR+Specification]

{quote}
CDR Overview

A CDR is a record of communication between one or two parties. As such, a single CDR always addresses the communication between two parties: a Party A and a Party B. The CDR reflects the view of the call from the perspective of Party A, while Party B is the party that Party A is communicating with. Each CDR includes the following times:

* Start time - the time at which the CDR was created for Party A
* Answer time - the time at which Party A and Party B could begin communicating
* End time - the time at which Party A and Party B could no longer communicate

>From these times, two durations are computed:

* Duration - the End time minus the Start time.
* Billsec - the End time minus the Answer time. (Whether or not you actually bill for this period of time is up to you)

A single CDR only tracks information about a single path of communication between two endpoints. In many scenarios, there will be multiple paths of communication between multiple parties, even in a single "call". Each path of communication results in a new CDR, each representing the communication between two endpoints. All of the CDRs involved are associated by virtue of a special linked identifier field, linkedid. The CDRs themselves, however, typically do not aggregate the time between records. It is up to billing systems to determine which CDRs should be used for their billing records, and add up the times/durations themselves.
{quote}

As the CDR specification states, a CDR represents a path of communication between two parties. A single CDR is not going to be able to account for:
* Multiple aggregate time periods, which is what occurs in your scenario.
* Any time multiple parties are involved, which is what occurs often in ConfBridge.

As I stated previously, Asterisk provides you the tools to have finer grained control over the CDRs:
{quote}
Note that if you want to control the CDRs in a more fine-grained fashion, you can use the ForkCDR or CDR_PROP functions. If you want CDRs for the time that channels were in the system prior to going into the ConfBridge, Fork the CDRs prior to going into the ConfBridge. If you want only the time the channels were in the ConfBridge, disable the CDR, Fork it, then enable the new CDR.
{quote}

Barring that, Asterisk provides CEL, so that you can build your own billing system on top of the channel events.

> Confbridge interaction with CDR
> -------------------------------
>
>                 Key: ASTERISK-24652
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24652
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_cdr, Applications/app_confbridge
>    Affects Versions: 13.0.2
>         Environment: centos6 i386
>            Reporter: Jonathan White
>            Assignee: Rusty Newton
>         Attachments: full, full
>
>
> I have noticed CDR is not reporting the correct duration for some calls.
> In my case I have calls being answered and a dialplan request for a pin before placing the caller into a confbridge.
> In some instances the duration of the call is reported to be the number of seconds before the call is placed into confbridge but none of the confbridge seconds are reported.
> If I put a second call into the same bridge the first call will report the correct call duration but the second call will report the duration of the call up to the point it is placed into the confbridge.
> My cdr config is simple. I am using CDR adaptive
> {noformat}
> [asterisk]
> connection=asterisk-odbc
> table=ast_cdr
> alias start => calldate
> {noformat}
> In addition I get a double entry for the CDR(userfield) I assume the combination of the two channels in the confbridge but this is only for the first call which enters the bridge not the second.
> Below is an example of the CDR output. The first line is the first call which shows the correct duration and billsec of 43 seconds. It also shows a double entry for CDR(userfield) Bridge-1005;Bridge-1005
> {noformat}
> "2014-12-28 02:31:00";"""2581"" <2581>";"2581";"1001";"apps";"SIP/2581-00000010";"SIP/2581-00000011";"ConfBridge";"1005,,user_admin,menu_admin";"43";"43";"ANSWERED";"3";;"1419733860.55";"Bridge-1005;Bridge-1005"
> {noformat}
> The second call only reports 18 seconds for billsec which is the amount of time the call lasts before being placed into the confbridge. This CDR record reports corectly the CDR(userfield) as Bridge-1005
> {noformat}
> "2014-12-28 02:31:22";"""2581"" <2581>";"2581";"1001";"apps";"SIP/2581-00000011";;"ConfBridge";"1005,,user_participant,menu_participant";"19";"18";"ANSWERED";"3";;"1419733882.59";"Bridge-1005"
> {noformat}
> My suspicion is there is an issue with how confbridge interacts with CDR



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



More information about the asterisk-bugs mailing list