mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-08 08:51:50 +00:00
FS-3027
This commit is contained in:
parent
b55b4eeaee
commit
74a0cfd1e1
@ -4071,15 +4071,22 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
|
|||||||
greedy = !!sofia_test_pflag(tech_pvt->profile, PFLAG_GREEDY);
|
greedy = !!sofia_test_pflag(tech_pvt->profile, PFLAG_GREEDY);
|
||||||
scrooge = !!sofia_test_pflag(tech_pvt->profile, PFLAG_SCROOGE);
|
scrooge = !!sofia_test_pflag(tech_pvt->profile, PFLAG_SCROOGE);
|
||||||
|
|
||||||
if (!greedy || !scrooge) {
|
if ((val = switch_channel_get_variable(channel, "sip_codec_negotiation"))) {
|
||||||
if ((val = switch_channel_get_variable(channel, "sip_codec_negotiation"))) {
|
if (!strcasecmp(val, "generous")) {
|
||||||
if (!strcasecmp(val, "greedy")) {
|
greedy = 0;
|
||||||
greedy = 1;
|
scrooge = 0;
|
||||||
} else if (!strcasecmp(val, "scrooge")) {
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "sip_codec_negotiation overriding sofia inbound-codec-negotiation : generous\n" );
|
||||||
scrooge = 1;
|
} else if (!strcasecmp(val, "greedy")) {
|
||||||
greedy = 1;
|
greedy = 1;
|
||||||
}
|
scrooge = 0;
|
||||||
}
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "sip_codec_negotiation overriding sofia inbound-codec-negotiation : greedy\n" );
|
||||||
|
} else if (!strcasecmp(val, "scrooge")) {
|
||||||
|
scrooge = 1;
|
||||||
|
greedy = 1;
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "sip_codec_negotiation overriding sofia inbound-codec-negotiation : scrooge\n" );
|
||||||
|
} else {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "sip_codec_negotiation ignored invalid value : '%s' \n", val );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((tech_pvt->origin = switch_core_session_strdup(session, (char *) sdp->sdp_origin->o_username))) {
|
if ((tech_pvt->origin = switch_core_session_strdup(session, (char *) sdp->sdp_origin->o_username))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user