wait for channels to come up in paging mode

This commit is contained in:
Anthony Minessale 2011-03-30 20:12:25 -05:00
parent 3253bcb363
commit b8063c3d34

View File

@ -2559,10 +2559,6 @@ static void conference_loop_output(conference_member_t *member)
write_frame.codec = &member->write_codec;
if (!switch_test_flag(member->conference, CFLAG_ANSWERED)) {
switch_channel_answer(channel);
}
if (!restarting) {
/* Start the input thread */
launch_conference_loop_input(member, switch_core_session_get_pool(member->session));
@ -2609,8 +2605,22 @@ static void conference_loop_output(conference_member_t *member)
}
switch_safe_free(cpstr);
}
do {
switch_ivr_play_file(member->session, NULL, "tone_stream://%(500,0,640)", NULL);
} while(switch_channel_up(channel) && member->conference->originating);
if (!switch_channel_ready(channel)) {
member->conference->cancel_cause = SWITCH_CAUSE_ORIGINATOR_CANCEL;
goto end;
}
}
}
if (!switch_test_flag(member->conference, CFLAG_ANSWERED)) {
switch_channel_answer(channel);
}
if (restarting) {
switch_channel_clear_app_flag(channel, CF_APP_TAGGED);
@ -2788,8 +2798,9 @@ static void conference_loop_output(conference_member_t *member)
switch_cond_next();
}
} /* Rinse ... Repeat */
} /* Rinse ... Repeat */
end:
switch_clear_flag_locked(member, MFLAG_RUNNING);
switch_core_timer_destroy(&timer);