Json.c:704 Ast_json_vpack: Error Building JSON From ‘{s: S, S: S}’: Invalid UTF-8 String.

Home » Asterisk Users » Json.c:704 Ast_json_vpack: Error Building JSON From ‘{s: S, S: S}’: Invalid UTF-8 String.
Asterisk Users 6 Comments

Hello!

Just installed asterisk 13.2.0 and see many such messages in log, I see them in console during calls, really something like this:

— Executing [6166@kanbaikal:2] Dial(“OOH323/kanbaikal-6”,
“SIP/6166@asterisk”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
— Called SIP/6166@asterisk
> 0x7fa9d4007660 — Probation passed – setting RTP source address to 10.18.0.19:26052
— SIP/asterisk-0000000c is making progress passing it to OOH323/kanbaikal-6
— SIP/asterisk-0000000c is ringing
> 0x7fa9d4007660 — Probation passed – setting RTP source address to 10.18.0.19:26052
> 0x7fa9d800d610 — Probation passed – setting RTP source address to 192.168.166.2:2080
[Mar 5 11:13:14] ERROR[3526]: json.c:704 ast_json_vpack: Error building JSON from ‘{s: s, s: s}’: Invalid UTF-8 string.
[Mar 5 11:13:14] ERROR[3526]: json.c:704 ast_json_vpack: Error building JSON from ‘{s: s, s: s}’: Invalid UTF-8 string.
— SIP/asterisk-0000000c answered OOH323/kanbaikal-6
— Channel OOH323/kanbaikal-6 joined ‘simple_bridge’ basic-bridge

— Channel SIP/asterisk-0000000c joined ‘simple_bridge’
basic-bridge
> 0x7fa9d800d610 — Probation passed – setting RTP source address to 192.168.166.55:3098
[Mar 5 11:13:19] ERROR[3526]: json.c:704 ast_json_vpack: Error building JSON from ‘{s: s, s: s}’: Invalid UTF-8 string.
[Mar 5 11:13:19] ERROR[3526]: json.c:704 ast_json_vpack: Error building JSON from ‘{s: s, s: s}’: Invalid UTF-8 string.
[Mar 5 11:13:24] ERROR[3526]: json.c:704 ast_json_vpack: Error building JSON from ‘{s: s, s: s}’: Invalid UTF-8 string.
[Mar 5 11:13:24] ERROR[3526]: json.c:704 ast_json_vpack: Error building JSON from ‘{s: s, s: s}’: Invalid UTF-8 string.
[Mar 5 11:13:29] ERROR[3526]: json.c:704 ast_json_vpack: Error building JSON from ‘{s: s, s: s}’: Invalid UTF-8 string.

This is call from H323, as I know avaya , chan_ooh323 from my side to
another asterisk SIP chan_sip on both sides.

Just because everything work OK, I , definitely, can comment out this error message, but… Could you give me any idea why this error can appear?

Thank you!

6 thoughts on - Json.c:704 Ast_json_vpack: Error Building JSON From ‘{s: S, S: S}’: Invalid UTF-8 String.

  • 05.03.2015 11:29, Dmitry Melekhov пишет:
    Well, looks like this is RTCP- because I get it every 5 second, which is default. Jus increased, to check is it RTCP or not…

  • 05.03.2015 11:42, Dmitry Melekhov пишет:

    No, this is not RTCP, although looks like this error is harmless, any idea what can cause this?

    Thank you!

  • The error that you’re seeing is a bit generic, as it is occurring when string data is packed into a JSON blob. However, we can look at the instances that attempt to pack two string key/value pairs, and see if any of those allow for arbitrary data input.

    From that – and this is a guess – but I would suspect that it is the packing of invalid UTF-8 data from a Caller ID or Connected Line. When you see this occur, what is the Caller ID/Connected Line name/number on the involved channels?


    Matthew Jordan Digium, Inc. | Director of Technology
    445 Jan Davis Drive NW – Huntsville, AL 35806 – USA
    Check us out at: http://digium.com & http://asterisk.org

  • 10.03.2015 16:18, Matthew Jordan пишет:
    I guess you are right. Asterisk in this case handle call from avaya h323 and over sip to another asterisk, but version 11, which has no such error messages and then to Avaya PBX. And Avaya sends caller’s name in some encoding which is not in UTF8, I
    see it in cdr as:
    “~KOM.EBA ….”
    or
    “~AXMA.Y…HA B.”
    My asterisk console uses UTF8…

    Connected line from our side are in latin characters.

    And I see this names as cyrillic names on my avaya phone. I guess this is OK, that there are such errors on log, if it is because of caller’s name, which is not in UTF8. So, may be , it’s better to change this error log to warning?
    Just becase asterisk logs error every 5 seconds during call:

    [Mar 10 14:40:21] ERROR[17414] json.c: Error building JSON from ‘{s: s, s: s}’: Invalid UTF-8 string.
    [Mar 10 14:40:21] ERROR[17414] json.c: Error building JSON from ‘{s: s, s: s}’: Invalid UTF-8 string.
    [Mar 10 14:40:26] ERROR[17414] json.c: Error building JSON from ‘{s: s, s: s}’: Invalid UTF-8 string.
    [Mar 10 14:40:31] ERROR[17414] json.c: Error building JSON from ‘{s: s, s: s}’: Invalid UTF-8 string.

    Thank you!