mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-26 20:48:21 +00:00
stop the madness (maybe)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15153 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d4c5b8c850
commit
0fe0604f90
@ -146,7 +146,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
|
|||||||
switch_ivr_bridge_data_t *data = obj;
|
switch_ivr_bridge_data_t *data = obj;
|
||||||
int stream_id = 0, pre_b = 0, ans_a = 0, ans_b = 0, originator = 0;
|
int stream_id = 0, pre_b = 0, ans_a = 0, ans_b = 0, originator = 0;
|
||||||
switch_input_callback_function_t input_callback;
|
switch_input_callback_function_t input_callback;
|
||||||
switch_core_session_message_t *message, msg = { 0 };
|
switch_core_session_message_t msg = { 0 };
|
||||||
void *user_data;
|
void *user_data;
|
||||||
switch_channel_t *chan_a, *chan_b;
|
switch_channel_t *chan_a, *chan_b;
|
||||||
switch_frame_t *read_frame;
|
switch_frame_t *read_frame;
|
||||||
@ -356,11 +356,6 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_core_session_dequeue_message(session_b, &message) == SWITCH_STATUS_SUCCESS) {
|
|
||||||
switch_core_session_receive_message(session_a, message);
|
|
||||||
message = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ans_a && answer_limit && switch_epoch_time_now(NULL) > answer_limit) {
|
if (!ans_a && answer_limit && switch_epoch_time_now(NULL) > answer_limit) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Answer timeout hit on %s.\n", switch_channel_get_name(chan_a));
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Answer timeout hit on %s.\n", switch_channel_get_name(chan_a));
|
||||||
switch_channel_hangup(chan_a, SWITCH_CAUSE_ALLOTTED_TIMEOUT);
|
switch_channel_hangup(chan_a, SWITCH_CAUSE_ALLOTTED_TIMEOUT);
|
||||||
|
@ -1014,7 +1014,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||||||
char *e = NULL;
|
char *e = NULL;
|
||||||
const char *ringback_data = NULL;
|
const char *ringback_data = NULL;
|
||||||
switch_codec_t *read_codec = NULL;
|
switch_codec_t *read_codec = NULL;
|
||||||
switch_core_session_message_t *message = NULL;
|
|
||||||
switch_event_t *var_event = NULL;
|
switch_event_t *var_event = NULL;
|
||||||
uint8_t fail_on_single_reject = 0;
|
uint8_t fail_on_single_reject = 0;
|
||||||
char *fail_on_single_reject_var = NULL;
|
char *fail_on_single_reject_var = NULL;
|
||||||
@ -1026,7 +1025,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||||||
int local_clobber = 0;
|
int local_clobber = 0;
|
||||||
const char *cancel_key = NULL;
|
const char *cancel_key = NULL;
|
||||||
const char *holding = NULL;
|
const char *holding = NULL;
|
||||||
switch_channel_state_t wait_state = 0;
|
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
const char *to_var;
|
const char *to_var;
|
||||||
@ -1968,10 +1966,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (caller_channel) {
|
|
||||||
wait_state = switch_channel_get_state(caller_channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
while ((!caller_channel || switch_channel_ready(caller_channel) || switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) &&
|
while ((!caller_channel || switch_channel_ready(caller_channel) || switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) &&
|
||||||
check_channel_status(&oglobals, originate_status, and_argc)) {
|
check_channel_status(&oglobals, originate_status, and_argc)) {
|
||||||
time_t elapsed = switch_epoch_time_now(NULL) - start;
|
time_t elapsed = switch_epoch_time_now(NULL) - start;
|
||||||
@ -1987,11 +1981,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||||||
switch_ivr_parse_all_events(oglobals.session);
|
switch_ivr_parse_all_events(oglobals.session);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (caller_channel && switch_channel_get_state(caller_channel) != wait_state && !switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) {
|
|
||||||
//oglobals.idx = IDX_NADA;
|
|
||||||
//goto notready;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!oglobals.sent_ring && !oglobals.progress && (progress_timelimit_sec && elapsed > (time_t) progress_timelimit_sec)) {
|
if (!oglobals.sent_ring && !oglobals.progress && (progress_timelimit_sec && elapsed > (time_t) progress_timelimit_sec)) {
|
||||||
oglobals.idx = IDX_TIMEOUT;
|
oglobals.idx = IDX_TIMEOUT;
|
||||||
goto notready;
|
goto notready;
|
||||||
@ -2026,11 +2015,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oglobals.session && switch_core_session_dequeue_message(oglobals.session, &message) == SWITCH_STATUS_SUCCESS) {
|
|
||||||
switch_core_session_receive_message(oglobals.session, message);
|
|
||||||
message = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* read from the channel while we wait if the audio is up on it */
|
/* read from the channel while we wait if the audio is up on it */
|
||||||
if (oglobals.session &&
|
if (oglobals.session &&
|
||||||
!switch_channel_test_flag(caller_channel, CF_PROXY_MODE) &&
|
!switch_channel_test_flag(caller_channel, CF_PROXY_MODE) &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user