[OpenSIPS-Devel] [opensips] accounting mysql scheme (#592)

Rico29 notifications at github.com
Fri Aug 7 16:38:17 CEST 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

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/592
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20150807/fc6ab74d/attachment.htm>


More information about the Devel mailing list