mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 20:50:41 +00:00
add NDLB-allow-nondup-sdp to indicate you want to parse a differnt sdp in 200 ok from 1xx (previous default) this is a RFC violation so I decided not to support it by default anymore. Enable this if you want that broken behaviour
This commit is contained in:
parent
f9612fecfe
commit
3f489a2a21
@ -257,7 +257,8 @@ typedef enum {
|
||||
PFLAG_NDLB_TO_IN_200_CONTACT = (1 << 0),
|
||||
PFLAG_NDLB_BROKEN_AUTH_HASH = (1 << 1),
|
||||
PFLAG_NDLB_SENDRECV_IN_SESSION = (1 << 2),
|
||||
PFLAG_NDLB_ALLOW_BAD_IANANAME = (1 << 3)
|
||||
PFLAG_NDLB_ALLOW_BAD_IANANAME = (1 << 3),
|
||||
PFLAG_NDLB_ALLOW_NONDUP_SDP = (1 << 4)
|
||||
} sofia_NDLB_t;
|
||||
|
||||
typedef enum {
|
||||
|
@ -2954,6 +2954,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
|
||||
} else {
|
||||
profile->ndlb &= ~PFLAG_NDLB_ALLOW_BAD_IANANAME;
|
||||
}
|
||||
} else if (!strcasecmp(var, "NDLB-allow-nondup-sdp")) {
|
||||
if (switch_true(val)) {
|
||||
profile->ndlb |= PFLAG_NDLB_ALLOW_NONDUP_SDP;
|
||||
} else {
|
||||
profile->ndlb &= ~PFLAG_NDLB_ALLOW_NONDUP_SDP;
|
||||
}
|
||||
} else if (!strcasecmp(var, "aggressive-nat-detection")) {
|
||||
if (switch_true(val)) {
|
||||
sofia_set_pflag(profile, PFLAG_AGGRESSIVE_NAT_DETECTION);
|
||||
@ -3952,6 +3958,12 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
} else {
|
||||
profile->ndlb &= ~PFLAG_NDLB_ALLOW_BAD_IANANAME;
|
||||
}
|
||||
} else if (!strcasecmp(var, "NDLB-allow-nondup-sdp")) {
|
||||
if (switch_true(val)) {
|
||||
profile->ndlb |= PFLAG_NDLB_ALLOW_NONDUP_SDP;
|
||||
} else {
|
||||
profile->ndlb &= ~PFLAG_NDLB_ALLOW_NONDUP_SDP;
|
||||
}
|
||||
} else if (!strcasecmp(var, "pass-rfc2833")) {
|
||||
if (switch_true(val)) {
|
||||
sofia_set_pflag(profile, PFLAG_PASS_RFC2833);
|
||||
@ -5088,7 +5100,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
||||
sdp_parser_t *parser;
|
||||
sdp_session_t *sdp;
|
||||
|
||||
if (!zstr(tech_pvt->remote_sdp_str) && !strcmp(tech_pvt->remote_sdp_str, r_sdp)) {
|
||||
if ((profile->ndlb & PFLAG_NDLB_ALLOW_NONDUP_SDP) || !zstr(tech_pvt->remote_sdp_str) && !strcmp(tech_pvt->remote_sdp_str, r_sdp)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Duplicate SDP\n%s\n", r_sdp);
|
||||
is_dup_sdp = 1;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user