[Home]

Summary:ASTERISK-28031: Invalid UTF-8 string - Element Block
Reporter:Sean Ph (spham)Labels:
Date Opened:2018-08-30 19:05:27Date Closed:2018-09-04 05:55:59
Priority:MajorRegression?
Status:Closed/CompleteComponents:Applications/app_stasis Core/General Resources/res_stasis
Versions:13.21.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 2018-08-27_14-22-06_Json_Error_5.png
Description:Asterisk restarts when a call starting to attach ▒  in front of the number, then throw out these errors causing my Asterisk to restart.

ERROR[17900][C-000000d4]:json.c:861 ast_json_vpack: Error building JSON from ‘{s: s, s: s}’: Invalid UTF-8 string.

This seems to be an isolated incidents - Last one occurred 2 days ago to a random number and to a random queues. I was told to either update libpri or use Filter function.
Comments:By: Asterisk Team (asteriskteam) 2018-08-30 19:05:28.675-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Richard Mudgett (rmudgett) 2018-08-31 07:29:05.545-0500

So why have you done neither of those things?  That "block" character is coming from an incorrectly coded information element from the telco switch.  libpri was fixed to tolerate the encoding error from the switch.

By: Sean Ph (spham) 2018-08-31 11:56:37.437-0500

Updating libpri is what I want to accomplish but unable confirm how it would affect my system, which was built from a distro. I put a ticket for Sangoma support asking for help but so far no dice. I didn't have to compile libpri initially, but I'm guessing if I want to update it I would have to compile again ?

https://support.digium.com/community/s/article/How-to-Download-and-Compile-Libpri

The FILTER function is probably my best option since I can just take it out if something goes wrong. I'm just not sure where to put the FILTER function. Sorry I'm new to this whole environment.


By: Sean Ph (spham) 2018-08-31 12:25:32.244-0500

Richard,

Also, your solution was posted here https://issues.freepbx.org/browse/FREEPBX-18087 and the poster is asking for RPM update? I'm not sure what that entails, and if I should wait for that or compile libpri myself..?


By: Richard Mudgett (rmudgett) 2018-08-31 12:27:15.002-0500

You would need to filter the caller-id number as one of the first things in your dialplan to eliminate unexpected characters from the remote party.  Filtering the caller-id is also a good idea to remove potential code injection attacks.
{noformat}
same = n,Set(CALLERID(num)=${FILTER(0-9a-zA-z,${CALLERID(num)})})
{noformat}


By: Joshua C. Colp (jcolp) 2018-09-04 05:56:00.241-0500

Per the FreePBX tracker, https://issues.freepbx.org/browse/FREEPBX-18082 a 1.6.0 libpri package is in testing which has the fix for this.