]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
confbridge: Handle user hangup during name recording
authorSean Bright <sean.bright@gmail.com>
Tue, 29 Aug 2017 14:26:17 +0000 (10:26 -0400)
committerSean Bright <sean.bright@gmail.com>
Tue, 29 Aug 2017 14:27:54 +0000 (09:27 -0500)
This prevents orphaned CBAnn channels from getting stuck in the bridge.

ASTERISK-26994 #close
Reported by: James Terhune

Change-Id: I5e43e832a9507ec3f2c59752cd900b41dab80457

apps/app_confbridge.c

index a33622f11774b364c5f9275284188e5abec19dd9..f5f0742f590c89af888469ba51db9a5b0b11b672 100644 (file)
@@ -2320,7 +2320,11 @@ static int confbridge_exec(struct ast_channel *chan, const char *data)
        if (!quiet &&
                (ast_test_flag(&user.u_profile, USER_OPT_ANNOUNCE_JOIN_LEAVE) ||
                (ast_test_flag(&user.u_profile, USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW)))) {
-               conf_rec_name(&user, args.conf_name);
+               if (conf_rec_name(&user, args.conf_name)) {
+                       pbx_builtin_setvar_helper(chan, "CONFBRIDGE_RESULT", "FAILED");
+                       res = -1; /* Hangup during name recording */
+                       goto confbridge_cleanup;
+               }
        }
 
        /* menu name */