]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't parse events for b legs from a leg thread in case they are using a monolothic...
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 29 Nov 2010 21:34:27 +0000 (15:34 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 29 Nov 2010 21:34:27 +0000 (15:34 -0600)
src/switch_ivr_originate.c

index da76cf6cbc6fe54972d79477bec2801b0ca9a461..f99ac69188da5a667eded6a7ee89c5f0c1f2f089 100644 (file)
@@ -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) ||