提交 9b023152 authored 作者: Anthony Minessale's avatar Anthony Minessale

add presence-disable-early sofia option to send non-specifc presence messages…

add presence-disable-early sofia option to send non-specifc presence messages w/o special case for early
上级 8f05f098
...@@ -262,6 +262,7 @@ typedef enum { ...@@ -262,6 +262,7 @@ typedef enum {
PFLAG_SHUTDOWN, PFLAG_SHUTDOWN,
PFLAG_PRESENCE_MAP, PFLAG_PRESENCE_MAP,
PFLAG_OPTIONS_RESPOND_503_ON_BUSY, PFLAG_OPTIONS_RESPOND_503_ON_BUSY,
PFLAG_PRESENCE_DISABLE_EARLY,
/* No new flags below this line */ /* No new flags below this line */
PFLAG_MAX PFLAG_MAX
} PFLAGS; } PFLAGS;
......
...@@ -3035,6 +3035,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile) ...@@ -3035,6 +3035,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, "presence-disable-early")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_PRESENCE_DISABLE_EARLY);
} else {
sofia_clear_pflag(profile, PFLAG_PRESENCE_DISABLE_EARLY);
}
} else if (!strcasecmp(var, "ignore-183nosdp")) { } else if (!strcasecmp(var, "ignore-183nosdp")) {
if (switch_true(val)) { if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_IGNORE_183NOSDP); sofia_set_pflag(profile, PFLAG_IGNORE_183NOSDP);
...@@ -3809,6 +3815,12 @@ switch_status_t config_sofia(int reload, char *profile_name) ...@@ -3809,6 +3815,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, "presence-disable-early")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_PRESENCE_DISABLE_EARLY);
} else {
sofia_clear_pflag(profile, PFLAG_PRESENCE_DISABLE_EARLY);
}
} else if (!strcasecmp(var, "ignore-183nosdp")) { } else if (!strcasecmp(var, "ignore-183nosdp")) {
if (switch_true(val)) { if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_IGNORE_183NOSDP); sofia_set_pflag(profile, PFLAG_IGNORE_183NOSDP);
......
...@@ -2504,6 +2504,12 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * ...@@ -2504,6 +2504,12 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
astate = "terminated"; astate = "terminated";
} }
if (!sofia_test_pflag(profile, PFLAG_PRESENCE_DISABLE_EARLY)) {
if (!strcasecmp(astate, "ringing") || !strcasecmp(astate, "early")) {
astate = "confirmed";
}
}
if (is_dialog) { if (is_dialog) {
if (!strcasecmp(astate, "ringing")) { if (!strcasecmp(astate, "ringing")) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论