[asterisk-bugs] [JIRA] (ASTERISK-27082) Error building JSON, Invalid UTF-8 string due to invalid FAX CSI string format

Ross Beer (JIRA) noreply at issues.asterisk.org
Mon Jul 17 13:15:59 CDT 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=237719#comment-237719 ] 

Ross Beer commented on ASTERISK-27082:
--------------------------------------

After installing the patch I get the following backtrace when receiving faxes:


{noformat}
[Jul 17 17:46:15] ERROR[28545][C-000004c0]: json.c:825 ast_json_vpack: Error building JSON from '{s: s, s: s}': Invalid UTF-8 string.
Got 18 backtrace records
#0: [0x532433] main/json.c:831 ast_json_vpack() (0x53237e+B5)
#1: [0x53236e] main/json.c:814 ast_json_pack() (0x5322cf+9F)
#2: [0x5d1c9d] main/stasis_channels.c:767 ast_channel_publish_varset() (0x5d1c62+3B)
#3: [0x589adc] main/pbx_variables.c:1070 pbx_builtin_setvar_helper() (0x58979a+342)
#4: [0x7f56860715eb] res/res_fax.c:1450 set_channel_variables()
#5: [0x7f5686076628] res/res_fax.c:1825 generic_fax_exec()
#6: [0x7f568607b5a5] res/res_fax.c:2260 receivefax_exec()
#7: [0x580014] main/pbx_app.c:491 pbx_exec() (0x57fef8+11C)
#8: [0x56d96e] main/pbx.c:2884 pbx_extension_helper()
#9: [0x570e21] main/pbx.c:4110 ast_spawn_extension() (0x570dbd+64)
#10: [0x571adc] main/pbx.c:4286 __ast_pbx_run()
#11: [0x57328b] main/pbx.c:4609 pbx_thread()
#12: [0x5f762e] main/utils.c:1238 dummy_start()
[Jul 17 17:46:15] ERROR[28545][C-000004c0]: stasis_channels.c:771 ast_channel_publish_varset: Error creating message
[Jul 17 17:46:15] ERROR[28545][C-000004c0]: json.c:825 ast_json_vpack: Error building JSON from '{s: s, s: s, s: s, s: s, s: s, s: s, s: o}': Invalid UTF-8 string.
Got 15 backtrace records
#0: [0x532433] main/json.c:831 ast_json_vpack() (0x53237e+B5)
#1: [0x53236e] main/json.c:814 ast_json_pack() (0x5322cf+9F)
#2: [0x7f568607761b] res/res_fax.c:2055 report_receive_fax_status()
#3: [0x7f568607b690] res/res_fax.c:2270 receivefax_exec()
#4: [0x580014] main/pbx_app.c:491 pbx_exec() (0x57fef8+11C)
#5: [0x56d96e] main/pbx.c:2884 pbx_extension_helper()
#6: [0x570e21] main/pbx.c:4110 ast_spawn_extension() (0x570dbd+64)
#7: [0x571adc] main/pbx.c:4286 __ast_pbx_run()
#8: [0x57328b] main/pbx.c:4609 pbx_thread()
#9: [0x5f762e] main/utils.c:1238 dummy_start()
[Jul 17 17:46:15] ERROR[28545][C-000004c0]: res_fax.c:2271 receivefax_exec: Error publishing ReceiveFax status message
{noformat}

> Error building JSON, Invalid UTF-8 string due to invalid FAX CSI string format
> ------------------------------------------------------------------------------
>
>                 Key: ASTERISK-27082
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27082
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_fax_spandsp
>    Affects Versions: 13.16.0
>         Environment: Debian 8
>            Reporter: Ludovic Gasc (Eyepea)
>            Assignee: Unassigned
>            Severity: Minor
>         Attachments: jira_asterisk_27082_v13_debug.patch
>
>
> Hi,
> When we use SendFAX application, we have found a fax machine that stops prematurely Fax session.
> It seems a character encoding issue:
> The logs:
> {noformat}
> [Jun 22 09:52:07] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.38 Rx    82: (0) data v21/hdlc-fcs-OK-sig-end + 0 byte(s)
> [Jun 22 09:52:07] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.38T Type CSI - CRC OK, sig end (clean)
> [Jun 22 09:52:07] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.30 Stop T4 (13840 remaining)
> [Jun 22 09:52:07] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.30 Rx:  CSI without final frame tag
> [Jun 22 09:52:07] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.30 Rx:  ff 03 40 36 32 ff 13 84
> [Jun 22 09:52:07] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.30 Remote gave CSI as: "��26" 
> [Jun 22 09:52:07] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.30 HDLC signal status is Carrier down (-1) in state 6
> [Jun 22 09:52:07] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.30 HDLC signal status is Carrier down (-1) in state 6
> [Jun 22 09:52:07] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.30 No signal is present
> [Jun 22 09:52:07] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.38 Rx    83: IFP 00
> [Jun 22 09:52:07] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.38 Rx    83: indicator no-signal
> [Jun 22 09:52:33] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.30 Status changing to 'The call dropped prematurely'
> [Jun 22 09:52:33] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.30 Changing from state 6 to 30
> [Jun 22 09:52:33] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.30 Changing from phase T30_PHASE_B_RX to T30_PHASE_CALL_FINISHED
> [Jun 22 09:52:33] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.38T Set rx type 9
> [Jun 22 09:52:33] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.38T Set tx type 9
> [Jun 22 09:52:33] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.38T FAX exchange complete
> [Jun 22 09:52:33] FAX[24642][C-00000007]: res_fax.c:1039 ast_fax_log: FLOW T.30 Call completed
> [Jun 22 09:52:33] ERROR[24642][C-00000007]: json.c:825 ast_json_vpack: Error building JSON from '{s: s, s: s}': Invalid UTF-8 string.
> [Jun 22 09:52:33] ERROR[24642][C-00000007]: stasis_channels.c:771 ast_channel_publish_varset: Error creating message
> [Jun 22 09:52:33] ERROR[24642][C-00000007]: json.c:825 ast_json_vpack: Error building JSON from '{s: s, s: s, s: s, s: s, s: s, s: s, s: o}': Invalid UTF-8 string.
> [Jun 22 09:52:33] ERROR[24642][C-00000007]: res_fax.c:2808 sendfax_exec: Error publishing SendFAX status message
> {noformat}
> We have the PCAP, but we can't share publicly on the Internet.
> The strange thing, is that we don't seem to have this issue with another server with Asterisk 13.15. But, for an unknown reason, it doesn't use T.38 for the same number: 
> {noformat}
> [Jun 22 12:40:56] FAX[7619][C-00000037]: res_fax.c:1039 ast_fax_log: FLOW T.30 The remote was made in 'Japan'
> [Jun 22 12:40:56] FAX[7619][C-00000037]: res_fax.c:1039 ast_fax_log: FLOW T.30 The remote was made by 'Brother'
> [Jun 22 12:40:56] FAX[7619][C-00000037]: res_fax.c:1039 ast_fax_log: FLOW T.30 Stop none (0 remaining)
> [Jun 22 12:40:56] FAX[7619][C-00000037]: res_fax.c:1039 ast_fax_log: FLOW T.30 Rx:  CSI without final frame tag
> [Jun 22 12:40:56] FAX[7619][C-00000037]: res_fax.c:1039 ast_fax_log: FLOW T.30 Rx:  ff 03 40 36 32 30 39 35 35 33 32 32 33 2b 20 20 20 20 20 20 20 20 20
> [Jun 22 12:40:56] FAX[7619][C-00000037]: res_fax.c:1039 ast_fax_log: FLOW T.30 Remote gave CSI as: "+3223559026" 
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list