You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using opensips 1.11, /usr/local/src/opensips-1.11.5-tls/scripts/mysql/acc-create.sql says :
INSERT INTO version (table_name, table_version) values ('acc','6');
CREATE TABLE acc (
id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
method CHAR(16) DEFAULT '' NOT NULL,
from_tag CHAR(64) DEFAULT '' NOT NULL,
to_tag CHAR(64) DEFAULT '' NOT NULL,
callid CHAR(64) DEFAULT '' NOT NULL,
sip_code CHAR(3) DEFAULT '' NOT NULL,
sip_reason CHAR(32) DEFAULT '' NOT NULL,
time DATETIME NOT NULL,
duration INT(11) UNSIGNED DEFAULT 0 NOT NULL,
setuptime INT(11) UNSIGNED DEFAULT 0 NOT NULL,
created DATETIME DEFAULT NULL
) ENGINE=MyISAM;
When running opensips in debug mode, I have :
Aug 7 16:31:45 opensips-preprod /sbin/opensips[31788]: DBG:db_mysql:db_mysql_do_prepared_query: new query=|insert into acc (method,from_tag,to_tag,callid,sip_code,sip_reason,time,gwid,from_user,to_user,duration,setuptime,created ) values (?,?,?,?,?,?,?,?,?,?,?,?,?)|
Aug 7 16:31:45 opensips-preprod /sbin/opensips[31788]: DBG:db_mysql:re_init_statement: query is <insert into acc (method,from_tag,to_tag,callid,sip_code,sip_reason,time,gwid,from_user,to_user,duration,setuptime,created ) values (?,?,?,?,?,?,?,?,?,?,?,?,?)>, ptr=(nil)
Aug 7 16:31:45 opensips-preprod /sbin/opensips[31788]: CRITICAL:db_mysql:wrapper_single_mysql_stmt_prepare: driver error (1054): Unknown column 'gwid' in 'field list'
Aug 7 16:31:45 opensips-preprod /sbin/opensips[31788]: ERROR:db_mysql:db_mysql_do_prepared_query: failed to create new context
Aug 7 16:31:45 opensips-preprod /sbin/opensips[31788]: ERROR:acc:acc_db_cdrs: failed to insert into database
Aug 7 16:31:45 opensips-preprod /sbin/opensips[31788]: ERROR:acc:acc_dlg_callback: Cannot insert into database
I guess fields are missing in sql scheme.
Regards,
Cédric
The text was updated successfully, but these errors were encountered:
Rico29
changed the title
accounting mysql scheme
accounting mysql scheme / opensips 1.11.5
Aug 7, 2015
Using opensips 1.11, /usr/local/src/opensips-1.11.5-tls/scripts/mysql/acc-create.sql says :
INSERT INTO version (table_name, table_version) values ('acc','6');
CREATE TABLE acc (
id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
method CHAR(16) DEFAULT '' NOT NULL,
from_tag CHAR(64) DEFAULT '' NOT NULL,
to_tag CHAR(64) DEFAULT '' NOT NULL,
callid CHAR(64) DEFAULT '' NOT NULL,
sip_code CHAR(3) DEFAULT '' NOT NULL,
sip_reason CHAR(32) DEFAULT '' NOT NULL,
time DATETIME NOT NULL,
duration INT(11) UNSIGNED DEFAULT 0 NOT NULL,
setuptime INT(11) UNSIGNED DEFAULT 0 NOT NULL,
created DATETIME DEFAULT NULL
) ENGINE=MyISAM;
When running opensips in debug mode, I have :
Aug 7 16:31:45 opensips-preprod /sbin/opensips[31788]: DBG:db_mysql:db_mysql_do_prepared_query: new query=|insert into acc (method,from_tag,to_tag,callid,sip_code,sip_reason,time,gwid,from_user,to_user,duration,setuptime,created ) values (?,?,?,?,?,?,?,?,?,?,?,?,?)|
Aug 7 16:31:45 opensips-preprod /sbin/opensips[31788]: DBG:db_mysql:re_init_statement: query is <insert into acc (method,from_tag,to_tag,callid,sip_code,sip_reason,time,gwid,from_user,to_user,duration,setuptime,created ) values (?,?,?,?,?,?,?,?,?,?,?,?,?)>, ptr=(nil)
Aug 7 16:31:45 opensips-preprod /sbin/opensips[31788]: CRITICAL:db_mysql:wrapper_single_mysql_stmt_prepare: driver error (1054): Unknown column 'gwid' in 'field list'
Aug 7 16:31:45 opensips-preprod /sbin/opensips[31788]: ERROR:db_mysql:db_mysql_do_prepared_query: failed to create new context
Aug 7 16:31:45 opensips-preprod /sbin/opensips[31788]: ERROR:acc:acc_db_cdrs: failed to insert into database
Aug 7 16:31:45 opensips-preprod /sbin/opensips[31788]: ERROR:acc:acc_dlg_callback: Cannot insert into database
I guess fields are missing in sql scheme.
Regards,
Cédric
The text was updated successfully, but these errors were encountered: