set conference flags from a dial plan variable or via +flags{ }
This patch allows conference flags to be set dynamically from the dial plan by either passing them to the conference application in the +flags{ } string or by setting the "conference_flags" dial plan variable. The +flags{ } string is currently used to set *user* flags only. This patch changes this by allowing the +flags{ } string to contain conference related flags as well (for example wait_mod). It shouldn't be a problem to pass both types of flags via +flags{ } as long as the user and conference flag names are kept unique. FS-5099 #resolve
This commit is contained in:
parent
310f18982f
commit
3695bdd9e4
|
@ -9066,6 +9066,7 @@ SWITCH_STANDARD_APP(conference_function)
|
||||||
char *profile_name = NULL;
|
char *profile_name = NULL;
|
||||||
switch_xml_t cxml = NULL, cfg = NULL, profiles = NULL;
|
switch_xml_t cxml = NULL, cfg = NULL, profiles = NULL;
|
||||||
const char *flags_str, *v_flags_str;
|
const char *flags_str, *v_flags_str;
|
||||||
|
const char *cflags_str, *v_cflags_str;
|
||||||
member_flag_t mflags = 0;
|
member_flag_t mflags = 0;
|
||||||
switch_core_session_message_t msg = { 0 };
|
switch_core_session_message_t msg = { 0 };
|
||||||
uint8_t rl = 0, isbr = 0;
|
uint8_t rl = 0, isbr = 0;
|
||||||
|
@ -9129,6 +9130,16 @@ SWITCH_STANDARD_APP(conference_function)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cflags_str = flags_str;
|
||||||
|
|
||||||
|
if ((v_cflags_str = switch_channel_get_variable(channel, "conference_flags"))) {
|
||||||
|
if (zstr(cflags_str)) {
|
||||||
|
cflags_str = v_cflags_str;
|
||||||
|
} else {
|
||||||
|
cflags_str = switch_core_session_sprintf(session, "%s|%s", cflags_str, v_cflags_str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* is this a bridging conference ? */
|
/* is this a bridging conference ? */
|
||||||
if (!strncasecmp(mydata, bridge_prefix, strlen(bridge_prefix))) {
|
if (!strncasecmp(mydata, bridge_prefix, strlen(bridge_prefix))) {
|
||||||
isbr = 1;
|
isbr = 1;
|
||||||
|
@ -9219,6 +9230,8 @@ SWITCH_STANDARD_APP(conference_function)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_cflags(cflags_str, &conference->flags);
|
||||||
|
|
||||||
if (locked) {
|
if (locked) {
|
||||||
switch_mutex_unlock(globals.setup_mutex);
|
switch_mutex_unlock(globals.setup_mutex);
|
||||||
locked = 0;
|
locked = 0;
|
||||||
|
@ -9294,6 +9307,8 @@ SWITCH_STANDARD_APP(conference_function)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_cflags(cflags_str, &conference->flags);
|
||||||
|
|
||||||
if (locked) {
|
if (locked) {
|
||||||
switch_mutex_unlock(globals.setup_mutex);
|
switch_mutex_unlock(globals.setup_mutex);
|
||||||
locked = 0;
|
locked = 0;
|
||||||
|
|
Loading…
Reference in New Issue