mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-19 17:54:13 +00:00
minor presence tweaks
This commit is contained in:
1 parent
d5f47a87ce
commit
e6bfa118ec
3 files changed
+11
-5
No files matched your search
@@ -6957,7 +6957,7 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
|
||||
switch_uuid_t uuid;
|
||||
switch_codec_implementation_t read_impl = { 0 };
|
||||
switch_channel_t *channel = NULL;
|
||||
const char *force_rate = NULL, *force_interval = NULL;
|
||||
const char *force_rate = NULL, *force_interval = NULL, *presence_id = NULL;
|
||||
uint32_t force_rate_i = 0, force_interval_i = 0;
|
||||
|
||||
/* Validate the conference name */
|
||||
@@ -6972,6 +6972,8 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
|
||||
switch_core_session_get_read_impl(session, &read_impl);
|
||||
channel = switch_core_session_get_channel(session);
|
||||
|
||||
presence_id = switch_channel_get_variable(channel, "presence_id");
|
||||
|
||||
if ((force_rate = switch_channel_get_variable(channel, "conference_force_rate"))) {
|
||||
if (!strcasecmp(force_rate, "auto")) {
|
||||
force_rate_i = read_impl.actual_samples_per_second;
|
||||
@@ -7365,7 +7367,11 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
|
||||
|
||||
conference->name = switch_core_strdup(conference->pool, name);
|
||||
|
||||
if ((name_domain = strchr(conference->name, '@'))) {
|
||||
if (presence_id && (name_domain = strchr(presence_id, '@'))) {
|
||||
name_domain++;
|
||||
conference->domain = switch_core_strdup(conference->pool, name_domain);
|
||||
} else if ((name_domain = strchr(conference->name, '@'))) {
|
||||
name_domain++;
|
||||
conference->domain = switch_core_strdup(conference->pool, name_domain);
|
||||
} else if (domain) {
|
||||
conference->domain = switch_core_strdup(conference->pool, domain);
|
||||
|
||||
Reference in new issue
Block a user