Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] CDR ODBC error


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
cursor at telecomabmex...
Guest





PostPosted: Tue Feb 09, 2016 5:39 pm    Post subject: [asterisk-users] CDR ODBC error Reply with quote

I am trying to get cdr via odbc to work on Asterisk 13.7.2 but I
keep getting this error:

[Feb 9 16:21:43] WARNING[2088]: cdr_odbc.c:160 execute_cb: cdr_odbc:
Error in ExecDirect: -1, query is: INSERT INTO cdr
(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield,peeraccount,linkedid,sequence)
VALUES ({ts '2016-02-09 16:21:28'},?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?)
[Feb 9 16:21:43] WARNING[2088]: res_odbc.c:612 ast_odbc_direct_execute:
SQL Execute error! Verifying connection to asterisk [asterisk]...
[Feb 9 16:21:43] WARNING[2088]: cdr_odbc.c:160 execute_cb: cdr_odbc:
Error in ExecDirect: -1, query is: INSERT INTO cdr
(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield,peeraccount,linkedid,sequence)
VALUES ({ts '2016-02-09 16:21:28'},?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?)
[Feb 9 16:21:43] ERROR[2088]: cdr_odbc.c:189 odbc_log: CDR direct
execute failed

First thing I do not get is that calldate does not exist in the CDR
database (I am using the table structure that comes with the asterisk
source). If I add that column then start, answer and end do not get
populated when the call ends. Next question is which odbc cdr module I
should use, cdr_odbc or cdr_adaptive_odbc?

Also Asterisk has crashed at least three times with this message:

asterisk:
/builddir/build/BUILD/mysql-connector-odbc-5.2.5-src/driver/desc.c:110:
desc_free_paramdata: Assertion `aprec' failed.
[Feb 9 16:28:48] WARNING[3781]: res_odbc.c:1405 _ast_odbc_request_obj2:
SetConnectAttr (Txn isolation) returned an error: HY000: [MySQL][ODBC
5.2(w) Driver]Lost connection to MySQL server during query
[Feb 9 16:28:48] WARNING[3781]: res_config_odbc.c:117 custom_prepare:
SQL Prepare failed![SELECT * FROM ps_domain_aliases WHERE id = ?]
[Feb 9 16:28:48] WARNING[3781]: res_odbc.c:765 ast_odbc_sanity_check:
Connection is down attempting to reconnect...
Aborted (core dumped)

--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)9116-91161


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
mjordan at digium.com
Guest





PostPosted: Thu Feb 11, 2016 8:03 am    Post subject: [asterisk-users] CDR ODBC error Reply with quote

On Tue, Feb 9, 2016 at 4:39 PM, Carlos Chavez <cursor@telecomabmex.com (cursor@telecomabmex.com)> wrote:
Quote:
    I am trying to get cdr via odbc to work on Asterisk 13.7.2 but I keep getting this error:

[Feb  9 16:21:43] WARNING[2088]: cdr_odbc.c:160 execute_cb: cdr_odbc: Error in ExecDirect: -1, query is: INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield,peeraccount,linkedid,sequence) VALUES ({ts '2016-02-09 16:21:28'},?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?)
[Feb  9 16:21:43] WARNING[2088]: res_odbc.c:612 ast_odbc_direct_execute: SQL Execute error! Verifying connection to asterisk [asterisk]...
[Feb  9 16:21:43] WARNING[2088]: cdr_odbc.c:160 execute_cb: cdr_odbc: Error in ExecDirect: -1, query is: INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield,peeraccount,linkedid,sequence) VALUES ({ts '2016-02-09 16:21:28'},?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?)
[Feb  9 16:21:43] ERROR[2088]: cdr_odbc.c:189 odbc_log: CDR direct execute failed

    First thing I do not get is that calldate does not exist in the CDR database (I am using the table structure that comes with the asterisk source).  If I add that column then start, answer and end do not get populated when the call ends.  Next question is which odbc cdr module I should use, cdr_odbc or cdr_adaptive_odbc?

    Also Asterisk has crashed at least three times with this message:

asterisk: /builddir/build/BUILD/mysql-connector-odbc-5.2.5-src/driver/desc.c:110: desc_free_paramdata: Assertion `aprec' failed.
[Feb  9 16:28:48] WARNING[3781]: res_odbc.c:1405 _ast_odbc_request_obj2: SetConnectAttr (Txn isolation) returned an error: HY000: [MySQL][ODBC 5.2(w) Driver]Lost connection to MySQL server during query
[Feb  9 16:28:48] WARNING[3781]: res_config_odbc.c:117 custom_prepare: SQL Prepare failed![SELECT * FROM ps_domain_aliases WHERE id = ?]
[Feb  9 16:28:48] WARNING[3781]: res_odbc.c:765 ast_odbc_sanity_check: Connection is down attempting to reconnect...
Aborted (core dumped)


You should use cdr_adaptive_odbc. It is far more flexible than cdr_odbc, and is essentially a replacement for it. cdr_odbc doesn't receive much attention as a result.


Frankly, we should probably just remove cdr_odbc.

 


--
Matthew Jordan

Digium, Inc. | Director of Technology

445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services