]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
channel: No hung-up on failing security requirements. 26/3726/2
authorAlexander Traud <pabstraud@compuserve.com>
Fri, 26 Aug 2016 13:41:16 +0000 (15:41 +0200)
committerAlexander Traud <pabstraud@compuserve.com>
Fri, 26 Aug 2016 14:39:43 +0000 (09:39 -0500)
In your Diaplan, if you specify
 same => n,Set(CHANNEL(secure_bridge_media)=1)
 same => n,Set(CHANNEL(secure_bridge_signaling)=1)
only the SIP channel driver chan_sip supports this. All other channels drivers
like res_pjsip fail. In case of failure, the original sRTP source code released
the whole channel, even if not hung-up, yet. This change does not release the
channel but instead hangs-up the channel.

ASTERISK-26306

Change-Id: I0489f0cb660fab6673b0db8af027d116e70a66db

main/channel.c

index 853935da330a4302ca5f2a1cb4fff3b8715d4c3e..f3f79399fe4547a25cff35479fe2a0a4d1bc5943 100644 (file)
@@ -6094,7 +6094,7 @@ struct ast_channel *ast_request(const char *type, struct ast_format_cap *request
 
                if (set_security_requirements(requestor, c)) {
                        ast_log(LOG_WARNING, "Setting security requirements failed\n");
-                       c = ast_channel_release(c);
+                       ast_hangup(c);
                        *cause = AST_CAUSE_BEARERCAPABILITY_NOTAVAIL;
                        return NULL;
                }