diff --git a/conf/sip_profiles/internal.xml b/conf/sip_profiles/internal.xml
index 7f688b2472..c9855c4bfe 100644
--- a/conf/sip_profiles/internal.xml
+++ b/conf/sip_profiles/internal.xml
@@ -157,6 +157,7 @@
+
diff --git a/conf/vars.xml b/conf/vars.xml
index f24cc5ccee..4f13a61fbb 100644
--- a/conf/vars.xml
+++ b/conf/vars.xml
@@ -199,6 +199,10 @@
+
+
+
diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.h b/src/mod/endpoints/mod_sofia/mod_sofia.h
index b289ffb703..2648598b72 100644
--- a/src/mod/endpoints/mod_sofia/mod_sofia.h
+++ b/src/mod/endpoints/mod_sofia/mod_sofia.h
@@ -233,6 +233,7 @@ typedef enum {
PFLAG_AUTO_NAT,
PFLAG_SIPCOMPACT,
PFLAG_SQL_IN_TRANS,
+ PFLAG_PRESENCE_PRIVACY,
PFLAG_PASS_CALLEE_ID,
PFLAG_LOG_AUTH_FAIL,
PFLAG_FORWARD_MWI_NOTIFY,
@@ -549,6 +550,7 @@ struct sofia_profile {
char *record_template;
char *record_path;
char *presence_hosts;
+ char *presence_privacy;
char *challenge_realm;
char *rtcp_audio_interval_msec;
char *rtcp_video_interval_msec;
diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c
index f934c4eea4..70cb12684e 100644
--- a/src/mod/endpoints/mod_sofia/sofia.c
+++ b/src/mod/endpoints/mod_sofia/sofia.c
@@ -3162,6 +3162,8 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
profile->user_agent_filter = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "max-registrations-per-extension")) {
profile->max_registrations_perext = atoi(val);
+ } else if (!strcasecmp(var,"presence-privacy")) {
+ profile->presence_privacy = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "rfc2833-pt")) {
profile->te = (switch_payload_t) atoi(val);
} else if (!strcasecmp(var, "cng-pt") && !(sofia_test_pflag(profile, PFLAG_SUPPRESS_CNG))) {
@@ -4064,6 +4066,10 @@ switch_status_t config_sofia(int reload, char *profile_name)
} else if (switch_true(val)) {
profile->pres_type = PRES_TYPE_FULL;
}
+ } else if (!strcasecmp(var, "presence-privacy")) {
+ if (switch_true(val)) {
+ sofia_set_pflag(profile, PFLAG_PRESENCE_PRIVACY);
+ }
} else if (!strcasecmp(var, "manage-shared-appearance")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_MANAGE_SHARED_APPEARANCE);
diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c
index 1f4a33ed8a..b165d62e17 100644
--- a/src/mod/endpoints/mod_sofia/sofia_presence.c
+++ b/src/mod/endpoints/mod_sofia/sofia_presence.c
@@ -2262,9 +2262,13 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
} else if (!strcmp(astate, "confirmed")) {
if (!zstr(op)) {
- //switch_snprintf(status_line, sizeof(status_line), "On The Phone");
- //} else {
- switch_snprintf(status_line, sizeof(status_line), "Talk %s", op);
+ if (sofia_test_pflag(profile, PFLAG_PRESENCE_PRIVACY)) {
+ switch_snprintf(status_line, sizeof(status_line), "On The Phone");
+ } else {
+ switch_snprintf(status_line, sizeof(status_line), "Talk %s", op);
+ }
+ } else {
+ switch_snprintf(status_line, sizeof(status_line), "On The Phone");
}
rpid = "on-the-phone";