]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_ari: Ensure outbound websocket config has a websocket_client_id.
authorGeorge Joseph <gjoseph@sangoma.com>
Fri, 12 Sep 2025 13:10:50 +0000 (07:10 -0600)
committerGeorge Joseph <gjoseph@sangoma.com>
Thu, 25 Sep 2025 13:09:22 +0000 (07:09 -0600)
Added a check to outbound_websocket_apply() that makes sure an outbound
websocket config object in ari.conf has a websocket_client_id parameter.

Resolves: #1457

res/ari/config.c

index af89ff9e363df857bae515e5ed5183d5bf3823e2..56fe4fc411623a574078f1b618a6e7f7d869a5aa 100644 (file)
@@ -119,6 +119,11 @@ static int outbound_websocket_apply(const struct ast_sorcery *sorcery, void *obj
 
        ast_debug(3, "%s: Initializing outbound websocket\n", id);
 
+       if (!owc->websocket_client) {
+               ast_log(LOG_WARNING, "%s: Outbound websocket missing websocket_client_id\n", id);
+               res = -1;
+       }
+
        if (ast_strlen_zero(owc->apps)) {
                ast_log(LOG_WARNING, "%s: Outbound websocket missing apps\n", id);
                res = -1;