[asterisk-bugs] [Asterisk 0013022]: CDR does not get written

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Jul 8 09:09:12 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13022 
====================================================================== 
Reported By:                falves11
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   13022
Category:                   CDR/cdr_odbc
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 128951 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             07-08-2008 08:59 CDT
Last Modified:              07-08-2008 09:09 CDT
====================================================================== 
Summary:                    CDR does not get written
Description: 
I upgraded to the current version, 128951, last night, and realized that
the CDR does not get written to the database unless I use "resetCDR(w)" in
the "h" extension, which constitutes a profound change from the past
behavior. For example, I have this dialplan:

[default]
exten
=>_X.,1,Set(ARRAY(CARRIERLIST,Z,NANI,CLIST,PLIST)=${MINIXEL_ROUTING(${EXTEN},${anix},${X})})
exten =>_X.,n,NoCDR()
exten =>_X.,n,GotoIf($[${Z} = 0]?default,rejected,1)
exten =>_X.,n,Set(CALLERID(all)=${NANI})
exten =>_X.,n,Set(TIMEOUT(absolute)=3600)
exten =>_X.,n,Set(i=1)
exten =>_X.,n,ForkCDR()
exten =>_X.,n,While($[${i} <= ${Z}])
exten =>_X.,n,Set(CDR(userfield)=${CLIST}${CUT(PLIST,-,${i})})
exten =>_X.,n,Set(CDR(accountcode)=${SIPIP:1})
exten =>_X.,n,Dial(${CUT(CARRIERLIST,-,${i})},45,L(3600000)) ;dial once
;exten =>_X.,n,Verbose(0,"${DIALSTATUS} Result: ${SIPIP:1}")
exten =>_X.,n,ResetCDR(w)
exten =>_X.,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?default,dropcall,1)
exten =>_X.,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?default,dropcall,1)
exten =>_X.,n,Set(i=$[${i} + 1])
exten =>_X.,n,EndWhile
exten =>_X.,n,Hangup(34)
exten => h,1,ResetCDR(w) ;THIS IS REQUIRED TO GET CDR IN TRUNK 128951
exten => dropcall,1,Hangup()
exten => rejected,1,Verbose(0,"Rejected:" ${destino}-From: ${SIPIP:1})
exten => rejected,2,Hangup(34)

====================================================================== 

---------------------------------------------------------------------- 
 falves11 - 07-08-08 09:09  
---------------------------------------------------------------------- 
In past version, the NoCDR() command gets cancelled by the ForkCDR(), and
that is good, but in the current version, the CDR gets forked, but when the
call finishes it does not get written.
I do this
NoCDR() (once)
ForkCDR()
Dial
..if the call fails -> ResetCDR(w) and Dial another carrier
but now when the call drops, I have to do another ResetCDR(w)
otherwise I lose the CDR for a valid call with billsec > 0 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-08-08 09:09  falves11       Note Added: 0089886                          
======================================================================




More information about the asterisk-bugs mailing list