<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Yes, you need to create the columns in the database.<br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Developer
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 09/05/2017 12:43 PM, Sasmita Panda
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CALf-Q45JpMd6RbKPi676sVQ0CVfYG90RfXgy4uKQouWdTRNUgA@mail.gmail.com">
      <div dir="ltr">Hi All ,
        <div><br>
        </div>
        <div>        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 .</div>
        <div><br>
        </div>
        <div>        I am trying to add like bellow .</div>
        <div><br>
        </div>
        <div>
          <div>modparam("acc", "db_url",
            <a class="moz-txt-link-rfc2396E" href="mailto:mysql://root:root@x.x.x.x/opensips_1_11">"mysql://root:root@x.x.x.x/opensips_1_11"</a>)</div>
          <div>modparam("acc", "db_flag", 2)</div>
          <div>modparam("acc", "log_flag", 3)</div>
          <div>modparam("acc", "cdr_flag", 1)</div>
          <div>modparam("acc", "db_extra", "from_uri=$fU; to_uri=$tU")</div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>
          <div> route{</div>
          <div><br>
          </div>
          <div>         if (method == "INVITE") {</div>
          <div>                 create_dialog();</div>
          <div>                 setflag(1);</div>
          <div>                 setflag(2); # do accounting ...</div>
          <div>                 record_route();</div>
          <div>                 xlog("INBOUND
            CALL,$dd,$ru,$ci,$fn,$fu");</div>
          <div>                 route(10);</div>
          <div>                 exit;</div>
          <div>         }</div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>When the cdr getting stored , its giving error . </div>
        <div><font color="#674ea7"><br>
          </font></div>
        <div>
          <div><font color="#cc0000"> CRITICAL:db_mysql:wrapper_single_mysql_stmt_prepare:
              driver error (1054): Unknown column 'from_uri' in 'field
              list'</font></div>
          <div><font color="#cc0000"> ERROR:db_mysql:db_mysql_do_prepared_query:
              failed to create new context</font></div>
          <div><font color="#cc0000"> ERROR:acc:acc_db_cdrs: failed to
              insert into database</font></div>
          <div><font color="#cc0000"> ERROR:acc:acc_dlg_callback: Cannot
              insert into database</font></div>
        </div>
        <div><font color="#cc0000"><br>
          </font></div>
        <div><font color="#000000"><br>
          </font></div>
        <div><font color="#000000">      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 ?  </font></div>
        <div><font color="#000000"><br>
          </font></div>
        <div><font color="#000000">       Thank you in advance . Any
            kind of suggestion is appreciated.  </font></div>
        <div> <br clear="all">
          <div>
            <div class="gmail_signature">
              <div dir="ltr"><b><i>Thanks & Regards</i></b>
                <div><i>Sasmita Panda</i></div>
                <div><i>Network Testing and Software Engineer</i></div>
                <div><i>3CLogic , ph:07827611765</i></div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>