[asterisk-bugs] [Asterisk 0019259]: 3 examples of loss of CDR data

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 12 07:03:28 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19259 
====================================================================== 
Reported By:                one47
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19259
Category:                   CDR/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.6.2.18 
JIRA:                       SWP-3436 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-05-10 05:23 CDT
Last Modified:              2011-05-12 07:03 CDT
====================================================================== 
Summary:                    3 examples of loss of CDR data
Description: 
Discovered in 1.6.2.18, but looking at 1.8 and trunk, it probably still
applies, as this code appears to be largely unchanged.

If transferring (ast_do_masquerade) a bridged channel into an unbridged
channel, CDR data is lost. I have found 3 scenarios so far where CDR data
or records are lost.
====================================================================== 

---------------------------------------------------------------------- 
 (0134827) one47 (reporter) - 2011-05-12 07:03
 https://issues.asterisk.org/view.php?id=19259#c134827 
---------------------------------------------------------------------- 
It transpires that Scenarios 2 and 3 fail differently depending on which
party is transferred out of the bridge. If it is the originating channel,
which has a chan->pbx object, then it can use ast_explicit_goto, otherwise
it uses ast_async_goto involving a masquerade.

I am uploading 2 patches for comment.

- cdr-patch1-cleanup: removes some code which I believe to be redundant.
This is just changes I stumbled on while understanding the code.

- cdr-patch2-explicit_goto: If a call returns to the pbx loop due to
ast_async_goto, and has a CDR, and is not about to hang-up, and the channel
is currently AST_STATE_UP, then any time that elapses is "billable".
Unfortunately the specialised CDR reset will have made it an AST_CDR_NULL
record, so we need to re-answer the CDR.

Without the 2nd patch, you get different CDR data for the following 2
cases:


exten => *600,1,Playback(demo-echotest)
same  =>      n,Hangup


exten => *601,1,Answer
same  =>      n,Playback(demo-echotest)
same  =>      n,Hangup


With the patch, you get the same result.

The only obvious difference this patch will cause is that if you
blind-transfer to a dialplan with a Dial() command, then the ring-duration
for that Dial() command cannot be recorded in the CDR. I believe this is
correct, because Ringing being played on an UP channel is still billable
seconds. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-12 07:03 one47          Note Added: 0134827                          
======================================================================




More information about the asterisk-bugs mailing list