PJSIP json UTF-8 error

HI there,

I’m in the process of migrating from v13 to v16 and migrating from chan_sip to PJSIP.

On our dev server, if I try to push ps_endpoints in realtime mysql I will get the following twice on Call hangup.

[Dec 19 20:05:04] ERROR[6312]: json.c:607 ast_json_vpack: Error building JSON from ‘{s: s, s: s, s: s, s: s, s: i, s: s}’: Invalid UTF-8 string.
[Dec 19 20:05:04] ERROR[6312]: Got 11 backtrace records

0: /usr/sbin/asterisk(ast_json_pack+0x99) [0x563ffef3f449]

1: /usr/sbin/asterisk(__ast_test_suite_event_notify+0x1be) [0x563ffefd0c0e]

2: /usr/sbin/asterisk(__ao2_ref+0xa6) [0x563ffeeb5396]

3: /usr/lib/asterisk/modules/res_pjsip_session.so(+0x6564) [0x7f4d70026564]

4: /usr/sbin/asterisk(ast_taskprocessor_execute+0xd8) [0x563ffefc7f58]

5: /usr/sbin/asterisk(+0x182220) [0x563ffefd2220]

6: /usr/sbin/asterisk(ast_taskprocessor_execute+0xd8) [0x563ffefc7f58]

7: /usr/sbin/asterisk(+0x181a04) [0x563ffefd1a04]

8: /usr/sbin/asterisk(+0x18849f) [0x563ffefd849f]

9: /lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x7f4d93d36fa3]

#10: /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f4d93a914cf]

Only happens on specific table ps_endpoints in realtime mysql.
Won’t happen if I stay in pjsip.conf
Tried with and without callerID
Already got res_hep_rtcp.so and res_hep_pjsip.so unloaded

I’ve exhausted all google search about that matter and still can’t find the issue.

OS: Debian Buster
Asterisk: Asterisk PBX 16.2.1~dfsg-1+deb10u1 ( From apt )

This is due to that package being built with TEST_FRAMEWORK enabled, which is supposed to only be done when you’re running Asterisk under the testsuite. It should be harmless and will be fixed in the next set of releases. We don’t control the packages, though, so I do not know when or if such a fix will be included there.

Unless a radical security flaw is found in Asterisk which requires a full upgrade, you can’t now expect a fix until at least Debian 11, as packager lock onto a specific version and then back port security fixes.

Thanks for quick answer !

So this error should be harmless and I can safely roll out this to our production server without problems? That seems a bit odd …

Should I consider / try to compile myself a newer version of asterisk 16 to fix that issue ?

I don’t know of anyone who in practice has run TEST_FRAMEWORK in production. I can’t think of any reason it wouldn’t be fine. Do note as well that 16.2.1 is an old version so if you do encounter problems they may have already been fixed, and you won’t receive support on such an old version on our issue tracker.

What you do with this information is up to you!

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