提交 59d3b84d authored 作者: Anthony Minessale's avatar Anthony Minessale

profile param ignore-183nosdp, chanvar sip_ignore_183nosdp FS-1978

上级 1a1881e8
...@@ -221,6 +221,7 @@ typedef enum { ...@@ -221,6 +221,7 @@ typedef enum {
PFLAG_CID_IN_1XX, PFLAG_CID_IN_1XX,
PFLAG_IN_DIALOG_CHAT, PFLAG_IN_DIALOG_CHAT,
PFLAG_DEL_SUBS_ON_REG, PFLAG_DEL_SUBS_ON_REG,
PFLAG_IGNORE_183NOSDP,
/* No new flags below this line */ /* No new flags below this line */
PFLAG_MAX PFLAG_MAX
} PFLAGS; } PFLAGS;
......
...@@ -2393,6 +2393,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile) ...@@ -2393,6 +2393,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
} else { } else {
sofia_clear_pflag(profile, PFLAG_T38_PASSTHRU); sofia_clear_pflag(profile, PFLAG_T38_PASSTHRU);
} }
} else if (!strcasecmp(var, "ignore-183nosdp")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_IGNORE_183NOSDP);
} else {
sofia_clear_pflag(profile, PFLAG_IGNORE_183NOSDP);
}
} else if (!strcasecmp(var, "cid-in-1xx")) { } else if (!strcasecmp(var, "cid-in-1xx")) {
if (switch_true(val)) { if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_CID_IN_1XX); sofia_set_pflag(profile, PFLAG_CID_IN_1XX);
...@@ -3050,6 +3056,12 @@ switch_status_t config_sofia(int reload, char *profile_name) ...@@ -3050,6 +3056,12 @@ switch_status_t config_sofia(int reload, char *profile_name)
} else { } else {
sofia_clear_pflag(profile, PFLAG_T38_PASSTHRU); sofia_clear_pflag(profile, PFLAG_T38_PASSTHRU);
} }
} else if (!strcasecmp(var, "ignore-183nosdp")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_IGNORE_183NOSDP);
} else {
sofia_clear_pflag(profile, PFLAG_IGNORE_183NOSDP);
}
} else if (!strcasecmp(var, "cid-in-1xx")) { } else if (!strcasecmp(var, "cid-in-1xx")) {
if (switch_true(val)) { if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_CID_IN_1XX); sofia_set_pflag(profile, PFLAG_CID_IN_1XX);
...@@ -4597,6 +4609,10 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, ...@@ -4597,6 +4609,10 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
} }
if (status == 183 && !r_sdp) { if (status == 183 && !r_sdp) {
if (switch_true(switch_channel_get_variable(channel, "sip_ignore_183nosdp")) || sofia_test_pflag(profile, PFLAG_IGNORE_183NOSDP)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s Ignoring 183 w/o sdp\n", switch_channel_get_name(channel));
goto done;
}
status = 180; status = 180;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论