mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-19 01:45:32 +00:00
FS-6418 FS-6427 add profile param NDLB-proxy-never-patch-reinvites to solve both issues
This commit is contained in:
parent
a9a6e70915
commit
d77317f8f1
@ -299,7 +299,8 @@ typedef enum {
|
||||
PFLAG_NDLB_ALLOW_BAD_IANANAME = (1 << 3),
|
||||
PFLAG_NDLB_ALLOW_NONDUP_SDP = (1 << 4),
|
||||
PFLAG_NDLB_ALLOW_CRYPTO_IN_AVP = (1 << 5),
|
||||
PFLAG_NDLB_EXPIRES_IN_REGISTER_RESPONSE = (1 << 6)
|
||||
PFLAG_NDLB_EXPIRES_IN_REGISTER_RESPONSE = (1 << 6),
|
||||
PFLAG_NDLB_NEVER_PATCH_REINVITE = (1 << 7)
|
||||
} sofia_NDLB_t;
|
||||
|
||||
typedef enum {
|
||||
|
@ -3780,6 +3780,12 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
|
||||
} else {
|
||||
sofia_clear_pflag(profile, PFLAG_FORWARD_MWI_NOTIFY);
|
||||
}
|
||||
} else if (!strcasecmp(var, "NDLB-proxy-never-patch-reinvites")) {
|
||||
if (switch_true(val)) {
|
||||
profile->ndlb |= PFLAG_NDLB_NEVER_PATCH_REINVITE;
|
||||
} else {
|
||||
profile->ndlb &= ~PFLAG_NDLB_NEVER_PATCH_REINVITE;
|
||||
}
|
||||
} else if (!strcasecmp(var, "registration-thread-frequency")) {
|
||||
profile->ireg_seconds = atoi(val);
|
||||
if (profile->ireg_seconds < 0) {
|
||||
@ -6322,7 +6328,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
||||
}
|
||||
}
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||
if (switch_channel_test_flag(channel, CF_PROXY_MEDIA) && !(tech_pvt->profile->ndlb & PFLAG_NDLB_NEVER_PATCH_REINVITE)) {
|
||||
if (sofia_glue_tech_proxy_remote_addr(tech_pvt, r_sdp) == SWITCH_STATUS_SUCCESS && !is_t38) {
|
||||
nua_respond(tech_pvt->nh, SIP_200_OK, TAG_END());
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Audio params changed, NOT proxying re-invite.\n");
|
||||
|
@ -1751,10 +1751,12 @@ void sofia_glue_tech_patch_sdp(private_object_t *tech_pvt)
|
||||
|
||||
len = strlen(tech_pvt->local_sdp_str) * 2;
|
||||
|
||||
if (switch_channel_test_flag(tech_pvt->channel, CF_ANSWERED) &&
|
||||
(switch_stristr("sendonly", tech_pvt->local_sdp_str) || switch_stristr("0.0.0.0", tech_pvt->local_sdp_str))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Skip patch on hold SDP\n");
|
||||
return;
|
||||
if (!(tech_pvt->profile->ndlb & PFLAG_NDLB_NEVER_PATCH_REINVITE)) {
|
||||
if (switch_channel_test_flag(tech_pvt->channel, CF_ANSWERED) &&
|
||||
(switch_stristr("sendonly", tech_pvt->local_sdp_str) || switch_stristr("0.0.0.0", tech_pvt->local_sdp_str))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Skip patch on hold SDP\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (zstr(tech_pvt->adv_sdp_audio_ip) || !tech_pvt->adv_sdp_audio_port) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user