mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
FS-3688 some more general changes during proxy media
This commit is contained in:
@@ -1796,7 +1796,10 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
}
|
||||
|
||||
sofia_set_flag_locked(tech_pvt, TFLAG_SENT_UPDATE);
|
||||
switch_channel_set_flag(channel, CF_REQ_MEDIA);
|
||||
|
||||
if (!switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||
switch_channel_set_flag(channel, CF_REQ_MEDIA);
|
||||
}
|
||||
sofia_glue_do_invite(session);
|
||||
}
|
||||
break;
|
||||
@@ -1857,7 +1860,9 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
|
||||
sofia_glue_set_image_sdp(tech_pvt, t38_options, msg->numeric_arg);
|
||||
|
||||
switch_channel_set_flag(channel, CF_REQ_MEDIA);
|
||||
if (!switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||
switch_channel_set_flag(channel, CF_REQ_MEDIA);
|
||||
}
|
||||
sofia_set_flag_locked(tech_pvt, TFLAG_SENT_UPDATE);
|
||||
sofia_glue_do_invite(session);
|
||||
}
|
||||
@@ -1895,7 +1900,9 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
sofia_glue_set_local_sdp(tech_pvt, NULL, 0, NULL, 1);
|
||||
|
||||
if (send_invite) {
|
||||
switch_channel_set_flag(channel, CF_REQ_MEDIA);
|
||||
if (!switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||
switch_channel_set_flag(channel, CF_REQ_MEDIA);
|
||||
}
|
||||
sofia_glue_do_invite(session);
|
||||
} else {
|
||||
status = SWITCH_STATUS_FALSE;
|
||||
|
||||
@@ -1312,10 +1312,6 @@ void sofia_event_callback(nua_event_t event,
|
||||
{
|
||||
sofia_dispatch_event_t *de;
|
||||
|
||||
if (event == nua_r_invite && status >= 900) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
switch_mutex_lock(profile->flag_mutex);
|
||||
profile->queued_events++;
|
||||
@@ -4615,6 +4611,14 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
|
||||
switch_caller_profile_t *caller_profile = NULL;
|
||||
int has_t38 = 0;
|
||||
|
||||
switch_channel_clear_flag(channel, CF_REQ_MEDIA);
|
||||
|
||||
if (status >= 900) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "%s status %d received.\n",
|
||||
switch_channel_get_name(channel), status);
|
||||
return;
|
||||
}
|
||||
|
||||
sofia_glue_get_addr(de->data->e_msg, network_ip, sizeof(network_ip), &network_port);
|
||||
|
||||
switch_channel_set_variable_printf(channel, "sip_local_network_addr", "%s", profile->extsipip ? profile->extsipip : profile->sipip);
|
||||
@@ -4628,8 +4632,6 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
|
||||
caller_profile->network_addr = switch_core_strdup(caller_profile->pool, network_ip);
|
||||
}
|
||||
|
||||
switch_channel_clear_flag(channel, CF_REQ_MEDIA);
|
||||
|
||||
tech_pvt->last_sdp_str = NULL;
|
||||
if (!sofia_use_soa(tech_pvt) && sip->sip_payload && sip->sip_payload->pl_data) {
|
||||
tech_pvt->last_sdp_str = switch_core_session_strdup(session, sip->sip_payload->pl_data);
|
||||
|
||||
Reference in New Issue
Block a user