Unable to write CSV record to account file

Hai All,

I have an asterisk server installed with version 11.22.0, Am getting the below error in my asterisk CLI

How can I solve this issue?

[Jul 21 18:05:01] WARNING[12042][C-00000e3f]: cdr_csv.c:266 writefile: Account code ‘SIP/TATA-sip-trunk-’ insecure for writing file
[Jul 21 18:05:01] WARNING[12042][C-00000e3f]: cdr_csv.c:319 csv_log: Unable to write CSV record to account file ‘SIP/TATA-sip-trunk-’ : Connection timed out

or is there any option in the CDR to not insert the value Account code field ?

Account codes are not used unless you explicitly add them, so the answer is don’t add them.

In reality, that probably means you are not using out of the box Asterisk, and really need to ask whoever provided the dialplan.

The warning is because the account name contains a character (/) which is special to the filesystem.

I am using the AMI to make the calls, and my SIP trunk channel will come with / anyway

like “SIP/Tata-SIP” Hence we can’t change that ? and the calls will come to dialplan only when the call answer or failed - if answered call then i can change the account code - but for the filed call am calling the failed extension - but before calling failed extension am getting the above error.

In that case what ca do ? is there any option is cdr.conf to remove the accountcode entry ? or any similar suggestions ?

The default account code is blank. It is not the same as the SIP channel. If you are seeing the channel name there it is because something in your custom code is putting it there. You can delete that something, or change it to use acceptable characters.

@david551 Thanks for the response.

How can we change the account code field to use acceptable characters?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.