提交 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 {
PFLAG_SHUTDOWN,
PFLAG_PRESENCE_MAP,
PFLAG_OPTIONS_RESPOND_503_ON_BUSY,
PFLAG_PRESENCE_DISABLE_EARLY,
/* No new flags below this line */
PFLAG_MAX
} PFLAGS;
......
......@@ -3035,6 +3035,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
} else {
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")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_IGNORE_183NOSDP);
......@@ -3809,6 +3815,12 @@ switch_status_t config_sofia(int reload, char *profile_name)
} else {
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")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_IGNORE_183NOSDP);
......
......@@ -2499,11 +2499,17 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
if (!strcasecmp(astate, "answered")) {
astate = "confirmed";
}
if (!strcasecmp(astate, "hangup")) {
astate = "terminated";
}
if (!sofia_test_pflag(profile, PFLAG_PRESENCE_DISABLE_EARLY)) {
if (!strcasecmp(astate, "ringing") || !strcasecmp(astate, "early")) {
astate = "confirmed";
}
}
if (is_dialog) {
if (!strcasecmp(astate, "ringing")) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论