[SOLVED] Send sms failed in report

I finally fixed the problem. It is in the json string response from the openvox that returns invalid json when you send a message with line break, double quote ("), and backslash (\).

So what I’ve done was I removed all non printing characters first. Then I copied the message value to add with backslashes before characters that need to be escaped. Then I replaced the old message value with the escaped string before calling json_decode().

This is also related to Openvox returns empty report.