Hello.
I have a problem with connecting yate to mysql database. I want to store call history in to mysql database
My mysql server is on the same machine as yate.
OS Ubuntu 12.04
The output message in debug mode is:
Sniffed 'database' time=1361183648.475115
thread=0x88a6cc0 'Engine Worker'
data=(nil)
retval='(null)'
param['account'] = 'yate'
param['query'] = 'UPDATE cdrs SET ended = 1 WHERE ended IS NULL OR ended = 0'
param['results'] = 'false'
Returned false 'database' delay=0.001216
thread=0x88a6cc0 'Engine Worker'
data=(nil)
retval='(null)'
param['account'] = 'yate'
param['query'] = 'UPDATE cdrs SET ended = 1 WHERE ended IS NULL OR ended = 0'
param['results'] = 'false'
My register config
[call.cdr]
; Queries for the CDR updating message
; critical: boolean: Reject all registrations and routing if query fails
;critical=yes
;initquery=UPDATE cdr SET ended=true WHERE ended IS NULL OR NOT ended
;cdr_initialize=INSERT INTO cdr VALUES(TIMESTAMP 'EPOCH' + INTERVAL '${time} s','${chan}','${address}','${direction}','${billid}','${caller}','${called}',INTERVAL '${duration} s',INTERVAL '${billtime} s',INTERVAL '${ringtime} s','${status}','${reason}',false)
;cdr_update=UPDATE cdr SET address='${address}',direction='${direction}',billid='${billid}',caller='${caller}',called='${called}',duration=INTERVAL '${duration} s',billtime=INTERVAL '${billtime} s',ringtime=INTERVAL '${ringtime} s',status='${status}',reason='${reason}' WHERE chan='${chan}' AND time=TIMESTAMP 'EPOCH' + INTERVAL '${time} s'
;cdr_finalize=UPDATE cdr SET address='${address}',direction='${direction}',billid='${billid}',caller='${caller}',called='${called}',duration=INTERVAL '${duration} s',billtime=INTERVAL '${billtime} s',ringtime=INTERVAL '${ringtime} s',status='${status}',reason='${reason}',ended=true WHERE chan='${chan}' AND time=TIMESTAMP 'EPOCH' + INTERVAL '${time} s'
critical=no
initquery=UPDATE cdrs SET ended = 1 WHERE ended IS NULL OR ended = 0
cdr_initialize=INSERT INTO cdrs VALUES(NULL, '${time}', '${billid}', '${chan}', '${address}', '${caller}', '${called}', '${billtime}', '${ringtime}', '${duration}', '${direction}', '${status}', '${reason}', 0)
cdr_update=UPDATE cdrs SET address = '${address}', direction = '${direction}', billid = '${billid}', caller = '${caller}', called = '${called}', duration = '${duration}', billtime = '${billtime}', ringtime = '${ringtime}', status = '${status}', reason = '${reason}' WHERE chan = ''${chan}' AND time = CAST(${time} AS UNSIGNED)
cdr_finalize=UPDATE cdrs SET address = '${address}', direction = '${direction}', billid = '${billid}', caller = '${caller}', called = '${called}', duration = '${duration}', billtime = '${billtime}', ringtime = '${ringtime}', status = '${status}', reason = '${reason}', ended = 1 WHERE chan = '${chan}' AND time = CAST(${time} AS UNSIGNED)
accound=yate
My mysqldb.conf is
[yate]
host=127.0.0.1
port=3306
database=yate
user=root
password=password
In modules i entered
pgsqldb.yate=true
register.yate=true
mysqldb.yate=true
i vahe installed yate-mysql package and recompiled yate.
But no result.
Thanks for help.