FS-849 --resolve

This commit is contained in:
Marc Olivier Chouinard 2011-12-15 13:20:27 -05:00
parent acdacfc6c0
commit c6633fa300
5 changed files with 20 additions and 3 deletions

View File

@ -157,6 +157,7 @@
<!-- Name of the db to use for this profile -->
<!--<param name="dbname" value="share_presence"/>-->
<param name="presence-hosts" value="$${domain},$${local_ip_v4}"/>
<param name="presence-privacy" value="$${presence_privacy}"/>
<!-- ************************************************* -->
<!-- This setting is for AAL2 bitpacking on G726 -->

View File

@ -199,6 +199,10 @@
<X-PRE-PROCESS cmd="set" data="default_areacode=918"/>
<X-PRE-PROCESS cmd="set" data="default_country=US"/>
<!-- if false or undefined, the destination number is included in presence NOTIFY dm:note.
if true, the destination number is not included -->
<X-PRE-PROCESS cmd="set" data="presence_privacy=false"/>
<X-PRE-PROCESS cmd="set" data="be-ring=%(1000,3000,425)"/>
<X-PRE-PROCESS cmd="set" data="ca-ring=%(2000,4000,440,480)"/>
<X-PRE-PROCESS cmd="set" data="cn-ring=%(1000,4000,450)"/>

View File

@ -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;

View File

@ -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);

View File

@ -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";