band aid, beware of sip transfers
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3589 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d16297cc46
commit
d3dca0313b
|
@ -3705,14 +3705,13 @@ static void sip_i_refer(nua_t *nua,
|
||||||
switch_core_session_t *bsession;
|
switch_core_session_t *bsession;
|
||||||
|
|
||||||
if ((bsession = switch_core_session_locate(br))) {
|
if ((bsession = switch_core_session_locate(br))) {
|
||||||
channel = switch_core_session_get_channel(bsession);
|
|
||||||
switch_channel_set_variable(channel, "TRANSFER_FALLBACK", (char *) from->a_user);
|
switch_channel_set_variable(channel, "TRANSFER_FALLBACK", (char *) from->a_user);
|
||||||
switch_ivr_session_transfer(bsession, exten, profile->dialplan, profile->context);
|
switch_ivr_session_transfer(bsession, exten, profile->dialplan, profile->context);
|
||||||
switch_core_session_rwunlock(bsession);
|
switch_core_session_rwunlock(bsession);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_channel_set_variable(channel, "endpoint_disposition", "BLIND_TRANSFER");
|
switch_channel_set_variable(channel, "endpoint_disposition", "BLIND_TRANSFER");
|
||||||
|
|
||||||
nua_notify(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("message/sipfrag"),
|
nua_notify(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("message/sipfrag"),
|
||||||
SIPTAG_PAYLOAD_STR("SIP/2.0 200 OK"),
|
SIPTAG_PAYLOAD_STR("SIP/2.0 200 OK"),
|
||||||
SIPTAG_EVENT_STR(etmp),
|
SIPTAG_EVENT_STR(etmp),
|
||||||
|
@ -4008,8 +4007,8 @@ static void sip_i_invite(nua_t *nua,
|
||||||
}
|
}
|
||||||
|
|
||||||
attach_private(session, profile, tech_pvt, username);
|
attach_private(session, profile, tech_pvt, username);
|
||||||
switch_core_session_read_lock(session);
|
//switch_core_session_read_lock(session);
|
||||||
switch_set_flag(tech_pvt, TFLAG_RWLOCK);
|
//switch_set_flag(tech_pvt, TFLAG_RWLOCK);
|
||||||
channel = switch_core_session_get_channel(session);
|
channel = switch_core_session_get_channel(session);
|
||||||
switch_channel_set_variable(channel, "endpoint_disposition", "INBOUND CALL");
|
switch_channel_set_variable(channel, "endpoint_disposition", "INBOUND CALL");
|
||||||
set_chat_hash(tech_pvt, sip);
|
set_chat_hash(tech_pvt, sip);
|
||||||
|
|
|
@ -3286,10 +3286,19 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
|
||||||
switch_channel_event_set_data(caller_channel, event);
|
switch_channel_event_set_data(caller_channel, event);
|
||||||
switch_event_fire(&event);
|
switch_event_fire(&event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (switch_channel_get_state(caller_channel) != CS_EXECUTE && !switch_channel_test_flag(caller_channel, CF_TRANSFER)) {
|
if (switch_channel_get_state(caller_channel) != CS_EXECUTE && !switch_channel_test_flag(caller_channel, CF_TRANSFER)) {
|
||||||
switch_channel_hangup(caller_channel, SWITCH_CAUSE_NORMAL_CLEARING);
|
switch_channel_hangup(caller_channel, SWITCH_CAUSE_NORMAL_CLEARING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (switch_channel_test_flag(caller_channel, CF_TRANSFER) && !switch_channel_test_flag(peer_channel, CF_TRANSFER)) {
|
||||||
|
switch_channel_hangup(peer_channel, SWITCH_CAUSE_NORMAL_CLEARING);
|
||||||
|
}
|
||||||
|
if (!switch_channel_test_flag(caller_channel, CF_TRANSFER) && switch_channel_test_flag(peer_channel, CF_TRANSFER)) {
|
||||||
|
switch_channel_hangup(caller_channel, SWITCH_CAUSE_NORMAL_CLEARING);
|
||||||
|
}
|
||||||
|
|
||||||
this_audio_thread->objs[0] = NULL;
|
this_audio_thread->objs[0] = NULL;
|
||||||
this_audio_thread->objs[1] = NULL;
|
this_audio_thread->objs[1] = NULL;
|
||||||
this_audio_thread->objs[2] = NULL;
|
this_audio_thread->objs[2] = NULL;
|
||||||
|
|
Loading…
Reference in New Issue