mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-12 04:27:06 +00:00
tweaks and fixes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@859 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
c5e3144711
commit
539ff39995
16 files changed
+289
-189
No files matched your search
+12
-2
@@ -893,25 +893,35 @@ SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_sessi
|
||||
switch_channel_add_state_handler(caller_channel, &audio_bridge_caller_state_handlers);
|
||||
switch_channel_add_state_handler(peer_channel, &audio_bridge_peer_state_handlers);
|
||||
switch_core_session_thread_launch(peer_session);
|
||||
|
||||
time(&start);
|
||||
|
||||
for (;;) {
|
||||
int state = switch_channel_get_state(peer_channel);
|
||||
if (state > CS_RING) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (!switch_channel_ready(caller_channel)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((time(NULL) - start) > timelimit) {
|
||||
break;
|
||||
}
|
||||
switch_yield(1000);
|
||||
}
|
||||
|
||||
switch_channel_pre_answer(caller_channel);
|
||||
|
||||
time(&start);
|
||||
|
||||
while (switch_channel_ready(caller_channel) &&
|
||||
switch_channel_ready(peer_channel) &&
|
||||
!switch_channel_test_flag(peer_channel, CF_ANSWERED) &&
|
||||
!switch_channel_test_flag(peer_channel, CF_EARLY_MEDIA) &&
|
||||
((time(NULL) - start) < timelimit)) {
|
||||
|
||||
|
||||
|
||||
/* read from the channel while we wait if the audio is up on it */
|
||||
if (switch_channel_test_flag(caller_channel, CF_ANSWERED) || switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA)) {
|
||||
if (switch_core_session_read_frame(session, &read_frame, 1000, 0) != SWITCH_STATUS_SUCCESS) {
|
||||
|
||||
Reference in new issue
Block a user