I have encountered a problem now. If the sip client uses GB2312/GBK encoding, the following error will appear when inserting into the CDR record:
My database encoding is UTF-8. Is there a corresponding solution on the SIP SERVER side?
Assuming there is no better solution, is there any way to ignore or process the clid column (such as not inserting, or inserting blank) to ensure that the data in the CDR table can be inserted.
I suspect the problem is that the SIP client is not implementing SIP, as SIP mandates the use of UTF-8, over the wire. That’s probably resulting in invalid UTF-8 byte sequences.
The originating device needs fixing. If that is not possible, it might be possible to use AGI, or similar to transcode. Reading the value through AGI, rather than trying to pass it as a parameter, may be more likely to give the the raw byte stream.
Also, I suspect that your terminal is set for neither UTF-8, nor GB 2312. When providing logs here, you should take them directly, as plain text, from /var/log/asterisk/* (normally full), and, if using non-ASCII characters, should treat those logs as being in UTF-8;