[asterisk-users] Some problems with mysql CDR

Jason Martin jmartin at metrixmatrix.com
Mon May 14 12:34:12 MST 2007


Hello,

We have finally upgraded to Asterisk 1.4, however we've run into two issues 
that weren't occurring before the upgrade. 

Issue #1: We're an outgoing call center and need to record all calls. We use 
the uniqueid field in the CDR to match with the recording, which we labeled 
with {UNIQUEID} in MixMonitor. For some reason, the uniqueid is not correct 
in the CDR. Here is the manager event for a call:

Event: Cdr
Privilege: call,all
AccountCode: 6384106:MMI-Y:200705081051010077
Source: 0000000000
Destination: 6398714109927773
DestinationContext: outbound
CallerID: 0000000000
Channel: Zap/15-1
DestinationChannel: SIP/teliax-081ed5b0
LastApplication: NoOp
LastData:
StartTime: 2007-05-08 10:51:04
AnswerTime: 2007-05-08 10:51:05
EndTime: 2007-05-08 11:01:56
Duration: 652
BillableSeconds: 651
Disposition: ANSWERED
AMAFlags: DOCUMENTATION
UniqueID: 1178635864.1510
UserField:

And for that record in the database:

'calldate' '2007-05-08 10:51:04'
'clid' '0000000000'
 'src' '0000000000'
'dst' '6398714109927773'
'dcontext' 'outbound'
'channel' 'Zap/15-1'
'dstchannel' 'SIP/teliax-081ed5b0'
'lastapp' 'NoOp'
'lastdata' '',
'duration' 652, 
'billsec' 651, 
'disposition' 'ANSWERED', 
'amaflags' 3, 
'accountcode' '6384106:MMI-Y:200705081051010077', 
'uniqueid' '51010077', 
'userfield' '', 
'MMI_field' 'not found'

Issue #2: When a call is not answered, a record of that call is written to the 
database, but uniqueid is left blank. The next time a call isn't answered, 
Asterisk complains:

cdr_addon_mysql.c: mysql_cdr: Failed to insert into database: (1062) Duplicate 
entry '' for key 1

I haven't found any other information regarding these errors. I am just 
wondering if they are bugs. Any insight would be appreciated!

-- 
Jason Martin
Metrix Matrix, Inc.
785 Elmgrove Road, Building 1, Rochester, NY 14624
Office: 888-865-0065 Ext. 202
Mobile: (585) 721-8679



More information about the asterisk-users mailing list