[OpenSIPS-Users] Need some help adding extra column in acc table in oepsnisp-1.11

Sasmita Panda spanda at 3clogic.com
Tue Sep 5 05:43:29 EDT 2017


Hi All ,

        I am using opensips-1.11 with acc module . Trying to add extra
columns in it to store some other data which is needed for billing .

        I am trying to add like bellow .

modparam("acc", "db_url", "mysql://root:root@x.x.x.x/opensips_1_11")
modparam("acc", "db_flag", 2)
modparam("acc", "log_flag", 3)
modparam("acc", "cdr_flag", 1)
modparam("acc", "db_extra", "from_uri=$fU; to_uri=$tU")


 route{

         if (method == "INVITE") {
                 create_dialog();
                 setflag(1);
                 setflag(2); # do accounting ...
                 record_route();
                 xlog("INBOUND CALL,$dd,$ru,$ci,$fn,$fu");
                 route(10);
                 exit;
         }


When the cdr getting stored , its giving error .

 CRITICAL:db_mysql:wrapper_single_mysql_stmt_prepare: driver error (1054):
Unknown column 'from_uri' in 'field list'
 ERROR:db_mysql:db_mysql_do_prepared_query: failed to create new context
 ERROR:acc:acc_db_cdrs: failed to insert into database
 ERROR:acc:acc_dlg_callback: Cannot insert into database


      What should I do for the above error . Will I need to create the
columns first in acc table then I can insert extra column or what ?

       Thank you in advance . Any kind of suggestion is appreciated.

*Thanks & Regards*
*Sasmita Panda*
*Network Testing and Software Engineer*
*3CLogic , ph:07827611765*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170905/9ddb89b5/attachment.html>


More information about the Users mailing list