<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Răzvan,</div><div>Thank you for your explanation.</div><div>Checking after BYE might not work cause receiving a BYE is not guaranteed, I guess...</div><div>My problem:</div><div>I have an acc_extra parameter and a corresponding INTEGER type database field. In the beginning of the script, I check if INVITE & !to_tag and then create_dialog, and assign it a 0 value. I assume this is the first place I can do that, right after creating the dialog? (just in case i am wrong, I have a line in the beginning of script also, assigning to acc_extra - which probably does nothing)</div><div>However, I still have errors like this showing up frequently:</div><div><br></div><div>CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error (1366): Incorrect integer value: '' for column 'suppservice' at row 1</div><div>ERROR:acc:acc_db_request: failed to insert into acc table</div><div><br></div><div>Which is very strange - it says acc table which means it should be after the dialog was created. I also have no way to debug this (machine is in production). might be worth noting that it started happening after upgrading from 3.1 to 3.4.17.</div><div><br></div><div>One solution is to change the database field type to string (which I can't do because it has millions of records), so I thought there might be a chance to inspect CDR records before they are shipped out....</div><div><br></div><div>Thank you.</div></div></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Oct 9, 2025 at 2:20 PM Răzvan Crainea <<a href="mailto:razvan@opensips.org">razvan@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello!<br>
<br>
The E_ACC_CDR event is executed asynchronously, thus the dialog/acc <br>
context may no longer be available. Thus you should not try to modify it.<br>
Your best change is to make sure that the acc variables are final after <br>
the BYE/200 OK is processed.<br>
But if you could give us more information about what you are trying to <br>
do, we might be able to help you.<br>
<br>
Best regards,<br>
<br>
Răzvan Crainea<br>
OpenSIPS Core Developer / SIPhub CTO<br>
<a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.com</a> / <a href="https://www.siphub.com" rel="noreferrer" target="_blank">https://www.siphub.com</a><br>
<br>
On 9/27/25 2:03 PM, M S wrote:<br>
> Hi list,<br>
> I was wondering if anybody has any ideas about making changes to CDR<br>
> variables before sending them to the database.<br>
> Documents say the acc module calls E_ACC_CDR, is this before sending it to<br>
> the database, or in a parallel branch? if I change a variable in here, does<br>
> it change what's written to the database?<br>
> <br>
> Thanks!<br>
> <br>
> <br>
> Hi list,<br>
> I was wondering if anybody has any ideas about making changes to CDR <br>
> variables before sending them to the database.<br>
> Documents say the acc module calls E_ACC_CDR, is this before sending it <br>
> to the database, or in a parallel branch? if I change a variable in <br>
> here, does it change what's written to the database?<br>
> <br>
> Thanks!<br>
> <br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">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-bin/mailman/listinfo/users</a><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">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-bin/mailman/listinfo/users</a><br>
</blockquote></div>