Commit 97798a0554 for asterisk.org

commit 97798a0554ac96282f32ba14d793e958bd7d9b26
Author: Sven Kube <mail@sven-kube.de>
Date:   Wed Apr 22 15:26:26 2026 +0200

    res_audiosocket: Tolerate non-audio frame types

    This commit implements the handling of non-voice or DTMF frames like the
    chan_websocket handling added in #1588. Rather than treating unsupported
    frames as fatal errors, silently ignore CNG frames and log a warning for
    other unsupported types.

diff --git a/res/res_audiosocket.c b/res/res_audiosocket.c
index 5b821292b4..165035a0b6 100644
--- a/res/res_audiosocket.c
+++ b/res/res_audiosocket.c
@@ -260,9 +260,14 @@ const int ast_audiosocket_send_frame(const int svc, const struct ast_frame *f)
 				buf[3] = (uint8_t) f->subclass.integer;
 				*length = htons(1);
 				break;
-			default:
-				ast_log(LOG_ERROR, "Unsupported frame type %d for AudioSocket\n", f->frametype);
-				return -1;
+			case AST_FRAME_CNG:
+				return 0;
+			default: {
+				char frame_type[32];
+				ast_frame_type2str(f->frametype, frame_type, sizeof(frame_type));
+				ast_log(LOG_WARNING, "Unsupported frame type %s (%d) for AudioSocket\n", frame_type, f->frametype);
+				return 0;
+			}
 		}

 		if (write(svc, buf, 3 + datalen) != 3 + datalen) {