<div dir="ltr">Thank you so much . I have tried this and its working for default parameters of opensips . like $fU , $oU , $rd etc . <div><br></div><div>When I am adding trying to save some data in user define variable like below , its not getting saved in every call . </div><div>May be I am doing something wrong . Please have a look into the script and suggest the solution .</div><div><font color="#cc0000"><br></font></div><div><font color="#cc0000"><br></font></div><div><font color="#cc0000">modparam("acc", "db_extra", "cc_info=$var(c);caller=$fU;<wbr>callee=$oU;carrier=$rd")</font><br></div><div><br></div><div>route{</div><div><div>$var(c)="NULL";</div><div>$var(d)="NULL";</div><div>$var(e)="NULL";</div><div>$var(f)="NULL";</div></div><div><br></div><div><div> if (is_method("INVITE")) {</div><div><br></div><div> if(is_present_hf("X-Info"))</div><div> {</div><div> <font color="#cc0000"> $var(c)=$hdr(X-Info);</font></div><div><br></div><div> }</div><div> #Set the flag for counting the dialogs. We user flag=4 for counting dialogs</div><div> # setflag(4);</div><div> xlog( "L_NOTICE", "CallCenter_Info & $ci,$var(c) \n" );</div><div> xlog( "L_NOTICE", "3CLogicCDR & $ci,$fU,$oU,$rd \n" );</div><div><br></div><div> setflag(3);</div><div> setflag(2);</div><div> setflag(1);</div></div><div>}}</div><div><br></div><div>In the cc_info column , sometime value get filled and sometime its filled as NULL . Why this is happening . Why its saving the default value which I defined in the starting . </div><div><br></div><div><br></div><div>can I pass this information in pseudo-variables . If yes then how I will do this ?</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="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>
<br><div class="gmail_quote">On Tue, Sep 5, 2017 at 3:24 PM, Răzvan Crainea <span dir="ltr"><<a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<tt>Yes, you need to create the columns in the database.<br>
<br>
Best regards,<br>
</tt>
<pre class="m_590824859191740338moz-signature" cols="72">Răzvan Crainea
OpenSIPS Developer
<a class="m_590824859191740338moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre><div><div class="h5">
<div class="m_590824859191740338moz-cite-prefix">On 09/05/2017 12:43 PM, Sasmita Panda
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<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="m_590824859191740338moz-txt-link-rfc2396E" href="mailto:mysql://root:root@x.x.x.x/opensips_1_11" target="_blank">"mysql://root:root@x.x.x.x/<wbr>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_<wbr>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_<wbr>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="m_590824859191740338gmail_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="m_590824859191740338mimeAttachmentHeader"></fieldset>
<br>
</div></div><pre>______________________________<wbr>_________________
Users mailing list
<a class="m_590824859191740338moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_590824859191740338moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
<br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>