]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
also allow early_ok flag on caller_channel
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 4 Sep 2012 17:38:29 +0000 (12:38 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 4 Sep 2012 17:38:29 +0000 (12:38 -0500)
src/switch_ivr_originate.c

index 02ccd64a5901f57d3f09763080960e0f0696feaf..2c9c772a21b4d74dfe8317e58774c60e7298ed08 100644 (file)
@@ -703,6 +703,13 @@ static uint8_t check_channel_status(originate_global_t *oglobals, originate_stat
                        switch_channel_clear_flag(originate_status[i].peer_channel, CF_EARLY_OK);
                }
 
+               if (caller_channel && switch_channel_test_flag(caller_channel, CF_EARLY_OK)) {
+                       if (!oglobals->early_ok) {
+                               oglobals->early_ok = 1;
+                       }
+                       switch_channel_clear_flag(caller_channel, CF_EARLY_OK);
+               }
+
                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) ||
                        switch_channel_test_flag(originate_status[i].peer_channel, CF_REDIRECT) ||