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

Friendly Automation (JIRA) noreply at issues.asterisk.org
Tue Jul 7 09:35:25 CDT 2020


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

Friendly Automation commented on ASTERISK-28958:
------------------------------------------------

Change 14643 merged by George Joseph:
res_http_websocket.c: Continue reading after ping/pong

[https://gerrit.asterisk.org/c/asterisk/+/14643|https://gerrit.asterisk.org/c/asterisk/+/14643]

> 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
>
> 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