[Home]

Summary:ASTERISK-14667: [patch] CDR dispositions BUSY and FAILED are reported as NO ANSWER
Reporter:Antoine Megalla (aatef)Labels:
Date Opened:2009-11-04 13:04:58.000-0600Date Closed:2009-12-18 17:04:45.000-0600
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:CDR/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bug16180.patch
Description:Asterisk 1.4.26.2 and I think all Asterisk versions after 1.4.20 all report the calls with Disposition BUSY and FAILED as NO ANSWER calls.
So in the CDR there are only 2 DISPOSITIONS available ANSWER and NO ANSWER only



****** ADDITIONAL INFORMATION ******

I have dug in the code and it seems that this bug is produced by the introduction of the patch for reported issue number 12946.

The patch for the above issue sets the initial cdr disposition value to to AST_CDR_NOANSWER instead of the old value of AST_CDR_NULL.

This causes the checks in both functions ast_cdr_busy in cdr.c
if (cdr->disposition < AST_CDR_BUSY)
and ast_cdr_failed
if (cdr->disposition < AST_CDR_FAILED)
to fail and so the CDR disposition is nto updated to the correct value
Comments:By: Jeff Peeler (jpeeler) 2009-12-14 15:08:25.000-0600

This patch solves the issue here, so the concern is making sure none of the other CDR records are adversely affected. Can the reporter please test some common scenarios? I will continue my testing as well.

By: Digium Subversion (svnbot) 2009-12-18 16:29:54.000-0600

Repository: asterisk
Revision: 235635

U   branches/1.4/include/asterisk/cdr.h
U   branches/1.4/main/channel.c

------------------------------------------------------------------------
r235635 | jpeeler | 2009-12-18 16:29:52 -0600 (Fri, 18 Dec 2009) | 48 lines

Correct CDR dispositions for BUSY/FAILED

This patch is simple in that it reorders the disposition defines so that the fix
for issue 12946 works properly (the default CDR disposition was changed to
AST_CDR_NOANSWER). Also, the AST_CDR_FLAG_ORIGINATED flag was set in ast_call to
ensure all CDR records are written.

The side effects of CDR changes are scary, so I'm documenting the test cases
performed to attempt to catch any regressions. The following tests were all
performed using 1.4 rev 195881 vs head (235571) + patch:

A calls B
C calls B (busy)
Hangup C
Hangup A

(Both SIP and features)
A calls B
A blind transfers to C
Hangup C

(Both SIP and features)
A calls B
A attended transfers to C
Hangup C

A calls B
A attended transfers to C (SIP)
C blind transfers to A (features)
Hangup A

All of the test scenario CDRs matched.

The following tests were performed just with the patch to ensure proper operation
(with unanswered=yes):

exten =>s,1,Answer
exten =>s,n,ResetCDR(w)
exten =>s,n,ResetCDR(w)

exten =>s,1,ResetCDR(w)
exten =>s,n,ResetCDR(w)

(closes issue ASTERISK-14667)
Reported by: aatef
Patches:
     bug16180.patch uploaded by jpeeler (license 325)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235635

By: Digium Subversion (svnbot) 2009-12-18 16:51:39.000-0600

Repository: asterisk
Revision: 235660

_U  trunk/
U   trunk/include/asterisk/cdr.h
U   trunk/main/channel.c

------------------------------------------------------------------------
r235660 | jpeeler | 2009-12-18 16:51:38 -0600 (Fri, 18 Dec 2009) | 55 lines

Merged revisions 235635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r235635 | jpeeler | 2009-12-18 16:29:51 -0600 (Fri, 18 Dec 2009) | 48 lines
 
 Correct CDR dispositions for BUSY/FAILED
 
 This patch is simple in that it reorders the disposition defines so that the fix
 for issue 12946 works properly (the default CDR disposition was changed to
 AST_CDR_NOANSWER). Also, the AST_CDR_FLAG_ORIGINATED flag was set in ast_call to
 ensure all CDR records are written.
 
 The side effects of CDR changes are scary, so I'm documenting the test cases
 performed to attempt to catch any regressions. The following tests were all
 performed using 1.4 rev 195881 vs head (235571) + patch:
 
 A calls B
 C calls B (busy)
 Hangup C
 Hangup A
 
 (Both SIP and features)
 A calls B
 A blind transfers to C
 Hangup C
 
 (Both SIP and features)
 A calls B
 A attended transfers to C
 Hangup C
 
 A calls B
 A attended transfers to C (SIP)
 C blind transfers to A (features)
 Hangup A
 
 All of the test scenario CDRs matched.
 
 The following tests were performed just with the patch to ensure proper operation
 (with unanswered=yes):
 
 exten =>s,1,Answer
 exten =>s,n,ResetCDR(w)
 exten =>s,n,ResetCDR(w)
 
 exten =>s,1,ResetCDR(w)
 exten =>s,n,ResetCDR(w)
 
 (closes issue ASTERISK-14667)
 Reported by: aatef
 Patches:
       bug16180.patch uploaded by jpeeler (license 325)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235660

By: Digium Subversion (svnbot) 2009-12-18 16:58:31.000-0600

Repository: asterisk
Revision: 235662

_U  branches/1.6.0/
U   branches/1.6.0/include/asterisk/cdr.h
U   branches/1.6.0/main/channel.c

------------------------------------------------------------------------
r235662 | jpeeler | 2009-12-18 16:58:30 -0600 (Fri, 18 Dec 2009) | 62 lines

Merged revisions 235660 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r235660 | jpeeler | 2009-12-18 16:51:37 -0600 (Fri, 18 Dec 2009) | 55 lines
 
 Merged revisions 235635 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r235635 | jpeeler | 2009-12-18 16:29:51 -0600 (Fri, 18 Dec 2009) | 48 lines
   
   Correct CDR dispositions for BUSY/FAILED
   
   This patch is simple in that it reorders the disposition defines so that the fix
   for issue 12946 works properly (the default CDR disposition was changed to
   AST_CDR_NOANSWER). Also, the AST_CDR_FLAG_ORIGINATED flag was set in ast_call to
   ensure all CDR records are written.
   
   The side effects of CDR changes are scary, so I'm documenting the test cases
   performed to attempt to catch any regressions. The following tests were all
   performed using 1.4 rev 195881 vs head (235571) + patch:
   
   A calls B
   C calls B (busy)
   Hangup C
   Hangup A
   
   (Both SIP and features)
   A calls B
   A blind transfers to C
   Hangup C
   
   (Both SIP and features)
   A calls B
   A attended transfers to C
   Hangup C
   
   A calls B
   A attended transfers to C (SIP)
   C blind transfers to A (features)
   Hangup A
   
   All of the test scenario CDRs matched.
   
   The following tests were performed just with the patch to ensure proper operation
   (with unanswered=yes):
   
   exten =>s,1,Answer
   exten =>s,n,ResetCDR(w)
   exten =>s,n,ResetCDR(w)
   
   exten =>s,1,ResetCDR(w)
   exten =>s,n,ResetCDR(w)
   
   (closes issue ASTERISK-14667)
   Reported by: aatef
   Patches:
         bug16180.patch uploaded by jpeeler (license 325)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235662

By: Digium Subversion (svnbot) 2009-12-18 17:03:10.000-0600

Repository: asterisk
Revision: 235663

_U  branches/1.6.1/
U   branches/1.6.1/include/asterisk/cdr.h
U   branches/1.6.1/main/channel.c

------------------------------------------------------------------------
r235663 | jpeeler | 2009-12-18 17:03:10 -0600 (Fri, 18 Dec 2009) | 62 lines

Merged revisions 235660 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r235660 | jpeeler | 2009-12-18 16:51:37 -0600 (Fri, 18 Dec 2009) | 55 lines
 
 Merged revisions 235635 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r235635 | jpeeler | 2009-12-18 16:29:51 -0600 (Fri, 18 Dec 2009) | 48 lines
   
   Correct CDR dispositions for BUSY/FAILED
   
   This patch is simple in that it reorders the disposition defines so that the fix
   for issue 12946 works properly (the default CDR disposition was changed to
   AST_CDR_NOANSWER). Also, the AST_CDR_FLAG_ORIGINATED flag was set in ast_call to
   ensure all CDR records are written.
   
   The side effects of CDR changes are scary, so I'm documenting the test cases
   performed to attempt to catch any regressions. The following tests were all
   performed using 1.4 rev 195881 vs head (235571) + patch:
   
   A calls B
   C calls B (busy)
   Hangup C
   Hangup A
   
   (Both SIP and features)
   A calls B
   A blind transfers to C
   Hangup C
   
   (Both SIP and features)
   A calls B
   A attended transfers to C
   Hangup C
   
   A calls B
   A attended transfers to C (SIP)
   C blind transfers to A (features)
   Hangup A
   
   All of the test scenario CDRs matched.
   
   The following tests were performed just with the patch to ensure proper operation
   (with unanswered=yes):
   
   exten =>s,1,Answer
   exten =>s,n,ResetCDR(w)
   exten =>s,n,ResetCDR(w)
   
   exten =>s,1,ResetCDR(w)
   exten =>s,n,ResetCDR(w)
   
   (closes issue ASTERISK-14667)
   Reported by: aatef
   Patches:
         bug16180.patch uploaded by jpeeler (license 325)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235663

By: Digium Subversion (svnbot) 2009-12-18 17:04:44.000-0600

Repository: asterisk
Revision: 235665

_U  branches/1.6.2/
U   branches/1.6.2/include/asterisk/cdr.h
U   branches/1.6.2/main/channel.c

------------------------------------------------------------------------
r235665 | jpeeler | 2009-12-18 17:04:44 -0600 (Fri, 18 Dec 2009) | 62 lines

Merged revisions 235660 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r235660 | jpeeler | 2009-12-18 16:51:37 -0600 (Fri, 18 Dec 2009) | 55 lines
 
 Merged revisions 235635 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r235635 | jpeeler | 2009-12-18 16:29:51 -0600 (Fri, 18 Dec 2009) | 48 lines
   
   Correct CDR dispositions for BUSY/FAILED
   
   This patch is simple in that it reorders the disposition defines so that the fix
   for issue 12946 works properly (the default CDR disposition was changed to
   AST_CDR_NOANSWER). Also, the AST_CDR_FLAG_ORIGINATED flag was set in ast_call to
   ensure all CDR records are written.
   
   The side effects of CDR changes are scary, so I'm documenting the test cases
   performed to attempt to catch any regressions. The following tests were all
   performed using 1.4 rev 195881 vs head (235571) + patch:
   
   A calls B
   C calls B (busy)
   Hangup C
   Hangup A
   
   (Both SIP and features)
   A calls B
   A blind transfers to C
   Hangup C
   
   (Both SIP and features)
   A calls B
   A attended transfers to C
   Hangup C
   
   A calls B
   A attended transfers to C (SIP)
   C blind transfers to A (features)
   Hangup A
   
   All of the test scenario CDRs matched.
   
   The following tests were performed just with the patch to ensure proper operation
   (with unanswered=yes):
   
   exten =>s,1,Answer
   exten =>s,n,ResetCDR(w)
   exten =>s,n,ResetCDR(w)
   
   exten =>s,1,ResetCDR(w)
   exten =>s,n,ResetCDR(w)
   
   (closes issue ASTERISK-14667)
   Reported by: aatef
   Patches:
         bug16180.patch uploaded by jpeeler (license 325)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235665