[asterisk-bugs] [JIRA] (ASTERISK-28958) Continue reading string when ping received by websocket

Asterisk Team (JIRA) noreply at issues.asterisk.org
Thu Jul 9 11:02:26 CDT 2020


     [ https://issues.asterisk.org/jira/browse/ASTERISK-28958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asterisk Team updated ASTERISK-28958:
-------------------------------------

    Target Release Version/s: 17.6.0

> Continue reading string when ping received by websocket
> -------------------------------------------------------
>
>                 Key: ASTERISK-28958
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28958
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: Resources/res_http_websocket
>    Affects Versions: GIT
>            Reporter: Nickolay V. Shmyrev
>            Assignee: Nickolay V. Shmyrev
>            Severity: Minor
>      Target Release: 13.35.0, 16.12.0, 17.6.0
>
>
> While implementing websocket-based speech recognition server https://github.com/alphacep/vosk-asterisk I had the following issue.
> According to websocket specification client can receive ping control frame any time. In that case the following error is thrown by client reading for the string when client uses ast_websocket_read_string (https://github.com/asterisk/asterisk/blob/9445dac43b68ea3adff9c52cd8722f0adb86c079/res/res_http_websocket.c#L1439):
> {code}
> 		if (opcode != AST_WEBSOCKET_OPCODE_TEXT) {
> 			ast_log(LOG_ERROR, "Client WebSocket string read - "
> 				"non string data received\n");
> 			return -1;
> 		}
> {code}
> The proposed change should solve this problem by continue reading the string after ping is recieved:
> **edit by [~kharwell]: removed inline patch.



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



More information about the asterisk-bugs mailing list