FS-4106 --resolve

This commit is contained in:
Anthony Minessale 2012-04-13 11:18:09 -05:00
parent 11bf6f468d
commit 1145905513
3 changed files with 20 additions and 1 deletions

View File

@ -509,6 +509,12 @@ typedef enum {
PRES_TYPE_PASSIVE = 2
} sofia_presence_type_t;
typedef enum {
PRES_HELD_EARLY = 0,
PRES_HELD_CONFIRMED = 1,
PRES_HELD_TERMINATED = 2
} sofia_presence_held_calls_type_t;
typedef enum {
MEDIA_OPT_NONE = 0,
MEDIA_OPT_MEDIA_ON_HOLD = (1 << 0),
@ -623,6 +629,7 @@ struct sofia_profile {
int server_rport_level;
int client_rport_level;
sofia_presence_type_t pres_type;
sofia_presence_held_calls_type_t pres_held_type;
sofia_media_options_t media_options;
uint32_t force_subscription_expires;
uint32_t force_publish_expires;

View File

@ -4213,6 +4213,12 @@ 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-hold-state")) {
if (!strcasecmp(val, "confirmed")) {
profile->pres_held_type = PRES_HELD_CONFIRMED;
} else if (!strcasecmp(val, "terminated")) {
profile->pres_held_type = PRES_HELD_TERMINATED;
}
} else if (!strcasecmp(var, "presence-privacy")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_PRESENCE_PRIVACY);

View File

@ -2545,7 +2545,13 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
}
if (holding) {
astate = "early";
if (profile->pres_held_type == PRES_HELD_CONFIRMED) {
astate = "confirmed";
} else if (profile->pres_held_type == PRES_HELD_TERMINATED) {
astate = "terminated";
} else {
astate = "early";
}
}