From: Anthony Minessale Date: Mon, 29 Nov 2010 21:34:27 +0000 (-0600) Subject: don't parse events for b legs from a leg thread in case they are using a monolothic... X-Git-Tag: v1.2-rc1~247^2~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed5266d3ca944036165a26d06eac3a3fcd0b88a5;p=thirdparty%2Ffreeswitch.git don't parse events for b legs from a leg thread in case they are using a monolothic python script as a group_confirm exec over socket to send it messages while the call is ringing --- diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index da76cf6cbc..f99ac69188 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -635,8 +635,15 @@ static uint8_t check_channel_status(originate_global_t *oglobals, originate_stat } } } - - switch_ivr_parse_all_events(originate_status[i].peer_session); + + if (!switch_channel_test_flag(originate_status[i].peer_channel, CF_PARK) && + !switch_channel_test_flag(originate_status[i].peer_channel, CF_CONSUME_ON_ORIGINATE)) { + if (switch_channel_test_flag(originate_status[i].peer_channel, CF_THREAD_SLEEPING)) { + switch_core_session_wake_session_thread(originate_status[i].peer_session); + } else { + switch_ivr_parse_all_events(originate_status[i].peer_session); + } + } state = switch_channel_get_state(originate_status[i].peer_channel); if (state >= CS_HANGUP || state == CS_RESET || switch_channel_test_flag(originate_status[i].peer_channel, CF_TRANSFER) ||