mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-15 19:40:06 +00:00
tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9575 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
1a66e8b288
commit
260ebb8338
@ -2183,6 +2183,10 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
|||||||
status = 180;
|
status = 180;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (status == 180 && r_sdp) {
|
||||||
|
status = 183;
|
||||||
|
}
|
||||||
|
|
||||||
if (channel && (status == 180 || status == 183) && switch_channel_test_flag(channel, CF_OUTBOUND)) {
|
if (channel && (status == 180 || status == 183) && switch_channel_test_flag(channel, CF_OUTBOUND)) {
|
||||||
const char *val;
|
const char *val;
|
||||||
if ((val = switch_channel_get_variable(channel, "sip_auto_answer")) && switch_true(val)) {
|
if ((val = switch_channel_get_variable(channel, "sip_auto_answer")) && switch_true(val)) {
|
||||||
@ -2476,22 +2480,25 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (channel) {
|
if (channel) {
|
||||||
if (switch_test_flag(tech_pvt, TFLAG_EARLY_MEDIA)) {
|
if (switch_test_flag(tech_pvt, TFLAG_EARLY_MEDIA)) {
|
||||||
switch_set_flag_locked(tech_pvt, TFLAG_ANS);
|
switch_set_flag_locked(tech_pvt, TFLAG_ANS);
|
||||||
switch_set_flag(tech_pvt, TFLAG_SDP);
|
switch_set_flag(tech_pvt, TFLAG_SDP);
|
||||||
switch_channel_mark_answered(channel);
|
switch_channel_mark_answered(channel);
|
||||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))
|
if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||||
&& (other_session = switch_core_session_locate(uuid))) {
|
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))
|
||||||
other_channel = switch_core_session_get_channel(other_session);
|
&& (other_session = switch_core_session_locate(uuid))) {
|
||||||
switch_channel_answer(other_channel);
|
other_channel = switch_core_session_get_channel(other_session);
|
||||||
switch_core_session_rwunlock(other_session);
|
switch_channel_answer(other_channel);
|
||||||
|
switch_core_session_rwunlock(other_session);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!r_sdp && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
|
if (!r_sdp && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
|
||||||
r_sdp = (const char *) switch_channel_get_variable(channel, SWITCH_R_SDP_VARIABLE);
|
r_sdp = (const char *) switch_channel_get_variable(channel, SWITCH_R_SDP_VARIABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r_sdp && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
|
if (r_sdp && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
|
||||||
if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||||
switch_set_flag_locked(tech_pvt, TFLAG_ANS);
|
switch_set_flag_locked(tech_pvt, TFLAG_ANS);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user