mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-18 01:28:42 +00:00
FS-4106 --resolve
This commit is contained in:
parent
11bf6f468d
commit
1145905513
@ -509,6 +509,12 @@ typedef enum {
|
|||||||
PRES_TYPE_PASSIVE = 2
|
PRES_TYPE_PASSIVE = 2
|
||||||
} sofia_presence_type_t;
|
} 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 {
|
typedef enum {
|
||||||
MEDIA_OPT_NONE = 0,
|
MEDIA_OPT_NONE = 0,
|
||||||
MEDIA_OPT_MEDIA_ON_HOLD = (1 << 0),
|
MEDIA_OPT_MEDIA_ON_HOLD = (1 << 0),
|
||||||
@ -623,6 +629,7 @@ struct sofia_profile {
|
|||||||
int server_rport_level;
|
int server_rport_level;
|
||||||
int client_rport_level;
|
int client_rport_level;
|
||||||
sofia_presence_type_t pres_type;
|
sofia_presence_type_t pres_type;
|
||||||
|
sofia_presence_held_calls_type_t pres_held_type;
|
||||||
sofia_media_options_t media_options;
|
sofia_media_options_t media_options;
|
||||||
uint32_t force_subscription_expires;
|
uint32_t force_subscription_expires;
|
||||||
uint32_t force_publish_expires;
|
uint32_t force_publish_expires;
|
||||||
|
@ -4213,6 +4213,12 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
|||||||
} else if (switch_true(val)) {
|
} else if (switch_true(val)) {
|
||||||
profile->pres_type = PRES_TYPE_FULL;
|
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")) {
|
} else if (!strcasecmp(var, "presence-privacy")) {
|
||||||
if (switch_true(val)) {
|
if (switch_true(val)) {
|
||||||
sofia_set_pflag(profile, PFLAG_PRESENCE_PRIVACY);
|
sofia_set_pflag(profile, PFLAG_PRESENCE_PRIVACY);
|
||||||
|
@ -2545,8 +2545,14 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (holding) {
|
if (holding) {
|
||||||
|
if (profile->pres_held_type == PRES_HELD_CONFIRMED) {
|
||||||
|
astate = "confirmed";
|
||||||
|
} else if (profile->pres_held_type == PRES_HELD_TERMINATED) {
|
||||||
|
astate = "terminated";
|
||||||
|
} else {
|
||||||
astate = "early";
|
astate = "early";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!strcasecmp(astate, "hangup")) {
|
if (!strcasecmp(astate, "hangup")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user