summaryrefslogtreecommitdiff
path: root/main/pbx.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 6b9bd5ebf..726677f4a 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -10365,6 +10365,8 @@ static int pbx_outgoing_attempt(const char *type, struct ast_format_cap *cap, co
snprintf(failed_reason, sizeof(failed_reason), "%d", ast_dial_reason(outgoing->dial, 0));
pbx_builtin_setvar_helper(failed, "REASON", failed_reason);
+ ast_channel_unlock(failed);
+
if (ast_pbx_run(failed)) {
ast_log(LOG_ERROR, "Unable to run PBX on '%s'\n", ast_channel_name(failed));
ast_hangup(failed);