if (switch_strlen_zero(number)) {
number = caller_profile->destination_number;
}
-
+
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && (session_b = switch_core_session_locate(uuid))) {
switch_core_session_message_t *msg;
-
+
msg = switch_core_session_alloc(session_b, sizeof(*msg));
MESSAGE_STAMP_FFL(msg);
msg->message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
if (sip->sip_to) {
number = sip->sip_to->a_url->url_user;
}
-
+
if ((passerted = sip_p_asserted_identity(sip))) {
if (passerted->paid_url && passerted->paid_url->url_user) {
number = passerted->paid_url->url_user;
switch_ivr_bridge_data_t *data = obj;
int stream_id = 0, pre_b = 0, ans_a = 0, ans_b = 0, originator = 0;
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;
switch_channel_t *chan_a, *chan_b;
switch_frame_t *read_frame;
}
- 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) {
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);
char *e = NULL;
const char *ringback_data = NULL;
switch_codec_t *read_codec = NULL;
- switch_core_session_message_t *message = NULL;
switch_event_t *var_event = NULL;
uint8_t fail_on_single_reject = 0;
char *fail_on_single_reject_var = NULL;
int local_clobber = 0;
const char *cancel_key = NULL;
const char *holding = NULL;
- switch_channel_state_t wait_state = 0;
if (session) {
const char *to_var;
}
#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)) &&
check_channel_status(&oglobals, originate_status, and_argc)) {
time_t elapsed = switch_epoch_time_now(NULL) - start;
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)) {
oglobals.idx = IDX_TIMEOUT;
goto notready;
goto notready;
}
}
-
- 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 */
if (oglobals.session &&
!switch_channel_test_flag(caller_channel, CF_PROXY_MODE) &&