mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-18 18:21:54 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7745 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -707,8 +707,6 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
private_object_t *tech_pvt = switch_core_session_get_private(session);
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
|
||||
switch_mutex_lock(tech_pvt->flag_mutex);
|
||||
|
||||
if (switch_channel_get_state(channel) >= CS_HANGUP || !tech_pvt) {
|
||||
status = SWITCH_STATUS_FALSE;
|
||||
goto end;
|
||||
@@ -717,7 +715,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
if (msg->message_id == SWITCH_MESSAGE_INDICATE_ANSWER || msg->message_id == SWITCH_MESSAGE_INDICATE_PROGRESS) {
|
||||
const char *var;
|
||||
if ((var = switch_channel_get_variable(channel, SOFIA_SECURE_MEDIA_VARIABLE)) && switch_true(var)) {
|
||||
switch_set_flag(tech_pvt, TFLAG_SECURE);
|
||||
switch_set_flag_locked(tech_pvt, TFLAG_SECURE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -789,7 +787,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
{
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Sending media re-direct:\n%s\n", msg->string_arg);
|
||||
tech_pvt->local_sdp_str = switch_core_session_strdup(session, msg->string_arg);
|
||||
switch_set_flag(tech_pvt, TFLAG_SENT_UPDATE);
|
||||
switch_set_flag_locked(tech_pvt, TFLAG_SENT_UPDATE);
|
||||
sofia_glue_do_invite(session);
|
||||
}
|
||||
break;
|
||||
@@ -828,7 +826,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
|
||||
case SWITCH_MESSAGE_INDICATE_HOLD:
|
||||
{
|
||||
switch_set_flag(tech_pvt, TFLAG_SIP_HOLD);
|
||||
switch_set_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
|
||||
sofia_glue_do_invite(session);
|
||||
}
|
||||
break;
|
||||
@@ -850,7 +848,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
private_object_t *a_tech_pvt = switch_core_session_get_private(a_session);
|
||||
private_object_t *b_tech_pvt = switch_core_session_get_private(b_session);
|
||||
|
||||
switch_set_flag(a_tech_pvt, TFLAG_REINVITE);
|
||||
switch_set_flag_locked(a_tech_pvt, TFLAG_REINVITE);
|
||||
a_tech_pvt->remote_sdp_audio_ip = switch_core_session_strdup(a_session, b_tech_pvt->remote_sdp_audio_ip);
|
||||
a_tech_pvt->remote_sdp_audio_port = b_tech_pvt->remote_sdp_audio_port;
|
||||
a_tech_pvt->local_sdp_audio_ip = switch_core_session_strdup(a_session, b_tech_pvt->local_sdp_audio_ip);
|
||||
@@ -886,7 +884,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
if (msg->string_arg) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Re-directing to %s\n", msg->string_arg);
|
||||
nua_respond(tech_pvt->nh, SIP_302_MOVED_TEMPORARILY, SIPTAG_CONTACT_STR(msg->string_arg), TAG_END());
|
||||
switch_set_flag(tech_pvt, TFLAG_BYE);
|
||||
switch_set_flag_locked(tech_pvt, TFLAG_BYE);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -963,7 +961,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
nua_respond(tech_pvt->nh, code, reason, TAG_IF(to_uri, SIPTAG_CONTACT_STR(to_uri)),
|
||||
SIPTAG_SUPPORTED_STR(NULL), SIPTAG_ACCEPT_STR(NULL),
|
||||
TAG_IF(!switch_strlen_zero(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)), TAG_END());
|
||||
switch_set_flag(tech_pvt, TFLAG_BYE);
|
||||
switch_set_flag_locked(tech_pvt, TFLAG_BYE);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Responding with %d %s\n", code, reason);
|
||||
|
||||
@@ -981,7 +979,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
} else {
|
||||
nua_respond(tech_pvt->nh, code, reason, SIPTAG_CONTACT_STR(tech_pvt->reply_contact), TAG_END());
|
||||
}
|
||||
switch_set_flag(tech_pvt, TFLAG_BYE);
|
||||
switch_set_flag_locked(tech_pvt, TFLAG_BYE);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1000,7 +998,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
{
|
||||
if (!switch_test_flag(tech_pvt, TFLAG_ANS) && !switch_test_flag(tech_pvt, TFLAG_EARLY_MEDIA)) {
|
||||
|
||||
switch_set_flag(tech_pvt, TFLAG_EARLY_MEDIA);
|
||||
switch_set_flag_locked(tech_pvt, TFLAG_EARLY_MEDIA);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Asked to send early media by %s\n", msg->from);
|
||||
|
||||
/* Transmit 183 Progress with SDP */
|
||||
@@ -1061,10 +1059,6 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
|
||||
end:
|
||||
|
||||
//xxxbot
|
||||
|
||||
switch_mutex_unlock(tech_pvt->flag_mutex);
|
||||
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
@@ -1425,7 +1425,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||
|
||||
switch_assert(tech_pvt != NULL);
|
||||
|
||||
switch_mutex_lock(tech_pvt->flag_mutex);
|
||||
switch_core_session_signal_lock(tech_pvt->session);
|
||||
|
||||
if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MODE)) {
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
@@ -1665,7 +1665,8 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||
|
||||
end:
|
||||
|
||||
switch_mutex_unlock(tech_pvt->flag_mutex);
|
||||
switch_core_session_signal_unlock(tech_pvt->session);
|
||||
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user