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

Răzvan Crainea razvan at opensips.org
Tue Sep 5 05:54:22 EDT 2017


Yes, you need to create the columns in the database.

Best regards,

Răzvan Crainea
OpenSIPS Developer
www.opensips-solutions.com

On 09/05/2017 12:43 PM, Sasmita Panda wrote:
> 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/
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170905/3447c37c/attachment.html>


More information about the Users mailing list