From 8e2234a205f9b19b628670df6d517974c62b2317 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Sat, 20 Feb 2021 21:14:15 +0300 Subject: [PATCH] [Core] Fix race between switch_ivr_park_session() and the state machine. switch_core_session_run() wants to clear the CF_TRANSFER flag on state change while parking sets the flag. --- src/switch_ivr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 9aa05fcd73..f1493a723d 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -3522,8 +3522,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_generate_json_cdr(switch_core_session SWITCH_DECLARE(void) switch_ivr_park_session(switch_core_session_t *session) { switch_channel_t *channel = switch_core_session_get_channel(session); - switch_channel_set_state(channel, CS_PARK); switch_channel_set_flag(channel, CF_TRANSFER); + switch_channel_set_state(channel, CS_PARK); } -- 2.47.2