[asterisk-bugs] [Asterisk 0011849]: Missing CDR's for Transfers

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Jun 1 18:02:46 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=11849 
====================================================================== 
Reported By:                greyvoip
Assigned To:                mnicholson
====================================================================== 
Project:                    Asterisk
Issue ID:                   11849
Category:                   CDR/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.17 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2008-01-26 11:11 CST
Last Modified:              2009-06-01 18:02 CDT
====================================================================== 
Summary:                    Missing CDR's for Transfers
Description: 
At the moment there is one CDR generated per generic bridge. This tends not
to create any problems when the bridge has been created by something like:

SIP User -> Asterisk -> PSTN

The CDR generated will have the PSTN number as the destination and the SIP
User's accountcode.

When a transfer is undertaken the one CDR per generic bridge approach
breaks down. An example call flow for a blind transfer is:

SIP User -> Asterisk -> PSTN
PSTN <- Asterisk -> PSTN (this is after the user has blind transferred the
first call to a second PSTN number)

At the moment Asterisk will correctly generate a CDR for the first call
leg but for the second call leg there is a problem. For the sconed call leg
both ends of the bridge are now billable but as Asterisk only generates a
single CDR per bridge one of the legs will not get billed. 

A straight forward fix (at least architecturally) would be to generate a
CDR for each end of the bridge instead of combining both ends into a single
CDR. It would mean some extra CDR's for the standard SIP User -> PSTN call
but it's a lot easier to filter out CDR's to ignore than it is to try and
work out how to handle ones that are missing.

I've classified this as major since it's costing me (and other providers)
money every time a user does a transfer :).
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0013892 After upgrading from 1.4.21.2 to 1.4.22...
related to          0014398 Calls coming in then out do not get rec...
====================================================================== 

---------------------------------------------------------------------- 
 (0105872) sverre (reporter) - 2009-06-01 18:02
 https://issues.asterisk.org/view.php?id=11849#c105872 
---------------------------------------------------------------------- 
Yes this was my understanding as well, that we're waiting on the CDR
rewrite to fix it.

In the mean time, I've updated the AGI scripts I posted a while ago which
adds a "transferto" field to a MySQL based CDR record. In the original (and
posted version), the transferto field points to the dstchannel of the
continuing CDR, however this version didn't work in all circumstances.

I have a new version which I will post shortly that uses the transferto
field to point to the uniqueid field.

Either way the result is that by doing a self join in MySQL, you can have
a field called newbillsec which is equal to cdr_1.billsec + cdr_2.billsec,
which means that you end up with one 2000 second CDR, and one 2005 second
CDR - exactly what I need.

It would be better if CDRs natively supported the transferto field that
I've created, but depending on how far NewCDR is it could be a waste of
effort. So I perceive there are 3 solutions:

1. Use my AGI scripts as a workaround
2. Add native support for transferfield as a workaround
3. Finish NewCDR 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-06-01 18:02 sverre         Note Added: 0105872                          
======================================================================




More information about the asterisk-bugs mailing list