FS-7845 File rename to remove mod_* prefix to local module C files. Change

function name prefixes from shorthand 'conf' to longer form
'conference'. Also fixes the channel variable names which had been
caught in an over zealous perl -pi -e command...
This commit is contained in:
William King 2015-07-16 16:58:39 -07:00
parent 14aa720512
commit d8194e9edb
13 changed files with 1672 additions and 1672 deletions

View File

@ -2,8 +2,8 @@ include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_conference
mod_LTLIBRARIES = mod_conference.la
mod_conference_la_SOURCES = mod_conference.c mod_conference_api.c mod_conference_loop.c mod_conference_al.c mod_conference_cdr.c mod_conference_video.c
mod_conference_la_SOURCES += mod_conference_event.c mod_conference_member.c mod_conference_utils.c mod_conference_file.c mod_conference_record.c
mod_conference_la_SOURCES = mod_conference.c conference_api.c conference_loop.c conference_al.c conference_cdr.c conference_video.c
mod_conference_la_SOURCES += conference_event.c conference_member.c conference_utils.c conference_file.c conference_record.c
mod_conference_la_CFLAGS = $(AM_CFLAGS) -I.
mod_conference_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_conference_la_LDFLAGS = -avoid-version -module -no-undefined -shared

View File

@ -43,7 +43,7 @@
al_handle_t *conf_al_create(switch_memory_pool_t *pool)
al_handle_t *conference_al_create(switch_memory_pool_t *pool)
{
al_handle_t *al;
@ -54,22 +54,22 @@ al_handle_t *conf_al_create(switch_memory_pool_t *pool)
}
#ifndef OPENAL_POSITIONING
void conf_al_gen_arc(conference_obj_t *conference, switch_stream_handle_t *stream)
void conference_al_gen_arc(conference_obj_t *conference, switch_stream_handle_t *stream)
{
}
void conf_al_process(al_handle_t *al, void *data, switch_size_t datalen, int rate)
void conference_al_process(al_handle_t *al, void *data, switch_size_t datalen, int rate)
{
}
#else
void conf_al_gen_arc(conference_obj_t *conference, switch_stream_handle_t *stream)
void conference_al_gen_arc(conference_obj_t *conference, switch_stream_handle_t *stream)
{
float offset;
float pos;
float radius;
float x, z;
float div = 3.14159f / 180;
conf_member_t *member;
conference_member_t *member;
uint32_t count = 0;
if (!conference->count) {
@ -78,14 +78,14 @@ void conf_al_gen_arc(conference_obj_t *conference, switch_stream_handle_t *strea
switch_mutex_lock(conference->member_mutex);
for (member = conference->members; member; member = member->next) {
if (member->channel && conf_utils_member_test_flag(member, MFLAG_CAN_SPEAK) && !conf_utils_member_test_flag(member, MFLAG_NO_POSITIONAL)) {
if (member->channel && conference_utils_member_test_flag(member, MFLAG_CAN_SPEAK) && !conference_utils_member_test_flag(member, MFLAG_NO_POSITIONAL)) {
count++;
}
}
if (count < 3) {
for (member = conference->members; member; member = member->next) {
if (member->channel && !conf_utils_member_test_flag(member, MFLAG_NO_POSITIONAL) && member->al) {
if (member->channel && !conference_utils_member_test_flag(member, MFLAG_NO_POSITIONAL) && member->al) {
member->al->pos_x = 0;
member->al->pos_y = 0;
@ -112,14 +112,14 @@ void conf_al_gen_arc(conference_obj_t *conference, switch_stream_handle_t *strea
for (member = conference->members; member; member = member->next) {
if (!member->channel || conf_utils_member_test_flag(member, MFLAG_NO_POSITIONAL) || !conf_utils_member_test_flag(member, MFLAG_CAN_SPEAK)) {
if (!member->channel || conference_utils_member_test_flag(member, MFLAG_NO_POSITIONAL) || !conference_utils_member_test_flag(member, MFLAG_CAN_SPEAK)) {
continue;
}
if (!member->al) {
member->al = conf_al_create(member->pool);
member->al = conference_al_create(member->pool);
}
conf_utils_member_set_flag(member, MFLAG_POSITIONAL);
conference_utils_member_set_flag(member, MFLAG_POSITIONAL);
if (pos == 0) {
x = 0;
@ -163,7 +163,7 @@ void conf_al_gen_arc(conference_obj_t *conference, switch_stream_handle_t *strea
void conf_al_process(al_handle_t *al, void *data, switch_size_t datalen, int rate)
void conference_al_process(al_handle_t *al, void *data, switch_size_t datalen, int rate)
{
if (rate != 48000) {
@ -180,7 +180,7 @@ void conf_al_process(al_handle_t *al, void *data, switch_size_t datalen, int rat
0
};
switch_mutex_lock(conf_globals.setup_mutex);
switch_mutex_lock(conference_globals.setup_mutex);
if ((al->device = alcLoopbackOpenDeviceSOFT(NULL))) {
const ALshort silence[16] = { 0 };
float orient[6] = { /*fwd:*/ 0., 0., -1., /*up:*/ 0., 1., 0. };
@ -205,7 +205,7 @@ void conf_al_process(al_handle_t *al, void *data, switch_size_t datalen, int rat
alSourceQueueBuffers(al->source, 2, al->buffer_in);
alSourcePlay(al->source);
}
switch_mutex_unlock(conf_globals.setup_mutex);
switch_mutex_unlock(conference_globals.setup_mutex);
}
if (al->device) {
@ -238,13 +238,13 @@ void conf_al_process(al_handle_t *al, void *data, switch_size_t datalen, int rat
#endif
#ifndef OPENAL_POSITIONING
switch_status_t conf_al_parse_position(al_handle_t *al, const char *data)
switch_status_t conference_al_parse_position(al_handle_t *al, const char *data)
{
return SWITCH_STATUS_FALSE;
}
#else
switch_status_t conf_al_parse_position(al_handle_t *al, const char *data)
switch_status_t conference_al_parse_position(al_handle_t *al, const char *data)
{
char *args[3];
int num;
@ -270,11 +270,11 @@ switch_status_t conf_al_parse_position(al_handle_t *al, const char *data)
#endif
#ifdef OPENAL_POSITIONING
void conf_al_close(al_handle_t *al)
void conference_al_close(al_handle_t *al)
{
if (!al) return;
switch_mutex_lock(conf_globals.setup_mutex);
switch_mutex_lock(conference_globals.setup_mutex);
if (al->source) {
alDeleteSources(1, &al->source);
al->source = 0;
@ -295,7 +295,7 @@ void conf_al_close(al_handle_t *al)
alcCloseDevice(al->device);
al->device = NULL;
}
switch_mutex_unlock(conf_globals.setup_mutex);
switch_mutex_unlock(conference_globals.setup_mutex);
}
#endif

View File

@ -42,28 +42,28 @@
#include <mod_conference.h>
inline switch_bool_t conf_cdr_test_mflag(conf_cdr_node_t *np, member_flag_t mflag)
inline switch_bool_t conference_cdr_test_mflag(conference_cdr_node_t *np, member_flag_t mflag)
{
return !!np->mflags[mflag];
}
const char *conf_cdr_audio_flow(conf_member_t *member)
const char *conference_cdr_audio_flow(conference_member_t *member)
{
const char *flow = "sendrecv";
if (!conf_utils_member_test_flag(member, MFLAG_CAN_SPEAK)) {
if (!conference_utils_member_test_flag(member, MFLAG_CAN_SPEAK)) {
flow = "recvonly";
}
if (member->channel && switch_channel_test_flag(member->channel, CF_HOLD)) {
flow = conf_utils_member_test_flag(member, MFLAG_CAN_SPEAK) ? "sendonly" : "inactive";
flow = conference_utils_member_test_flag(member, MFLAG_CAN_SPEAK) ? "sendonly" : "inactive";
}
return flow;
}
char *conf_cdr_rfc4579_render(conference_obj_t *conference, switch_event_t *event, switch_event_t *revent)
char *conference_cdr_rfc4579_render(conference_obj_t *conference, switch_event_t *event, switch_event_t *revent)
{
switch_xml_t xml, x_tag, x_tag1, x_tag2, x_tag3, x_tag4;
char tmp[30];
@ -71,7 +71,7 @@ char *conf_cdr_rfc4579_render(conference_obj_t *conference, switch_event_t *even
char *dup_domain = NULL;
char *uri;
int off = 0, off1 = 0, off2 = 0, off3 = 0, off4 = 0;
conf_cdr_node_t *np;
conference_cdr_node_t *np;
char *tmpp = tmp;
char *xml_text = NULL;
@ -250,7 +250,7 @@ char *conf_cdr_rfc4579_render(conference_obj_t *conference, switch_event_t *even
const char *var;
//char buf[1024];
//switch_snprintf(buf, sizeof(buf), "conf_%s_%s_%s", conference->name, conference->domain, np->cp->caller_id_number);
//switch_snprintf(buf, sizeof(buf), "conference_%s_%s_%s", conference->name, conference->domain, np->cp->caller_id_number);
//switch_channel_set_variable(channel, "conference_call_key", buf);
if (!(x_tag3 = switch_xml_add_child_d(x_tag2, "media", off3++))) {
@ -276,7 +276,7 @@ char *conf_cdr_rfc4579_render(conference_obj_t *conference, switch_event_t *even
if (!(x_tag4 = switch_xml_add_child_d(x_tag3, "status", off4++))) {
abort();
}
switch_xml_set_txt_d(x_tag4, conf_cdr_audio_flow(np->member));
switch_xml_set_txt_d(x_tag4, conference_cdr_audio_flow(np->member));
if (switch_channel_test_flag(channel, CF_VIDEO)) {
@ -327,13 +327,13 @@ char *conf_cdr_rfc4579_render(conference_obj_t *conference, switch_event_t *even
}
cJSON *conf_cdr_json_render(conference_obj_t *conference, cJSON *req)
cJSON *conference_cdr_json_render(conference_obj_t *conference, cJSON *req)
{
char tmp[30];
const char *domain; const char *name;
char *dup_domain = NULL;
char *uri;
conf_cdr_node_t *np;
conference_cdr_node_t *np;
char *tmpp = tmp;
cJSON *json = cJSON_CreateObject(), *jusers = NULL, *jold_users = NULL, *juser = NULL, *jvars = NULL;
@ -437,7 +437,7 @@ cJSON *conf_cdr_json_render(conference_obj_t *conference, cJSON *req)
switch_channel_get_variables(channel, &var_event);
if ((prefix = switch_event_get_header(var_event, "json_conf_var_prefix"))) {
if ((prefix = switch_event_get_header(var_event, "json_conference_var_prefix"))) {
all = strcasecmp(prefix, "__all__");
} else {
prefix = "json_";
@ -457,7 +457,7 @@ cJSON *conf_cdr_json_render(conference_obj_t *conference, cJSON *req)
json_add_child_string(juser, "rtpAudioSSRC", var);
}
json_add_child_string(juser, "rtpAudioDirection", conf_cdr_audio_flow(np->member));
json_add_child_string(juser, "rtpAudioDirection", conference_cdr_audio_flow(np->member));
if (switch_channel_test_flag(channel, CF_VIDEO)) {
@ -486,7 +486,7 @@ cJSON *conf_cdr_json_render(conference_obj_t *conference, cJSON *req)
return json;
}
void conf_cdr_del(conf_member_t *member)
void conference_cdr_del(conference_member_t *member)
{
if (member->channel) {
switch_channel_get_variables(member->channel, &member->cdr_node->var_event);
@ -498,9 +498,9 @@ void conf_cdr_del(conf_member_t *member)
}
}
void conf_cdr_add(conf_member_t *member)
void conference_cdr_add(conference_member_t *member)
{
conf_cdr_node_t *np;
conference_cdr_node_t *np;
switch_caller_profile_t *cp;
switch_channel_t *channel;
@ -530,9 +530,9 @@ void conf_cdr_add(conf_member_t *member)
}
void conf_cdr_rejected(conference_obj_t *conference, switch_channel_t *channel, cdr_reject_reason_t reason)
void conference_cdr_rejected(conference_obj_t *conference, switch_channel_t *channel, cdr_reject_reason_t reason)
{
conf_cdr_reject_t *rp;
conference_cdr_reject_t *rp;
switch_caller_profile_t *cp;
rp = switch_core_alloc(conference->pool, sizeof(*rp));
@ -549,12 +549,12 @@ void conf_cdr_rejected(conference_obj_t *conference, switch_channel_t *channel,
rp->cp = switch_caller_profile_dup(conference->pool, cp);
}
void conf_cdr_render(conference_obj_t *conference)
void conference_cdr_render(conference_obj_t *conference)
{
switch_xml_t cdr, x_ptr, x_member, x_members, x_conference, x_cp, x_flags, x_tag, x_rejected, x_attempt;
conf_cdr_node_t *np;
conf_cdr_reject_t *rp;
int cdr_off = 0, conf_off = 0;
conference_cdr_node_t *np;
conference_cdr_reject_t *rp;
int cdr_off = 0, conference_off = 0;
char str[512];
char *path = NULL, *xml_text;
int fd;
@ -571,30 +571,30 @@ void conf_cdr_render(conference_obj_t *conference)
abort();
}
if (!(x_ptr = switch_xml_add_child_d(x_conference, "name", conf_off++))) {
if (!(x_ptr = switch_xml_add_child_d(x_conference, "name", conference_off++))) {
abort();
}
switch_xml_set_txt_d(x_ptr, conference->name);
if (!(x_ptr = switch_xml_add_child_d(x_conference, "hostname", conf_off++))) {
if (!(x_ptr = switch_xml_add_child_d(x_conference, "hostname", conference_off++))) {
abort();
}
switch_xml_set_txt_d(x_ptr, switch_core_get_hostname());
if (!(x_ptr = switch_xml_add_child_d(x_conference, "rate", conf_off++))) {
if (!(x_ptr = switch_xml_add_child_d(x_conference, "rate", conference_off++))) {
abort();
}
switch_snprintf(str, sizeof(str), "%d", conference->rate);
switch_xml_set_txt_d(x_ptr, str);
if (!(x_ptr = switch_xml_add_child_d(x_conference, "interval", conf_off++))) {
if (!(x_ptr = switch_xml_add_child_d(x_conference, "interval", conference_off++))) {
abort();
}
switch_snprintf(str, sizeof(str), "%d", conference->interval);
switch_xml_set_txt_d(x_ptr, str);
if (!(x_ptr = switch_xml_add_child_d(x_conference, "start_time", conf_off++))) {
if (!(x_ptr = switch_xml_add_child_d(x_conference, "start_time", conference_off++))) {
abort();
}
switch_xml_set_attr_d(x_ptr, "type", "UNIX-epoch");
@ -602,17 +602,17 @@ void conf_cdr_render(conference_obj_t *conference)
switch_xml_set_txt_d(x_ptr, str);
if (!(x_ptr = switch_xml_add_child_d(x_conference, "end_time", conf_off++))) {
if (!(x_ptr = switch_xml_add_child_d(x_conference, "end_time", conference_off++))) {
abort();
}
switch_xml_set_attr_d(x_ptr, "endconf_forced", conf_utils_test_flag(conference, CFLAG_ENDCONF_FORCED) ? "true" : "false");
switch_xml_set_attr_d(x_ptr, "endconference_forced", conference_utils_test_flag(conference, CFLAG_ENDCONF_FORCED) ? "true" : "false");
switch_xml_set_attr_d(x_ptr, "type", "UNIX-epoch");
switch_snprintf(str, sizeof(str), "%ld", (long)conference->end_time);
switch_xml_set_txt_d(x_ptr, str);
if (!(x_members = switch_xml_add_child_d(x_conference, "members", conf_off++))) {
if (!(x_members = switch_xml_add_child_d(x_conference, "members", conference_off++))) {
abort();
}
@ -621,7 +621,7 @@ void conf_cdr_render(conference_obj_t *conference)
int flag_off = 0;
if (!(x_member = switch_xml_add_child_d(x_members, "member", conf_off++))) {
if (!(x_member = switch_xml_add_child_d(x_members, "member", conference_off++))) {
abort();
}
@ -647,16 +647,16 @@ void conf_cdr_render(conference_obj_t *conference)
switch_assert(x_flags);
x_tag = switch_xml_add_child_d(x_flags, "is_moderator", flag_off++);
switch_xml_set_txt_d(x_tag, conf_cdr_test_mflag(np, MFLAG_MOD) ? "true" : "false");
switch_xml_set_txt_d(x_tag, conference_cdr_test_mflag(np, MFLAG_MOD) ? "true" : "false");
x_tag = switch_xml_add_child_d(x_flags, "end_conference", flag_off++);
switch_xml_set_txt_d(x_tag, conf_cdr_test_mflag(np, MFLAG_ENDCONF) ? "true" : "false");
switch_xml_set_txt_d(x_tag, conference_cdr_test_mflag(np, MFLAG_ENDCONF) ? "true" : "false");
x_tag = switch_xml_add_child_d(x_flags, "was_kicked", flag_off++);
switch_xml_set_txt_d(x_tag, conf_cdr_test_mflag(np, MFLAG_KICKED) ? "true" : "false");
switch_xml_set_txt_d(x_tag, conference_cdr_test_mflag(np, MFLAG_KICKED) ? "true" : "false");
x_tag = switch_xml_add_child_d(x_flags, "is_ghost", flag_off++);
switch_xml_set_txt_d(x_tag, conf_cdr_test_mflag(np, MFLAG_GHOST) ? "true" : "false");
switch_xml_set_txt_d(x_tag, conference_cdr_test_mflag(np, MFLAG_GHOST) ? "true" : "false");
if (!(x_cp = switch_xml_add_child_d(x_member, "caller_profile", member_off++))) {
abort();
@ -674,7 +674,7 @@ void conf_cdr_render(conference_obj_t *conference)
}
if (!(x_rejected = switch_xml_add_child_d(x_conference, "rejected", conf_off++))) {
if (!(x_rejected = switch_xml_add_child_d(x_conference, "rejected", conference_off++))) {
abort();
}

View File

@ -42,13 +42,13 @@
#include <mod_conference.h>
void conf_event_mod_channel_handler(const char *event_channel, cJSON *json, const char *key, switch_event_channel_id_t id)
void conference_event_mod_channel_handler(const char *event_channel, cJSON *json, const char *key, switch_event_channel_id_t id)
{
cJSON *data, *addobj = NULL;
const char *action = NULL;
char *value = NULL;
cJSON *jid = 0;
char *conf_name = strdup(event_channel + 15);
char *conference_name = strdup(event_channel + 15);
int cid = 0;
char *p;
switch_stream_handle_t stream = { 0 };
@ -57,7 +57,7 @@ void conf_event_mod_channel_handler(const char *event_channel, cJSON *json, cons
char *argv[10] = {0};
int argc = 0;
if (conf_name && (p = strchr(conf_name, '@'))) {
if (conference_name && (p = strchr(conference_name, '@'))) {
*p = '\0';
}
@ -87,7 +87,7 @@ void conf_event_mod_channel_handler(const char *event_channel, cJSON *json, cons
}
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "conf %s CMD %s [%s] %d\n", conf_name, key, action, cid);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "conf %s CMD %s [%s] %d\n", conference_name, key, action, cid);
if (zstr(action)) {
goto end;
@ -103,7 +103,7 @@ void conf_event_mod_channel_handler(const char *event_channel, cJSON *json, cons
!strcasecmp(action, "unvmute") ||
!strcasecmp(action, "tvmute")
) {
exec = switch_mprintf("%s %s %d", conf_name, action, cid);
exec = switch_mprintf("%s %s %d", conference_name, action, cid);
} else if (!strcasecmp(action, "volume_in") ||
!strcasecmp(action, "volume_out") ||
!strcasecmp(action, "vid-res-id") ||
@ -112,26 +112,26 @@ void conf_event_mod_channel_handler(const char *event_channel, cJSON *json, cons
!strcasecmp(action, "vid-canvas") ||
!strcasecmp(action, "vid-watching-canvas") ||
!strcasecmp(action, "vid-banner")) {
exec = switch_mprintf("%s %s %d %s", conf_name, action, cid, argv[0]);
exec = switch_mprintf("%s %s %d %s", conference_name, action, cid, argv[0]);
} else if (!strcasecmp(action, "play") || !strcasecmp(action, "stop")) {
exec = switch_mprintf("%s %s %s", conf_name, action, argv[0]);
exec = switch_mprintf("%s %s %s", conference_name, action, argv[0]);
} else if (!strcasecmp(action, "recording") || !strcasecmp(action, "vid-layout") || !strcasecmp(action, "vid-write-png")) {
if (!argv[1]) {
argv[1] = "all";
}
exec = switch_mprintf("%s %s %s %s", conf_name, action, argv[0], argv[1]);
exec = switch_mprintf("%s %s %s %s", conference_name, action, argv[0], argv[1]);
} else if (!strcasecmp(action, "transfer") && cid) {
conf_member_t *member;
conference_member_t *member;
conference_obj_t *conference;
exec = switch_mprintf("%s %s %s", argv[0], switch_str_nil(argv[1]), switch_str_nil(argv[2]));
stream.write_function(&stream, "+OK Call transferred to %s", argv[0]);
if ((conference = conf_find(conf_name, NULL))) {
if ((member = conf_member_get(conference, cid))) {
if ((conference = conference_find(conference_name, NULL))) {
if ((member = conference_member_get(conference, cid))) {
switch_ivr_session_transfer(member->session, argv[0], argv[1], argv[2]);
switch_thread_rwlock_unlock(member->rwlock);
}
@ -144,8 +144,8 @@ void conf_event_mod_channel_handler(const char *event_channel, cJSON *json, cons
const void *vvar;
cJSON *array = cJSON_CreateArray();
conference_obj_t *conference = NULL;
if ((conference = conf_find(conf_name, NULL))) {
switch_mutex_lock(conf_globals.setup_mutex);
if ((conference = conference_find(conference_name, NULL))) {
switch_mutex_lock(conference_globals.setup_mutex);
if (conference->layout_hash) {
for (hi = switch_core_hash_first(conference->layout_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &vvar, NULL, &val);
@ -163,14 +163,14 @@ void conf_event_mod_channel_handler(const char *event_channel, cJSON *json, cons
}
}
switch_mutex_unlock(conf_globals.setup_mutex);
switch_mutex_unlock(conference_globals.setup_mutex);
switch_thread_rwlock_unlock(conference->rwlock);
}
addobj = array;
}
if (exec) {
conf_api_main_real(exec, NULL, &stream);
conference_api_main_real(exec, NULL, &stream);
}
end:
@ -193,26 +193,26 @@ void conf_event_mod_channel_handler(const char *event_channel, cJSON *json, cons
cJSON_AddItemToObject(jdata, "error", cJSON_CreateString("Invalid Command"));
}
switch_event_channel_broadcast(event_channel, &msg, __FILE__, conf_globals.event_channel_id);
switch_event_channel_broadcast(event_channel, &msg, __FILE__, conference_globals.event_channel_id);
switch_safe_free(stream.data);
switch_safe_free(exec);
switch_safe_free(conf_name);
switch_safe_free(conference_name);
}
void conf_event_la_channel_handler(const char *event_channel, cJSON *json, const char *key, switch_event_channel_id_t id)
void conference_event_la_channel_handler(const char *event_channel, cJSON *json, const char *key, switch_event_channel_id_t id)
{
switch_live_array_parse_json(json, conf_globals.event_channel_id);
switch_live_array_parse_json(json, conference_globals.event_channel_id);
}
void conf_event_channel_handler(const char *event_channel, cJSON *json, const char *key, switch_event_channel_id_t id)
void conference_event_channel_handler(const char *event_channel, cJSON *json, const char *key, switch_event_channel_id_t id)
{
char *domain = NULL, *name = NULL;
conference_obj_t *conference = NULL;
cJSON *data, *reply = NULL, *conf_desc = NULL;
cJSON *data, *reply = NULL, *conference_desc = NULL;
const char *action = NULL;
char *dup = NULL;
@ -236,40 +236,40 @@ void conf_event_channel_handler(const char *event_channel, cJSON *json, const ch
}
if (!strcasecmp(action, "bootstrap")) {
if (!zstr(name) && (conference = conf_find(name, domain))) {
conf_desc = conf_cdr_json_render(conference, json);
if (!zstr(name) && (conference = conference_find(name, domain))) {
conference_desc = conference_cdr_json_render(conference, json);
} else {
conf_desc = cJSON_CreateObject();
json_add_child_string(conf_desc, "conferenceDescription", "FreeSWITCH Conference");
json_add_child_string(conf_desc, "conferenceState", "inactive");
json_add_child_array(conf_desc, "users");
json_add_child_array(conf_desc, "oldUsers");
conference_desc = cJSON_CreateObject();
json_add_child_string(conference_desc, "conferenceDescription", "FreeSWITCH Conference");
json_add_child_string(conference_desc, "conferenceState", "inactive");
json_add_child_array(conference_desc, "users");
json_add_child_array(conference_desc, "oldUsers");
}
} else {
conf_desc = cJSON_CreateObject();
json_add_child_string(conf_desc, "error", "Invalid action");
conference_desc = cJSON_CreateObject();
json_add_child_string(conference_desc, "error", "Invalid action");
}
json_add_child_string(conf_desc, "action", "conferenceDescription");
json_add_child_string(conference_desc, "action", "conferenceDescription");
cJSON_AddItemToObject(reply, "data", conf_desc);
cJSON_AddItemToObject(reply, "data", conference_desc);
switch_safe_free(dup);
switch_event_channel_broadcast(event_channel, &reply, "mod_conference", conf_globals.event_channel_id);
switch_event_channel_broadcast(event_channel, &reply, "mod_conference", conference_globals.event_channel_id);
}
void conf_event_send_json(conference_obj_t *conference)
void conference_event_send_json(conference_obj_t *conference)
{
cJSON *event, *conf_desc = NULL;
cJSON *event, *conference_desc = NULL;
char *name = NULL, *domain = NULL, *dup_domain = NULL;
char *event_channel = NULL;
if (!conf_utils_test_flag(conference, CFLAG_JSON_EVENTS)) {
if (!conference_utils_test_flag(conference, CFLAG_JSON_EVENTS)) {
return;
}
conf_desc = conf_cdr_json_render(conference, NULL);
conference_desc = conference_cdr_json_render(conference, NULL);
if (!(name = conference->name)) {
name = "conference";
@ -287,20 +287,20 @@ void conf_event_send_json(conference_obj_t *conference)
event = cJSON_CreateObject();
json_add_child_string(event, "eventChannel", event_channel);
cJSON_AddItemToObject(event, "data", conf_desc);
cJSON_AddItemToObject(event, "data", conference_desc);
switch_event_channel_broadcast(event_channel, &event, "mod_conference", conf_globals.event_channel_id);
switch_event_channel_broadcast(event_channel, &event, "mod_conference", conference_globals.event_channel_id);
switch_safe_free(dup_domain);
switch_safe_free(event_channel);
}
void conf_event_la_command_handler(switch_live_array_t *la, const char *cmd, const char *sessid, cJSON *jla, void *user_data)
void conference_event_la_command_handler(switch_live_array_t *la, const char *cmd, const char *sessid, cJSON *jla, void *user_data)
{
}
void conf_event_adv_la(conference_obj_t *conference, conf_member_t *member, switch_bool_t join)
void conference_event_adv_la(conference_obj_t *conference, conference_member_t *member, switch_bool_t join)
{
//if (member->video_flow == SWITCH_MEDIA_FLOW_SENDONLY) {
@ -326,21 +326,21 @@ void conf_event_adv_la(conference_obj_t *conference, conf_member_t *member, swit
cJSON_AddItemToObject(data, "action", cJSON_CreateString(join ? "conference-liveArray-join" : "conference-liveArray-part"));
cJSON_AddItemToObject(data, "laChannel", cJSON_CreateString(conference->la_event_channel));
cJSON_AddItemToObject(data, "laName", cJSON_CreateString(conference->la_name));
cJSON_AddItemToObject(data, "role", cJSON_CreateString(conf_utils_member_test_flag(member, MFLAG_MOD) ? "moderator" : "participant"));
cJSON_AddItemToObject(data, "role", cJSON_CreateString(conference_utils_member_test_flag(member, MFLAG_MOD) ? "moderator" : "participant"));
cJSON_AddItemToObject(data, "chatID", cJSON_CreateString(conference->chat_id));
cJSON_AddItemToObject(data, "canvasCount", cJSON_CreateNumber(conference->canvas_count));
if (conf_utils_member_test_flag(member, MFLAG_SECOND_SCREEN)) {
if (conference_utils_member_test_flag(member, MFLAG_SECOND_SCREEN)) {
cJSON_AddItemToObject(data, "secondScreen", cJSON_CreateTrue());
}
if (conf_utils_member_test_flag(member, MFLAG_MOD)) {
if (conference_utils_member_test_flag(member, MFLAG_MOD)) {
cJSON_AddItemToObject(data, "modChannel", cJSON_CreateString(conference->mod_event_channel));
}
switch_core_get_variables(&variables);
for (hp = variables->headers; hp; hp = hp->next) {
if (!strncasecmp(hp->name, "conf_verto_", 11)) {
if (!strncasecmp(hp->name, "conference_verto_", 11)) {
char *var = hp->name + 11;
if (var) {
cJSON_AddItemToObject(data, var, cJSON_CreateString(hp->value));
@ -349,7 +349,7 @@ void conf_event_adv_la(conference_obj_t *conference, conf_member_t *member, swit
}
switch_event_destroy(&variables);
switch_event_channel_broadcast(event_channel, &msg, "mod_conference", conf_globals.event_channel_id);
switch_event_channel_broadcast(event_channel, &msg, "mod_conference", conference_globals.event_channel_id);
if (cookie) {
switch_event_channel_permission_modify(cookie, conference->la_event_channel, join);
@ -358,13 +358,13 @@ void conf_event_adv_la(conference_obj_t *conference, conf_member_t *member, swit
}
}
void conf_event_send_rfc(conference_obj_t *conference)
void conference_event_send_rfc(conference_obj_t *conference)
{
switch_event_t *event;
char *body;
char *name = NULL, *domain = NULL, *dup_domain = NULL;
if (!conf_utils_test_flag(conference, CFLAG_RFC4579)) {
if (!conference_utils_test_flag(conference, CFLAG_RFC4579)) {
return;
}
@ -386,7 +386,7 @@ void conf_event_send_rfc(conference_obj_t *conference)
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "conference-name", name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "conference-domain", domain);
body = conf_cdr_rfc4579_render(conference, NULL, event);
body = conference_cdr_rfc4579_render(conference, NULL, event);
switch_event_add_body(event, "%s", body);
free(body);
switch_event_fire(&event);
@ -397,7 +397,7 @@ void conf_event_send_rfc(conference_obj_t *conference)
}
switch_status_t conf_event_add_data(conference_obj_t *conference, switch_event_t *event)
switch_status_t conference_event_add_data(conference_obj_t *conference, switch_event_t *event)
{
switch_status_t status = SWITCH_STATUS_SUCCESS;
@ -411,9 +411,9 @@ switch_status_t conf_event_add_data(conference_obj_t *conference, switch_event_t
}
/* send a message to every member of the conference */
void conf_event_chat_message_broadcast(conference_obj_t *conference, switch_event_t *event)
void conference_event_chat_message_broadcast(conference_obj_t *conference, switch_event_t *event)
{
conf_member_t *member = NULL;
conference_member_t *member = NULL;
switch_event_t *processed;
switch_assert(conference != NULL);
@ -421,7 +421,7 @@ void conf_event_chat_message_broadcast(conference_obj_t *conference, switch_even
switch_mutex_lock(conference->member_mutex);
for (member = conference->members; member; member = member->next) {
if (member->session && !conf_utils_member_test_flag(member, MFLAG_NOCHANNEL)) {
if (member->session && !conference_utils_member_test_flag(member, MFLAG_NOCHANNEL)) {
const char *presence_id = switch_channel_get_variable(member->channel, "presence_id");
const char *chat_proto = switch_channel_get_variable(member->channel, "chat_proto");
switch_event_t *reply = NULL;
@ -446,7 +446,7 @@ void conf_event_chat_message_broadcast(conference_obj_t *conference, switch_even
switch_mutex_unlock(conference->member_mutex);
}
void conf_event_call_setup_handler(switch_event_t *event)
void conference_event_call_setup_handler(switch_event_t *event)
{
switch_status_t status = SWITCH_STATUS_FALSE;
conference_obj_t *conference = NULL;
@ -462,12 +462,12 @@ void conf_event_call_setup_handler(switch_event_t *event)
if (!ext) ext = dial_str;
if (!zstr(conf) && !zstr(dial_str) && !zstr(action) && (conference = conf_find(conf, domain))) {
if (!zstr(conf) && !zstr(dial_str) && !zstr(action) && (conference = conference_find(conf, domain))) {
switch_event_t *var_event;
switch_event_header_t *hp;
if (conf_utils_test_flag(conference, CFLAG_RFC4579)) {
char *key = switch_mprintf("conf_%s_%s_%s_%s", conference->name, conference->domain, ext, ext_domain);
if (conference_utils_test_flag(conference, CFLAG_RFC4579)) {
char *key = switch_mprintf("conference_%s_%s_%s_%s", conference->name, conference->domain, ext, ext_domain);
char *expanded = NULL, *ostr = dial_str;;
if (!strcasecmp(action, "call")) {
@ -503,7 +503,7 @@ void conf_event_call_setup_handler(switch_event_t *event)
}
}
status = conf_outcall_bg(conference, NULL, NULL, ostr, 60, NULL, NULL, NULL, NULL, NULL, NULL, &var_event);
status = conference_outcall_bg(conference, NULL, NULL, ostr, 60, NULL, NULL, NULL, NULL, NULL, NULL, &var_event);
if (expanded && expanded != conference->outcall_templ) {
switch_safe_free(expanded);
@ -512,9 +512,9 @@ void conf_event_call_setup_handler(switch_event_t *event)
} else if (!strcasecmp(action, "end")) {
if (switch_core_session_hupall_matching_var("conference_call_key", key, SWITCH_CAUSE_NORMAL_CLEARING)) {
conf_send_notify(conference, "SIP/2.0 200 OK\r\n", call_id, SWITCH_TRUE);
conference_send_notify(conference, "SIP/2.0 200 OK\r\n", call_id, SWITCH_TRUE);
} else {
conf_send_notify(conference, "SIP/2.0 481 Failure\r\n", call_id, SWITCH_TRUE);
conference_send_notify(conference, "SIP/2.0 481 Failure\r\n", call_id, SWITCH_TRUE);
}
status = SWITCH_STATUS_SUCCESS;
}
@ -547,7 +547,7 @@ void conf_event_call_setup_handler(switch_event_t *event)
}
void conf_data_event_handler(switch_event_t *event)
void conference_data_event_handler(switch_event_t *event)
{
switch_event_t *revent;
char *name = switch_event_get_header(event, "conference-name");
@ -555,14 +555,14 @@ void conf_data_event_handler(switch_event_t *event)
conference_obj_t *conference = NULL;
char *body = NULL;
if (!zstr(name) && (conference = conf_find(name, domain))) {
if (conf_utils_test_flag(conference, CFLAG_RFC4579)) {
if (!zstr(name) && (conference = conference_find(name, domain))) {
if (conference_utils_test_flag(conference, CFLAG_RFC4579)) {
switch_event_dup(&revent, event);
revent->event_id = SWITCH_EVENT_CONFERENCE_DATA;
revent->flags |= EF_UNIQ_HEADERS;
switch_event_add_header(revent, SWITCH_STACK_TOP, "Event-Name", "CONFERENCE_DATA");
body = conf_cdr_rfc4579_render(conference, event, revent);
body = conference_cdr_rfc4579_render(conference, event, revent);
switch_event_add_body(revent, "%s", body);
switch_event_fire(&revent);
switch_safe_free(body);
@ -572,11 +572,11 @@ void conf_data_event_handler(switch_event_t *event)
}
void conf_event_pres_handler(switch_event_t *event)
void conference_event_pres_handler(switch_event_t *event)
{
char *to = switch_event_get_header(event, "to");
char *domain_name = NULL;
char *dup_to = NULL, *conf_name, *dup_conf_name = NULL;
char *dup_to = NULL, *conference_name, *dup_conference_name = NULL;
conference_obj_t *conference;
if (!to || strncasecmp(to, "conf+", 5) || !strchr(to, '@')) {
@ -588,16 +588,16 @@ void conf_event_pres_handler(switch_event_t *event)
}
conf_name = dup_to + 5;
conference_name = dup_to + 5;
if ((domain_name = strchr(conf_name, '@'))) {
if ((domain_name = strchr(conference_name, '@'))) {
*domain_name++ = '\0';
}
dup_conf_name = switch_mprintf("%q@%q", conf_name, domain_name);
dup_conference_name = switch_mprintf("%q@%q", conference_name, domain_name);
if ((conference = conf_find(conf_name, NULL)) || (conference = conf_find(dup_conf_name, NULL))) {
if ((conference = conference_find(conference_name, NULL)) || (conference = conference_find(dup_conference_name, NULL))) {
if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", conference->name);
@ -608,7 +608,7 @@ void conf_event_pres_handler(switch_event_t *event)
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_count", "%d", EC++);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", conf_name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", conference_name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "channel-state", "CS_ROUTING");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", conference->count == 1 ? "early" : "confirmed");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-direction", conference->count == 1 ? "outbound" : "inbound");
@ -617,14 +617,14 @@ void conf_event_pres_handler(switch_event_t *event)
switch_thread_rwlock_unlock(conference->rwlock);
} else if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", conf_name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", conference_name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", to);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "force-status", "Idle");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", "unknown");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_count", "%d", EC++);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", conf_name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", conference_name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "channel-state", "CS_HANGUP");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", "terminated");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-direction", "inbound");
@ -632,7 +632,7 @@ void conf_event_pres_handler(switch_event_t *event)
}
switch_safe_free(dup_to);
switch_safe_free(dup_conf_name);
switch_safe_free(dup_conference_name);
}
@ -670,7 +670,7 @@ switch_status_t chat_send(switch_event_t *message_event)
switch_copy_string(name, to, sizeof(name));
}
if (!(conference = conf_find(name, NULL))) {
if (!(conference = conference_find(name, NULL))) {
switch_core_chat_send_args(proto, CONF_CHAT_PROTO, to, hint && strchr(hint, '/') ? hint : from, "",
"Conference not active.", NULL, NULL, SWITCH_FALSE);
return SWITCH_STATUS_FALSE;
@ -681,9 +681,9 @@ switch_status_t chat_send(switch_event_t *message_event)
if (body != NULL && (lbuf = strdup(body))) {
/* special case list */
if (conference->broadcast_chat_messages) {
conf_event_chat_message_broadcast(conference, message_event);
conference_event_chat_message_broadcast(conference, message_event);
} else if (switch_stristr("list", lbuf)) {
conf_list_pretty(conference, &stream);
conference_list_pretty(conference, &stream);
/* provide help */
} else {
return SWITCH_STATUS_SUCCESS;

View File

@ -45,12 +45,12 @@
switch_status_t conference_file_close(conference_obj_t *conference, conference_file_node_t *node)
{
switch_event_t *event;
conf_member_t *member = NULL;
conference_member_t *member = NULL;
if (test_eflag(conference, EFLAG_PLAY_FILE_DONE) &&
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conf_event_add_data(conference, event);
conference_event_add_data(conference, event);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "seconds", "%ld", (long) node->fh.samples_in / node->fh.native_rate);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "milliseconds", "%ld", (long) node->fh.samples_in / (node->fh.native_rate / 1000));
@ -63,8 +63,8 @@ switch_status_t conference_file_close(conference_obj_t *conference, conference_f
if (node->member_id) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "play-file-member-done");
if ((member = conf_member_get(conference, node->member_id))) {
conf_member_add_event_data(member, event);
if ((member = conference_member_get(conference, node->member_id))) {
conference_member_add_event_data(member, event);
switch_thread_rwlock_unlock(member->rwlock);
}
@ -83,7 +83,7 @@ switch_status_t conference_file_close(conference_obj_t *conference, conference_f
#ifdef OPENAL_POSITIONING
if (node->al && node->al->device) {
conf_al_close(node->al);
conference_al_close(node->al);
}
#endif
if (switch_core_file_has_video(&node->fh) && conference->canvas) {
@ -175,7 +175,7 @@ switch_status_t conference_file_play(conference_obj_t *conference, char *file, u
}
if (!async && say) {
status = conf_say(conference, file + 4, leadin);
status = conference_say(conference, file + 4, leadin);
goto done;
}
@ -196,7 +196,7 @@ switch_status_t conference_file_play(conference_obj_t *conference, char *file, u
switch_safe_free(params_portion);
} else if (!async) {
status = conf_say(conference, file, leadin);
status = conference_say(conference, file, leadin);
goto done;
} else {
goto done;
@ -232,7 +232,7 @@ switch_status_t conference_file_play(conference_obj_t *conference, char *file, u
flags = SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT;
if (conference->members_with_video && conf_utils_test_flag(conference, CFLAG_TRANSCODE_VIDEO)) {
if (conference->members_with_video && conference_utils_test_flag(conference, CFLAG_TRANSCODE_VIDEO)) {
flags |= SWITCH_FILE_FLAG_VIDEO;
}
@ -244,7 +244,7 @@ switch_status_t conference_file_play(conference_obj_t *conference, char *file, u
if (test_eflag(conference, EFLAG_PLAY_FILE) &&
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conf_event_add_data(conference, event);
conference_event_add_data(conference, event);
if (fnode->fh.params) {
switch_event_merge(event, conference->fnode->fh.params);
@ -271,8 +271,8 @@ switch_status_t conference_file_play(conference_obj_t *conference, char *file, u
}
if (!bad_params && !zstr(position) && conference->channels == 2) {
fnode->al = conf_al_create(pool);
if (conf_al_parse_position(fnode->al, position) != SWITCH_STATUS_SUCCESS) {
fnode->al = conference_al_create(pool);
if (conference_al_parse_position(fnode->al, position) != SWITCH_STATUS_SUCCESS) {
switch_core_file_close(&fnode->fh);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Position Data.\n");
fnode->al = NULL;
@ -288,7 +288,7 @@ switch_status_t conference_file_play(conference_obj_t *conference, char *file, u
fnode->file = switch_core_strdup(fnode->pool, file);
if (!conference->fnode || (async && !conference->async_fnode)) {
conf_video_fnode_check(fnode);
conference_video_fnode_check(fnode);
}
/* Queue the node */

View File

@ -41,7 +41,7 @@
*/
#include <mod_conference.h>
int conf_member_noise_gate_check(conf_member_t *member)
int conference_member_noise_gate_check(conference_member_t *member)
{
int r = 0;
@ -62,7 +62,7 @@ int conf_member_noise_gate_check(conf_member_t *member)
return r;
}
void conf_member_clear_avg(conf_member_t *member)
void conference_member_clear_avg(conference_member_t *member)
{
member->avg_score = 0;
@ -71,7 +71,7 @@ void conf_member_clear_avg(conf_member_t *member)
member->agc_concur = 0;
}
void conf_member_do_binding(conf_member_t *member, conf_key_callback_t handler, const char *digits, const char *data)
void conference_member_do_binding(conference_member_t *member, conference_key_callback_t handler, const char *digits, const char *data)
{
key_binding_t *binding;
@ -85,11 +85,11 @@ void conf_member_do_binding(conf_member_t *member, conf_key_callback_t handler,
}
binding->handler = handler;
switch_ivr_dmachine_bind(member->dmachine, "conf", digits, 0, conf_loop_dmachine_dispatcher, binding);
switch_ivr_dmachine_bind(member->dmachine, "conf", digits, 0, conference_loop_dmachine_dispatcher, binding);
}
void conf_member_bind_controls(conf_member_t *member, const char *controls)
void conference_member_bind_controls(conference_member_t *member, const char *controls)
{
switch_xml_t cxml, cfg, xgroups, xcontrol;
switch_event_t *params;
@ -123,12 +123,12 @@ void conf_member_bind_controls(conf_member_t *member, const char *controls)
if (zstr(key) || zstr(digits)) continue;
for(i = 0; i < conf_loop_mapping_len(); i++) {
for(i = 0; i < conference_loop_mapping_len(); i++) {
if (!strcasecmp(key, control_mappings[i].name)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s binding '%s' to '%s'\n",
switch_core_session_get_name(member->session), digits, key);
conf_member_do_binding(member, control_mappings[i].handler, digits, data);
conference_member_do_binding(member, control_mappings[i].handler, digits, data);
}
}
}
@ -145,24 +145,24 @@ void conf_member_bind_controls(conf_member_t *member, const char *controls)
}
void conf_member_update_status_field(conf_member_t *member)
void conference_member_update_status_field(conference_member_t *member)
{
char *str, *vstr = "", display[128] = "", *json_display = NULL;
cJSON *json, *audio, *video;
if (!member->conference->la || !member->json ||
!member->status_field || switch_channel_test_flag(member->channel, CF_VIDEO_ONLY) || conf_utils_member_test_flag(member, MFLAG_SECOND_SCREEN)) {
!member->status_field || switch_channel_test_flag(member->channel, CF_VIDEO_ONLY) || conference_utils_member_test_flag(member, MFLAG_SECOND_SCREEN)) {
return;
}
switch_live_array_lock(member->conference->la);
if (conf_utils_test_flag(member->conference, CFLAG_JSON_STATUS)) {
if (conference_utils_test_flag(member->conference, CFLAG_JSON_STATUS)) {
json = cJSON_CreateObject();
audio = cJSON_CreateObject();
cJSON_AddItemToObject(audio, "muted", cJSON_CreateBool(!conf_utils_member_test_flag(member, MFLAG_CAN_SPEAK)));
cJSON_AddItemToObject(audio, "muted", cJSON_CreateBool(!conference_utils_member_test_flag(member, MFLAG_CAN_SPEAK)));
cJSON_AddItemToObject(audio, "onHold", cJSON_CreateBool(switch_channel_test_flag(member->channel, CF_HOLD)));
cJSON_AddItemToObject(audio, "talking", cJSON_CreateBool(conf_utils_member_test_flag(member, MFLAG_TALKING)));
cJSON_AddItemToObject(audio, "talking", cJSON_CreateBool(conference_utils_member_test_flag(member, MFLAG_TALKING)));
cJSON_AddItemToObject(audio, "floor", cJSON_CreateBool(member == member->conference->floor_holder));
cJSON_AddItemToObject(audio, "energyScore", cJSON_CreateNumber(member->score));
cJSON_AddItemToObject(json, "audio", audio);
@ -171,9 +171,9 @@ void conf_member_update_status_field(conf_member_t *member)
video = cJSON_CreateObject();
cJSON_AddItemToObject(video, "avatarPresented", cJSON_CreateBool(!!member->avatar_png_img));
cJSON_AddItemToObject(video, "mediaFlow", cJSON_CreateString(member->video_flow == SWITCH_MEDIA_FLOW_SENDONLY ? "sendOnly" : "sendRecv"));
cJSON_AddItemToObject(video, "muted", cJSON_CreateBool(!conf_utils_member_test_flag(member, MFLAG_CAN_BE_SEEN)));
cJSON_AddItemToObject(video, "muted", cJSON_CreateBool(!conference_utils_member_test_flag(member, MFLAG_CAN_BE_SEEN)));
cJSON_AddItemToObject(video, "floor", cJSON_CreateBool(member && member->id == member->conference->video_floor_holder));
if (member && member->id == member->conference->video_floor_holder && conf_utils_test_flag(member->conference, CFLAG_VID_FLOOR_LOCK)) {
if (member && member->id == member->conference->video_floor_holder && conference_utils_test_flag(member->conference, CFLAG_VID_FLOOR_LOCK)) {
cJSON_AddItemToObject(video, "floorLocked", cJSON_CreateTrue());
}
cJSON_AddItemToObject(video, "reservationID", member->video_reservation_id ?
@ -189,24 +189,24 @@ void conf_member_update_status_field(conf_member_t *member)
json_display = cJSON_PrintUnformatted(json);
cJSON_Delete(json);
} else {
if (!conf_utils_member_test_flag(member, MFLAG_CAN_SPEAK)) {
if (!conference_utils_member_test_flag(member, MFLAG_CAN_SPEAK)) {
str = "MUTE";
} else if (switch_channel_test_flag(member->channel, CF_HOLD)) {
str = "HOLD";
} else if (member == member->conference->floor_holder) {
if (conf_utils_member_test_flag(member, MFLAG_TALKING)) {
if (conference_utils_member_test_flag(member, MFLAG_TALKING)) {
str = "TALKING (FLOOR)";
} else {
str = "FLOOR";
}
} else if (conf_utils_member_test_flag(member, MFLAG_TALKING)) {
} else if (conference_utils_member_test_flag(member, MFLAG_TALKING)) {
str = "TALKING";
} else {
str = "ACTIVE";
}
if (switch_channel_test_flag(member->channel, CF_VIDEO)) {
if (!conf_utils_member_test_flag(member, MFLAG_CAN_BE_SEEN)) {
if (!conference_utils_member_test_flag(member, MFLAG_CAN_BE_SEEN)) {
vstr = " VIDEO (BLIND)";
} else {
vstr = " VIDEO";
@ -230,7 +230,7 @@ void conf_member_update_status_field(conf_member_t *member)
switch_live_array_unlock(member->conference->la);
}
switch_status_t conf_member_add_event_data(conf_member_t *member, switch_event_t *event)
switch_status_t conference_member_add_event_data(conference_member_t *member, switch_event_t *event)
{
switch_status_t status = SWITCH_STATUS_SUCCESS;
@ -238,7 +238,7 @@ switch_status_t conf_member_add_event_data(conf_member_t *member, switch_event_t
return status;
if (member->conference) {
status = conf_event_add_data(member->conference, event);
status = conference_event_add_data(member->conference, event);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Floor", "%s", (member == member->conference->floor_holder) ? "true" : "false" );
}
@ -255,14 +255,14 @@ switch_status_t conf_member_add_event_data(conf_member_t *member, switch_event_t
}
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Hear", "%s", conf_utils_member_test_flag(member, MFLAG_CAN_HEAR) ? "true" : "false" );
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "See", "%s", conf_utils_member_test_flag(member, MFLAG_CAN_BE_SEEN) ? "true" : "false" );
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Speak", "%s", conf_utils_member_test_flag(member, MFLAG_CAN_SPEAK) ? "true" : "false" );
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Talking", "%s", conf_utils_member_test_flag(member, MFLAG_TALKING) ? "true" : "false" );
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Mute-Detect", "%s", conf_utils_member_test_flag(member, MFLAG_MUTE_DETECT) ? "true" : "false" );
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Hear", "%s", conference_utils_member_test_flag(member, MFLAG_CAN_HEAR) ? "true" : "false" );
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "See", "%s", conference_utils_member_test_flag(member, MFLAG_CAN_BE_SEEN) ? "true" : "false" );
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Speak", "%s", conference_utils_member_test_flag(member, MFLAG_CAN_SPEAK) ? "true" : "false" );
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Talking", "%s", conference_utils_member_test_flag(member, MFLAG_TALKING) ? "true" : "false" );
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Mute-Detect", "%s", conference_utils_member_test_flag(member, MFLAG_MUTE_DETECT) ? "true" : "false" );
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-ID", "%u", member->id);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-Type", "%s", conf_utils_member_test_flag(member, MFLAG_MOD) ? "moderator" : "member");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-Ghost", "%s", conf_utils_member_test_flag(member, MFLAG_GHOST) ? "true" : "false");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-Type", "%s", conference_utils_member_test_flag(member, MFLAG_MOD) ? "moderator" : "member");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-Ghost", "%s", conference_utils_member_test_flag(member, MFLAG_GHOST) ? "true" : "false");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Energy-Level", "%d", member->energy_level);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Current-Energy", "%d", member->score);
@ -271,17 +271,17 @@ switch_status_t conf_member_add_event_data(conf_member_t *member, switch_event_t
#ifndef OPENAL_POSITIONING
switch_status_t conf_member_parse_position(conf_member_t *member, const char *data)
switch_status_t conference_member_parse_position(conference_member_t *member, const char *data)
{
return SWITCH_STATUS_FALSE;
}
#else
switch_status_t conf_member_parse_position(conf_member_t *member, const char *data)
switch_status_t conference_member_parse_position(conference_member_t *member, const char *data)
{
switch_status_t status = SWITCH_STATUS_FALSE;
if (member->al) {
status = conf_al_parse_position(member->al, data);
status = conference_al_parse_position(member->al, data);
}
return status;
@ -290,7 +290,7 @@ switch_status_t conf_member_parse_position(conf_member_t *member, const char *da
#endif
/* if other_member has a relationship with member, produce it */
conference_relationship_t *conf_member_get_relationship(conf_member_t *member, conf_member_t *other_member)
conference_relationship_t *conference_member_get_relationship(conference_member_t *member, conference_member_t *other_member)
{
conference_relationship_t *rel = NULL, *global = NULL;
@ -318,7 +318,7 @@ conference_relationship_t *conf_member_get_relationship(conf_member_t *member, c
}
/* stop playing a file for the member of the conference */
uint32_t conf_member_stop_file(conf_member_t *member, file_stop_t stop)
uint32_t conference_member_stop_file(conference_member_t *member, file_stop_t stop)
{
conference_file_node_t *nptr;
uint32_t count = 0;
@ -349,9 +349,9 @@ uint32_t conf_member_stop_file(conf_member_t *member, file_stop_t stop)
/* traverse the conference member list for the specified member id and return it's pointer */
conf_member_t *conf_member_get(conference_obj_t *conference, uint32_t id)
conference_member_t *conference_member_get(conference_obj_t *conference, uint32_t id)
{
conf_member_t *member = NULL;
conference_member_t *member = NULL;
switch_assert(conference != NULL);
if (!id) {
@ -361,7 +361,7 @@ conf_member_t *conf_member_get(conference_obj_t *conference, uint32_t id)
switch_mutex_lock(conference->member_mutex);
for (member = conference->members; member; member = member->next) {
if (conf_utils_member_test_flag(member, MFLAG_NOCHANNEL)) {
if (conference_utils_member_test_flag(member, MFLAG_NOCHANNEL)) {
continue;
}
@ -371,8 +371,8 @@ conf_member_t *conf_member_get(conference_obj_t *conference, uint32_t id)
}
if (member) {
if (!conf_utils_member_test_flag(member, MFLAG_INTREE) ||
conf_utils_member_test_flag(member, MFLAG_KICKED) ||
if (!conference_utils_member_test_flag(member, MFLAG_INTREE) ||
conference_utils_member_test_flag(member, MFLAG_KICKED) ||
(member->session && !switch_channel_up(switch_core_session_get_channel(member->session)))) {
/* member is kicked or hanging up so forget it */
@ -392,7 +392,7 @@ conf_member_t *conf_member_get(conference_obj_t *conference, uint32_t id)
return member;
}
void conf_member_check_agc_levels(conf_member_t *member)
void conference_member_check_agc_levels(conference_member_t *member)
{
int x = 0;
@ -415,13 +415,13 @@ void conf_member_check_agc_levels(conf_member_t *member)
member->id, member->conference->agc_level - member->avg_score, member->conference->agc_level,
member->score, member->avg_score, member->agc_volume_in_level, x > 0 ? "+++" : "---");
conf_member_clear_avg(member);
conference_member_clear_avg(member);
}
}
void conf_member_check_channels(switch_frame_t *frame, conf_member_t *member, switch_bool_t in)
void conference_member_check_channels(switch_frame_t *frame, conference_member_t *member, switch_bool_t in)
{
if (member->conference->channels != member->read_impl.number_of_channels || conf_utils_member_test_flag(member, MFLAG_POSITIONAL)) {
if (member->conference->channels != member->read_impl.number_of_channels || conference_utils_member_test_flag(member, MFLAG_POSITIONAL)) {
uint32_t rlen;
int from, to;
@ -435,14 +435,14 @@ void conf_member_check_channels(switch_frame_t *frame, conf_member_t *member, sw
rlen = frame->datalen / 2 / from;
if (in && frame->rate == 48000 && ((from == 1 && to == 2) || (from == 2 && to == 2)) && conf_utils_member_test_flag(member, MFLAG_POSITIONAL)) {
if (in && frame->rate == 48000 && ((from == 1 && to == 2) || (from == 2 && to == 2)) && conference_utils_member_test_flag(member, MFLAG_POSITIONAL)) {
if (from == 2 && to == 2) {
switch_mux_channels((int16_t *) frame->data, rlen, 2, 1);
frame->datalen /= 2;
rlen = frame->datalen / 2;
}
conf_al_process(member->al, frame->data, frame->datalen, frame->rate);
conference_al_process(member->al, frame->data, frame->datalen, frame->rate);
} else {
switch_mux_channels((int16_t *) frame->data, rlen, from, to);
}
@ -453,7 +453,7 @@ void conf_member_check_channels(switch_frame_t *frame, conf_member_t *member, sw
}
void conf_member_add_file_data(conf_member_t *member, int16_t *data, switch_size_t file_data_len)
void conference_member_add_file_data(conference_member_t *member, int16_t *data, switch_size_t file_data_len)
{
switch_size_t file_sample_len;
int16_t file_frame[SWITCH_RECOMMENDED_BUFFER_SIZE] = { 0 };
@ -517,7 +517,7 @@ void conf_member_add_file_data(conf_member_t *member, int16_t *data, switch_size
}
if (member->fnode->al) {
conf_al_process(member->fnode->al, file_frame, file_sample_len * 2, member->conference->rate);
conference_al_process(member->fnode->al, file_frame, file_sample_len * 2, member->conference->rate);
}
for (i = 0; i < (int)file_sample_len * member->conference->channels; i++) {
@ -541,7 +541,7 @@ void conf_member_add_file_data(conf_member_t *member, int16_t *data, switch_size
/* Add a custom relationship to a member */
conference_relationship_t *conf_member_add_relationship(conf_member_t *member, uint32_t id)
conference_relationship_t *conference_member_add_relationship(conference_member_t *member, uint32_t id)
{
conference_relationship_t *rel = NULL;
@ -563,7 +563,7 @@ conference_relationship_t *conf_member_add_relationship(conf_member_t *member, u
}
/* Remove a custom relationship from a member */
switch_status_t conf_member_del_relationship(conf_member_t *member, uint32_t id)
switch_status_t conference_member_del_relationship(conference_member_t *member, uint32_t id)
{
switch_status_t status = SWITCH_STATUS_FALSE;
conference_relationship_t *rel, *last = NULL;
@ -576,7 +576,7 @@ switch_status_t conf_member_del_relationship(conf_member_t *member, uint32_t id)
if (id == 0 || rel->id == id) {
/* we just forget about rel here cos it was allocated by the member's pool
it will be freed when the member is */
conf_member_t *omember;
conference_member_t *omember;
status = SWITCH_STATUS_SUCCESS;
@ -587,9 +587,9 @@ switch_status_t conf_member_del_relationship(conf_member_t *member, uint32_t id)
}
if ((rel->flags & RFLAG_CAN_SEND_VIDEO)) {
conf_utils_member_clear_flag(member, MFLAG_RECEIVING_VIDEO);
if ((omember = conf_member_get(member->conference, rel->id))) {
conf_utils_member_clear_flag(omember, MFLAG_RECEIVING_VIDEO);
conference_utils_member_clear_flag(member, MFLAG_RECEIVING_VIDEO);
if ((omember = conference_member_get(member->conference, rel->id))) {
conference_utils_member_clear_flag(omember, MFLAG_RECEIVING_VIDEO);
switch_thread_rwlock_unlock(omember->rwlock);
}
}
@ -611,7 +611,7 @@ switch_status_t conf_member_del_relationship(conf_member_t *member, uint32_t id)
/* Gain exclusive access and add the member to the list */
switch_status_t conf_member_add(conference_obj_t *conference, conf_member_t *member)
switch_status_t conference_member_add(conference_obj_t *conference, conference_member_t *member)
{
switch_status_t status = SWITCH_STATUS_FALSE;
switch_event_t *event;
@ -645,46 +645,46 @@ switch_status_t conf_member_add(conference_obj_t *conference, conf_member_t *mem
switch_queue_create(&member->dtmf_queue, 100, member->pool);
if (conf_utils_test_flag(conference, CFLAG_PERSONAL_CANVAS)) {
if (conference_utils_test_flag(conference, CFLAG_PERSONAL_CANVAS)) {
video_layout_t *vlayout = NULL;
switch_mutex_lock(conference->canvas_mutex);
if ((vlayout = conf_video_get_layout(conference, conference->video_layout_name, conference->video_layout_group))) {
conf_video_init_canvas(conference, vlayout, &member->canvas);
conf_video_init_canvas_layers(conference, member->canvas, vlayout);
if ((vlayout = conference_video_get_layout(conference, conference->video_layout_name, conference->video_layout_group))) {
conference_video_init_canvas(conference, vlayout, &member->canvas);
conference_video_init_canvas_layers(conference, member->canvas, vlayout);
}
switch_mutex_unlock(conference->canvas_mutex);
}
if (member->video_flow == SWITCH_MEDIA_FLOW_SENDONLY) {
conf_utils_member_clear_flag_locked(member, MFLAG_CAN_BE_SEEN);
conference_utils_member_clear_flag_locked(member, MFLAG_CAN_BE_SEEN);
}
conference->members = member;
conf_utils_member_set_flag_locked(member, MFLAG_INTREE);
conference_utils_member_set_flag_locked(member, MFLAG_INTREE);
switch_mutex_unlock(conference->member_mutex);
conf_cdr_add(member);
conference_cdr_add(member);
if (!conf_utils_member_test_flag(member, MFLAG_NOCHANNEL)) {
if (conf_utils_member_test_flag(member, MFLAG_GHOST)) {
if (!conference_utils_member_test_flag(member, MFLAG_NOCHANNEL)) {
if (conference_utils_member_test_flag(member, MFLAG_GHOST)) {
conference->count_ghosts++;
} else {
conference->count++;
}
if (conf_utils_member_test_flag(member, MFLAG_ENDCONF)) {
if (conference_utils_member_test_flag(member, MFLAG_ENDCONF)) {
if (conference->end_count++) {
conference->endconf_time = 0;
conference->endconference_time = 0;
}
}
conf_send_presence(conference);
conference_send_presence(conference);
channel = switch_core_session_get_channel(member->session);
member->video_flow = switch_core_session_media_flow(member->session, SWITCH_MEDIA_TYPE_VIDEO);
conf_video_check_avatar(member, SWITCH_FALSE);
conference_video_check_avatar(member, SWITCH_FALSE);
if ((var = switch_channel_get_variable_dup(member->channel, "video_initial_canvas", SWITCH_FALSE, -1))) {
int id = atoi(var) - 1;
@ -706,7 +706,7 @@ switch_status_t conf_member_add(conference_obj_t *conference, conf_member_t *mem
}
}
conf_video_reset_member_codec_index(member);
conference_video_reset_member_codec_index(member);
if ((var = switch_channel_get_variable_dup(member->channel, "video_mute_png", SWITCH_FALSE, -1))) {
member->video_mute_png = switch_core_strdup(member->pool, var);
@ -718,12 +718,12 @@ switch_status_t conf_member_add(conference_obj_t *conference, conf_member_t *mem
}
if ((var = switch_channel_get_variable(channel, "video_use_dedicated_encoder")) && switch_true(var)) {
conf_utils_member_set_flag_locked(member, MFLAG_NO_MINIMIZE_ENCODING);
conference_utils_member_set_flag_locked(member, MFLAG_NO_MINIMIZE_ENCODING);
}
switch_channel_set_variable_printf(channel, "conf_member_id", "%d", member->id);
switch_channel_set_variable_printf(channel, "conference_moderator", "%s", conf_utils_member_test_flag(member, MFLAG_MOD) ? "true" : "false");
switch_channel_set_variable_printf(channel, "conference_ghost", "%s", conf_utils_member_test_flag(member, MFLAG_GHOST) ? "true" : "false");
switch_channel_set_variable_printf(channel, "conference_member_id", "%d", member->id);
switch_channel_set_variable_printf(channel, "conference_moderator", "%s", conference_utils_member_test_flag(member, MFLAG_MOD) ? "true" : "false");
switch_channel_set_variable_printf(channel, "conference_ghost", "%s", conference_utils_member_test_flag(member, MFLAG_GHOST) ? "true" : "false");
switch_channel_set_variable(channel, "conference_recording", conference->record_filename);
switch_channel_set_variable(channel, CONFERENCE_UUID_VARIABLE, conference->uuid_str);
@ -733,26 +733,26 @@ switch_status_t conf_member_add(conference_obj_t *conference, conf_member_t *mem
}
if (!switch_channel_get_variable(channel, "conference_call_key")) {
char *key = switch_core_session_sprintf(member->session, "conf_%s_%s_%s",
char *key = switch_core_session_sprintf(member->session, "conference_%s_%s_%s",
conference->name, conference->domain, switch_channel_get_variable(channel, "caller_id_number"));
switch_channel_set_variable(channel, "conference_call_key", key);
}
if (conf_utils_test_flag(conference, CFLAG_WAIT_MOD) && conf_utils_member_test_flag(member, MFLAG_MOD)) {
conf_utils_clear_flag(conference, CFLAG_WAIT_MOD);
if (conference_utils_test_flag(conference, CFLAG_WAIT_MOD) && conference_utils_member_test_flag(member, MFLAG_MOD)) {
conference_utils_clear_flag(conference, CFLAG_WAIT_MOD);
}
if (conference->count > 1) {
if ((conference->moh_sound && !conf_utils_test_flag(conference, CFLAG_WAIT_MOD)) ||
(conf_utils_test_flag(conference, CFLAG_WAIT_MOD) && !switch_true(switch_channel_get_variable(channel, "conference_permanent_wait_mod_moh")))) {
if ((conference->moh_sound && !conference_utils_test_flag(conference, CFLAG_WAIT_MOD)) ||
(conference_utils_test_flag(conference, CFLAG_WAIT_MOD) && !switch_true(switch_channel_get_variable(channel, "conference_permanent_wait_mod_moh")))) {
/* stop MoH if any */
conference_file_stop(conference, FILE_STOP_ASYNC);
}
if (!switch_channel_test_app_flag_key("conf_silent", channel, CONF_SILENT_REQ) && !zstr(conference->enter_sound)) {
if (!switch_channel_test_app_flag_key("conference_silent", channel, CONF_SILENT_REQ) && !zstr(conference->enter_sound)) {
const char * enter_sound = switch_channel_get_variable(channel, "conference_enter_sound");
if (conf_utils_test_flag(conference, CFLAG_ENTER_SOUND) && !conf_utils_member_test_flag(member, MFLAG_SILENT)) {
if (conference_utils_test_flag(conference, CFLAG_ENTER_SOUND) && !conference_utils_member_test_flag(member, MFLAG_SILENT)) {
if (!zstr(enter_sound)) {
conference_file_play(conference, (char *)enter_sound, CONF_DEFAULT_LEADIN,
switch_core_session_get_channel(member->session), 0);
@ -769,24 +769,24 @@ switch_status_t conf_member_add(conference_obj_t *conference, conf_member_t *mem
if (call_list) {
char saymsg[1024];
switch_snprintf(saymsg, sizeof(saymsg), "Auto Calling %d parties", call_list->iteration);
conf_member_say(member, saymsg, 0);
conference_member_say(member, saymsg, 0);
} else {
if (!switch_channel_test_app_flag_key("conf_silent", channel, CONF_SILENT_REQ)) {
if (!switch_channel_test_app_flag_key("conference_silent", channel, CONF_SILENT_REQ)) {
/* announce the total number of members in the conference */
if (conference->count >= conference->announce_count && conference->announce_count > 1) {
switch_snprintf(msg, sizeof(msg), "There are %d callers", conference->count);
conf_member_say(member, msg, CONF_DEFAULT_LEADIN);
} else if (conference->count == 1 && !conference->perpetual_sound && !conf_utils_test_flag(conference, CFLAG_WAIT_MOD)) {
conference_member_say(member, msg, CONF_DEFAULT_LEADIN);
} else if (conference->count == 1 && !conference->perpetual_sound && !conference_utils_test_flag(conference, CFLAG_WAIT_MOD)) {
/* as long as its not a bridge_to conference, announce if person is alone */
if (!conf_utils_test_flag(conference, CFLAG_BRIDGE_TO)) {
if (conference->alone_sound && !conf_utils_member_test_flag(member, MFLAG_GHOST)) {
if (!conference_utils_test_flag(conference, CFLAG_BRIDGE_TO)) {
if (conference->alone_sound && !conference_utils_member_test_flag(member, MFLAG_GHOST)) {
conference_file_stop(conference, FILE_STOP_ASYNC);
conference_file_play(conference, conference->alone_sound, CONF_DEFAULT_LEADIN,
switch_core_session_get_channel(member->session), 0);
} else {
switch_snprintf(msg, sizeof(msg), "You are currently the only person in this conference.");
conf_member_say(member, msg, CONF_DEFAULT_LEADIN);
conference_member_say(member, msg, CONF_DEFAULT_LEADIN);
}
}
}
@ -794,35 +794,35 @@ switch_status_t conf_member_add(conference_obj_t *conference, conf_member_t *mem
}
if (conference->min && conference->count >= conference->min) {
conf_utils_set_flag(conference, CFLAG_ENFORCE_MIN);
conference_utils_set_flag(conference, CFLAG_ENFORCE_MIN);
}
if (!switch_channel_test_app_flag_key("conf_silent", channel, CONF_SILENT_REQ) &&
if (!switch_channel_test_app_flag_key("conference_silent", channel, CONF_SILENT_REQ) &&
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conf_member_add_event_data(member, event);
conference_member_add_event_data(member, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "add-member");
switch_event_fire(&event);
}
switch_channel_clear_app_flag_key("conf_silent", channel, CONF_SILENT_REQ);
switch_channel_set_app_flag_key("conf_silent", channel, CONF_SILENT_DONE);
switch_channel_clear_app_flag_key("conference_silent", channel, CONF_SILENT_REQ);
switch_channel_set_app_flag_key("conference_silent", channel, CONF_SILENT_DONE);
if ((position = switch_channel_get_variable(channel, "conference_position"))) {
if (conference->channels == 2) {
if (conf_utils_member_test_flag(member, MFLAG_NO_POSITIONAL)) {
if (conference_utils_member_test_flag(member, MFLAG_NO_POSITIONAL)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
"%s has positional audio blocked.\n", switch_channel_get_name(channel));
} else {
if (conf_member_parse_position(member, position) != SWITCH_STATUS_SUCCESS) {
if (conference_member_parse_position(member, position) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "%s invalid position data\n", switch_channel_get_name(channel));
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s position data set\n", switch_channel_get_name(channel));
}
conf_utils_member_set_flag(member, MFLAG_POSITIONAL);
member->al = conf_al_create(member->pool);
conference_utils_member_set_flag(member, MFLAG_POSITIONAL);
member->al = conference_al_create(member->pool);
}
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "%s cannot set position data on mono conference.\n", switch_channel_get_name(channel));
@ -834,7 +834,7 @@ switch_status_t conf_member_add(conference_obj_t *conference, conf_member_t *mem
controls = switch_channel_get_variable(channel, "conference_controls");
if (zstr(controls)) {
if (!conf_utils_member_test_flag(member, MFLAG_MOD) || !conference->moderator_controls) {
if (!conference_utils_member_test_flag(member, MFLAG_MOD) || !conference->moderator_controls) {
controls = conference->caller_controls;
} else {
controls = conference->moderator_controls;
@ -848,7 +848,7 @@ switch_status_t conf_member_add(conference_obj_t *conference, conf_member_t *mem
if (strcasecmp(controls, "none")) {
switch_ivr_dmachine_create(&member->dmachine, "mod_conference", NULL,
conference->ivr_dtmf_timeout, conference->ivr_input_timeout, NULL, NULL, NULL);
conf_member_bind_controls(member, controls);
conference_member_bind_controls(member, controls);
}
}
@ -858,7 +858,7 @@ switch_status_t conf_member_add(conference_obj_t *conference, conf_member_t *mem
switch_mutex_unlock(member->audio_in_mutex);
if (conference->la && member->channel && !switch_channel_test_flag(member->channel, CF_VIDEO_ONLY)) {
if (!conf_utils_member_test_flag(member, MFLAG_SECOND_SCREEN)) {
if (!conference_utils_member_test_flag(member, MFLAG_SECOND_SCREEN)) {
member->json = cJSON_CreateArray();
cJSON_AddItemToArray(member->json, cJSON_CreateStringPrintf("%0.4d", member->id));
cJSON_AddItemToArray(member->json, cJSON_CreateString(switch_channel_get_variable(member->channel, "caller_id_number")));
@ -877,35 +877,35 @@ switch_status_t conf_member_add(conference_obj_t *conference, conf_member_t *mem
cJSON_AddItemToArray(member->json, cJSON_CreateNull());
conf_member_update_status_field(member);
conference_member_update_status_field(member);
//switch_live_array_add_alias(conference->la, switch_core_session_get_uuid(member->session), "conference");
}
conf_event_adv_la(conference, member, SWITCH_TRUE);
conference_event_adv_la(conference, member, SWITCH_TRUE);
if (!conf_utils_member_test_flag(member, MFLAG_SECOND_SCREEN)) {
if (!conference_utils_member_test_flag(member, MFLAG_SECOND_SCREEN)) {
switch_live_array_add(conference->la, switch_core_session_get_uuid(member->session), -1, &member->json, SWITCH_FALSE);
}
}
if (conf_utils_test_flag(conference, CFLAG_POSITIONAL)) {
conf_al_gen_arc(conference, NULL);
if (conference_utils_test_flag(conference, CFLAG_POSITIONAL)) {
conference_al_gen_arc(conference, NULL);
}
conf_event_send_rfc(conference);
conf_event_send_json(conference);
conference_event_send_rfc(conference);
conference_event_send_json(conference);
switch_mutex_unlock(conference->mutex);
status = SWITCH_STATUS_SUCCESS;
conf_video_find_floor(member, SWITCH_TRUE);
conference_video_find_floor(member, SWITCH_TRUE);
if (conf_utils_member_test_flag(member, MFLAG_JOIN_VID_FLOOR)) {
conf_video_set_floor_holder(conference, member, SWITCH_TRUE);
conf_utils_set_flag(member->conference, CFLAG_VID_FLOOR_LOCK);
if (conference_utils_member_test_flag(member, MFLAG_JOIN_VID_FLOOR)) {
conference_video_set_floor_holder(conference, member, SWITCH_TRUE);
conference_utils_set_flag(member->conference, CFLAG_VID_FLOOR_LOCK);
if (test_eflag(conference, EFLAG_FLOOR_CHANGE)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "conference %s OK video floor %d %s\n",
@ -916,10 +916,10 @@ switch_status_t conf_member_add(conference_obj_t *conference, conf_member_t *mem
return status;
}
void conf_member_set_floor_holder(conference_obj_t *conference, conf_member_t *member)
void conference_member_set_floor_holder(conference_obj_t *conference, conference_member_t *member)
{
switch_event_t *event;
conf_member_t *old_member = NULL;
conference_member_t *old_member = NULL;
int old_id = 0;
if (conference->floor_holder) {
@ -939,7 +939,7 @@ void conf_member_set_floor_holder(conference_obj_t *conference, conf_member_t *m
switch_channel_get_name(member->channel));
conference->floor_holder = member;
conf_member_update_status_field(member);
conference_member_update_status_field(member);
} else {
conference->floor_holder = NULL;
}
@ -947,16 +947,16 @@ void conf_member_set_floor_holder(conference_obj_t *conference, conf_member_t *m
if (old_member) {
old_id = old_member->id;
conf_member_update_status_field(old_member);
conference_member_update_status_field(old_member);
old_member->floor_packets = 0;
}
conf_utils_set_flag(conference, CFLAG_FLOOR_CHANGE);
conference_utils_set_flag(conference, CFLAG_FLOOR_CHANGE);
switch_mutex_unlock(conference->mutex);
if (test_eflag(conference, EFLAG_FLOOR_CHANGE)) {
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT);
conf_event_add_data(conference, event);
conference_event_add_data(conference, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "floor-change");
if (old_id) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Old-ID", "%d", old_id);
@ -965,7 +965,7 @@ void conf_member_set_floor_holder(conference_obj_t *conference, conf_member_t *m
}
if (conference->floor_holder) {
conf_member_add_event_data(conference->floor_holder, event);
conference_member_add_event_data(conference->floor_holder, event);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-ID", "%d", conference->floor_holder->id);
} else {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "New-ID", "none");
@ -977,10 +977,10 @@ void conf_member_set_floor_holder(conference_obj_t *conference, conf_member_t *m
}
/* Gain exclusive access and remove the member from the list */
switch_status_t conf_member_del(conference_obj_t *conference, conf_member_t *member)
switch_status_t conference_member_del(conference_obj_t *conference, conference_member_t *member)
{
switch_status_t status = SWITCH_STATUS_FALSE;
conf_member_t *imember, *last = NULL;
conference_member_t *imember, *last = NULL;
switch_event_t *event;
conference_file_node_t *member_fnode;
switch_speech_handle_t *member_sh;
@ -999,18 +999,18 @@ switch_status_t conf_member_del(conference_obj_t *conference, conf_member_t *mem
lock_member(member);
conf_member_del_relationship(member, 0);
conference_member_del_relationship(member, 0);
conf_cdr_del(member);
conference_cdr_del(member);
#ifdef OPENAL_POSITIONING
if (member->al && member->al->device) {
conf_al_close(member->al);
conference_al_close(member->al);
}
#endif
if (member->canvas) {
conf_video_destroy_canvas(&member->canvas);
conference_video_destroy_canvas(&member->canvas);
}
member_fnode = member->fnode;
@ -1032,7 +1032,7 @@ switch_status_t conf_member_del(conference_obj_t *conference, conf_member_t *mem
switch_mutex_lock(member->audio_in_mutex);
switch_mutex_lock(member->audio_out_mutex);
lock_member(member);
conf_utils_member_clear_flag(member, MFLAG_INTREE);
conference_utils_member_clear_flag(member, MFLAG_INTREE);
if (member->rec) {
conference->recording_members--;
@ -1077,11 +1077,11 @@ switch_status_t conf_member_del(conference_obj_t *conference, conf_member_t *mem
}
if (member == member->conference->floor_holder) {
conf_member_set_floor_holder(member->conference, NULL);
conference_member_set_floor_holder(member->conference, NULL);
}
if (member->id == member->conference->video_floor_holder) {
conf_utils_clear_flag(member->conference, CFLAG_VID_FLOOR_LOCK);
conference_utils_clear_flag(member->conference, CFLAG_VID_FLOOR_LOCK);
if (member->conference->last_video_floor_holder) {
member->conference->video_floor_holder = member->conference->last_video_floor_holder;
member->conference->last_video_floor_holder = 0;
@ -1089,36 +1089,36 @@ switch_status_t conf_member_del(conference_obj_t *conference, conf_member_t *mem
member->conference->video_floor_holder = 0;
}
if (!conf_utils_member_test_flag(member, MFLAG_NOCHANNEL)) {
if (!conference_utils_member_test_flag(member, MFLAG_NOCHANNEL)) {
switch_channel_t *channel = switch_core_session_get_channel(member->session);
if (conf_utils_member_test_flag(member, MFLAG_GHOST)) {
if (conference_utils_member_test_flag(member, MFLAG_GHOST)) {
conference->count_ghosts--;
} else {
conference->count--;
}
if (conf_utils_member_test_flag(member, MFLAG_ENDCONF)) {
if (conference_utils_member_test_flag(member, MFLAG_ENDCONF)) {
if (!--conference->end_count) {
//conf_utils_set_flag_locked(conference, CFLAG_DESTRUCT);
conference->endconf_time = switch_epoch_time_now(NULL);
//conference_utils_set_flag_locked(conference, CFLAG_DESTRUCT);
conference->endconference_time = switch_epoch_time_now(NULL);
}
}
conf_send_presence(conference);
conference_send_presence(conference);
switch_channel_set_variable(channel, "conference_call_key", NULL);
if ((conference->min && conf_utils_test_flag(conference, CFLAG_ENFORCE_MIN) && (conference->count + conference->count_ghosts) < conference->min)
|| (conf_utils_test_flag(conference, CFLAG_DYNAMIC) && (conference->count + conference->count_ghosts == 0))) {
conf_utils_set_flag(conference, CFLAG_DESTRUCT);
if ((conference->min && conference_utils_test_flag(conference, CFLAG_ENFORCE_MIN) && (conference->count + conference->count_ghosts) < conference->min)
|| (conference_utils_test_flag(conference, CFLAG_DYNAMIC) && (conference->count + conference->count_ghosts == 0))) {
conference_utils_set_flag(conference, CFLAG_DESTRUCT);
} else {
if (!switch_true(switch_channel_get_variable(channel, "conference_permanent_wait_mod_moh")) && conf_utils_test_flag(conference, CFLAG_WAIT_MOD)) {
if (!switch_true(switch_channel_get_variable(channel, "conference_permanent_wait_mod_moh")) && conference_utils_test_flag(conference, CFLAG_WAIT_MOD)) {
/* Stop MOH if any */
conference_file_stop(conference, FILE_STOP_ASYNC);
}
if (!exit_sound && conference->exit_sound && conf_utils_test_flag(conference, CFLAG_EXIT_SOUND) && !conf_utils_member_test_flag(member, MFLAG_SILENT)) {
if (!exit_sound && conference->exit_sound && conference_utils_test_flag(conference, CFLAG_EXIT_SOUND) && !conference_utils_member_test_flag(member, MFLAG_SILENT)) {
conference_file_play(conference, conference->exit_sound, 0, channel, 0);
}
if (conference->count == 1 && conference->alone_sound && !conf_utils_test_flag(conference, CFLAG_WAIT_MOD) && !conf_utils_member_test_flag(member, MFLAG_GHOST)) {
if (conference->count == 1 && conference->alone_sound && !conference_utils_test_flag(conference, CFLAG_WAIT_MOD) && !conference_utils_member_test_flag(member, MFLAG_GHOST)) {
conference_file_stop(conference, FILE_STOP_ASYNC);
conference_file_play(conference, conference->alone_sound, 0, channel, 0);
}
@ -1126,15 +1126,15 @@ switch_status_t conf_member_del(conference_obj_t *conference, conf_member_t *mem
if (test_eflag(conference, EFLAG_DEL_MEMBER) &&
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conf_member_add_event_data(member, event);
conf_event_add_data(conference, event);
conference_member_add_event_data(member, event);
conference_event_add_data(conference, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "del-member");
switch_event_fire(&event);
}
}
conf_video_find_floor(member, SWITCH_FALSE);
conf_video_detach_video_layer(member);
conference_video_find_floor(member, SWITCH_FALSE);
conference_video_detach_video_layer(member);
member->conference = NULL;
@ -1147,14 +1147,14 @@ switch_status_t conf_member_del(conference_obj_t *conference, conf_member_t *mem
if (conference->la && member->session && !switch_channel_test_flag(member->channel, CF_VIDEO_ONLY)) {
switch_live_array_del(conference->la, switch_core_session_get_uuid(member->session));
//switch_live_array_clear_alias(conference->la, switch_core_session_get_uuid(member->session), "conference");
conf_event_adv_la(conference, member, SWITCH_FALSE);
conference_event_adv_la(conference, member, SWITCH_FALSE);
}
conf_event_send_rfc(conference);
conf_event_send_json(conference);
conference_event_send_rfc(conference);
conference_event_send_json(conference);
if (conf_utils_test_flag(conference, CFLAG_POSITIONAL)) {
conf_al_gen_arc(conference, NULL);
if (conference_utils_test_flag(conference, CFLAG_POSITIONAL)) {
conference_al_gen_arc(conference, NULL);
}
if (member->session) {
@ -1167,9 +1167,9 @@ switch_status_t conf_member_del(conference_obj_t *conference, conf_member_t *mem
return status;
}
void conf_member_send_all_dtmf(conf_member_t *member, conference_obj_t *conference, const char *dtmf)
void conference_member_send_all_dtmf(conference_member_t *member, conference_obj_t *conference, const char *dtmf)
{
conf_member_t *imember;
conference_member_t *imember;
switch_mutex_lock(conference->mutex);
switch_mutex_lock(conference->member_mutex);
@ -1198,7 +1198,7 @@ void conf_member_send_all_dtmf(conf_member_t *member, conference_obj_t *conferen
/* Play a file in the conference room to a member */
switch_status_t conf_member_play_file(conf_member_t *member, char *file, uint32_t leadin, switch_bool_t mux)
switch_status_t conference_member_play_file(conference_member_t *member, char *file, uint32_t leadin, switch_bool_t mux)
{
switch_status_t status = SWITCH_STATUS_FALSE;
char *dfile = NULL, *expanded = NULL;
@ -1207,7 +1207,7 @@ switch_status_t conf_member_play_file(conf_member_t *member, char *file, uint32_
int channels = member->conference->channels;
int bad_params = 0;
if (member == NULL || file == NULL || conf_utils_member_test_flag(member, MFLAG_KICKED))
if (member == NULL || file == NULL || conference_utils_member_test_flag(member, MFLAG_KICKED))
return status;
if ((expanded = switch_channel_expand_variables(switch_core_session_get_channel(member->session), file)) != file) {
@ -1217,7 +1217,7 @@ switch_status_t conf_member_play_file(conf_member_t *member, char *file, uint32_
}
if (!strncasecmp(file, "say:", 4)) {
if (!zstr(file + 4)) {
status = conf_member_say(member, file + 4, leadin);
status = conference_member_say(member, file + 4, leadin);
}
goto done;
}
@ -1228,7 +1228,7 @@ switch_status_t conf_member_play_file(conf_member_t *member, char *file, uint32_
}
file = dfile;
} else if (!zstr(file)) {
status = conf_member_say(member, file, leadin);
status = conference_member_say(member, file, leadin);
goto done;
}
}
@ -1276,8 +1276,8 @@ switch_status_t conf_member_play_file(conf_member_t *member, char *file, uint32_
const char *position = switch_event_get_header(fnode->fh.params, "position");
if (!bad_params && !zstr(position) && member->conference->channels == 2) {
fnode->al = conf_al_create(pool);
if (conf_al_parse_position(fnode->al, position) != SWITCH_STATUS_SUCCESS) {
fnode->al = conference_al_create(pool);
if (conference_al_parse_position(fnode->al, position) != SWITCH_STATUS_SUCCESS) {
switch_core_file_close(&fnode->fh);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Invalid Position Data.\n");
fnode->al = NULL;
@ -1309,7 +1309,7 @@ switch_status_t conf_member_play_file(conf_member_t *member, char *file, uint32_
}
/* Say some thing with TTS in the conference room */
switch_status_t conf_member_say(conf_member_t *member, char *text, uint32_t leadin)
switch_status_t conference_member_say(conference_member_t *member, char *text, uint32_t leadin)
{
conference_obj_t *conference = member->conference;
conference_file_node_t *fnode, *nptr;
@ -1370,8 +1370,8 @@ switch_status_t conf_member_say(conf_member_t *member, char *text, uint32_t lead
position = NULL;
} else {
channels = 1;
fnode->al = conf_al_create(pool);
if (conf_al_parse_position(fnode->al, position) != SWITCH_STATUS_SUCCESS) {
fnode->al = conference_al_create(pool);
if (conference_al_parse_position(fnode->al, position) != SWITCH_STATUS_SUCCESS) {
fnode->al = NULL;
channels = conference->channels;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Position Data.\n");
@ -1441,9 +1441,9 @@ switch_status_t conf_member_say(conf_member_t *member, char *text, uint32_t lead
/* execute a callback for every member of the conference */
void conf_member_itterator(conference_obj_t *conference, switch_stream_handle_t *stream, uint8_t non_mod, conf_api_member_cmd_t pfncallback, void *data)
void conference_member_itterator(conference_obj_t *conference, switch_stream_handle_t *stream, uint8_t non_mod, conference_api_member_cmd_t pfncallback, void *data)
{
conf_member_t *member = NULL;
conference_member_t *member = NULL;
switch_assert(conference != NULL);
switch_assert(stream != NULL);
@ -1451,8 +1451,8 @@ void conf_member_itterator(conference_obj_t *conference, switch_stream_handle_t
switch_mutex_lock(conference->member_mutex);
for (member = conference->members; member; member = member->next) {
if (!(non_mod && conf_utils_member_test_flag(member, MFLAG_MOD))) {
if (member->session && !conf_utils_member_test_flag(member, MFLAG_NOCHANNEL)) {
if (!(non_mod && conference_utils_member_test_flag(member, MFLAG_MOD))) {
if (member->session && !conference_utils_member_test_flag(member, MFLAG_NOCHANNEL)) {
pfncallback(member, stream, data);
}
} else {
@ -1463,7 +1463,7 @@ void conf_member_itterator(conference_obj_t *conference, switch_stream_handle_t
}
int conf_member_get_canvas_id(conf_member_t *member, const char *val, switch_bool_t watching)
int conference_member_get_canvas_id(conference_member_t *member, const char *val, switch_bool_t watching)
{
int index = -1;
int cur;
@ -1526,7 +1526,7 @@ int conf_member_get_canvas_id(conf_member_t *member, const char *val, switch_boo
}
int conf_member_setup_media(conf_member_t *member, conference_obj_t *conference)
int conference_member_setup_media(conference_member_t *member, conference_obj_t *conference)
{
switch_codec_implementation_t read_impl = { 0 };

View File

@ -41,12 +41,12 @@
*/
#include <mod_conference.h>
void conf_record_launch_thread(conference_obj_t *conference, char *path, switch_bool_t autorec)
void conference_record_launch_thread(conference_obj_t *conference, char *path, switch_bool_t autorec)
{
switch_thread_t *thread;
switch_threadattr_t *thd_attr = NULL;
switch_memory_pool_t *pool;
conf_record_t *rec;
conference_record_t *rec;
/* Setup a memory pool to use. */
if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
@ -73,28 +73,28 @@ void conf_record_launch_thread(conference_obj_t *conference, char *path, switch_
switch_threadattr_create(&thd_attr, rec->pool);
switch_threadattr_detach_set(thd_attr, 1);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
switch_thread_create(&thread, thd_attr, conf_record_thread_run, rec, rec->pool);
switch_thread_create(&thread, thd_attr, conference_record_thread_run, rec, rec->pool);
}
/* stop the specified recording */
switch_status_t conf_record_stop(conference_obj_t *conference, switch_stream_handle_t *stream, char *path)
switch_status_t conference_record_stop(conference_obj_t *conference, switch_stream_handle_t *stream, char *path)
{
conf_member_t *member = NULL;
conference_member_t *member = NULL;
int count = 0;
switch_assert(conference != NULL);
switch_mutex_lock(conference->member_mutex);
for (member = conference->members; member; member = member->next) {
if (conf_utils_member_test_flag(member, MFLAG_NOCHANNEL) && (!path || !strcmp(path, member->rec_path))) {
if (!conf_utils_test_flag(conference, CFLAG_CONF_RESTART_AUTO_RECORD) && member->rec && member->rec->autorec) {
if (conference_utils_member_test_flag(member, MFLAG_NOCHANNEL) && (!path || !strcmp(path, member->rec_path))) {
if (!conference_utils_test_flag(conference, CFLAG_CONF_RESTART_AUTO_RECORD) && member->rec && member->rec->autorec) {
stream->write_function(stream, "Stopped AUTO recording file %s (Auto Recording Now Disabled)\n", member->rec_path);
conference->auto_record = 0;
} else {
stream->write_function(stream, "Stopped recording file %s\n", member->rec_path);
}
conf_utils_member_clear_flag_locked(member, MFLAG_RUNNING);
conference_utils_member_clear_flag_locked(member, MFLAG_RUNNING);
count++;
}
@ -106,9 +106,9 @@ switch_status_t conf_record_stop(conference_obj_t *conference, switch_stream_han
return count;
}
/* stop/pause/resume the specified recording */
switch_status_t conf_record_action(conference_obj_t *conference, char *path, recording_action_type_t action)
switch_status_t conference_record_action(conference_obj_t *conference, char *path, recording_action_type_t action)
{
conf_member_t *member = NULL;
conference_member_t *member = NULL;
int count = 0;
//switch_file_handle_t *fh = NULL;
@ -116,21 +116,21 @@ switch_status_t conf_record_action(conference_obj_t *conference, char *path, rec
switch_mutex_lock(conference->member_mutex);
for (member = conference->members; member; member = member->next)
{
if (conf_utils_member_test_flag(member, MFLAG_NOCHANNEL) && (!path || !strcmp(path, member->rec_path)))
if (conference_utils_member_test_flag(member, MFLAG_NOCHANNEL) && (!path || !strcmp(path, member->rec_path)))
{
//switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Action: %d\n", action);
switch (action)
{
case REC_ACTION_STOP:
conf_utils_member_clear_flag_locked(member, MFLAG_RUNNING);
conference_utils_member_clear_flag_locked(member, MFLAG_RUNNING);
count++;
break;
case REC_ACTION_PAUSE:
conf_utils_member_set_flag_locked(member, MFLAG_PAUSE_RECORDING);
conference_utils_member_set_flag_locked(member, MFLAG_PAUSE_RECORDING);
count = 1;
break;
case REC_ACTION_RESUME:
conf_utils_member_clear_flag_locked(member, MFLAG_PAUSE_RECORDING);
conference_utils_member_clear_flag_locked(member, MFLAG_PAUSE_RECORDING);
count = 1;
break;
}
@ -142,11 +142,11 @@ switch_status_t conf_record_action(conference_obj_t *conference, char *path, rec
/* Sub-Routine called by a record entity inside a conference */
void *SWITCH_THREAD_FUNC conf_record_thread_run(switch_thread_t *thread, void *obj)
void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *thread, void *obj)
{
int16_t *data_buf;
conf_member_t smember = { 0 }, *member;
conf_record_t *rp, *last = NULL, *rec = (conf_record_t *) obj;
conference_member_t smember = { 0 }, *member;
conference_record_t *rp, *last = NULL, *rec = (conference_record_t *) obj;
conference_obj_t *conference = rec->conference;
uint32_t samples = switch_samples_per_packet(conference->rate, conference->interval);
uint32_t mux_used;
@ -170,9 +170,9 @@ void *SWITCH_THREAD_FUNC conf_record_thread_run(switch_thread_t *thread, void *o
data_buf_len = samples * sizeof(int16_t) * conference->channels;
switch_zmalloc(data_buf, data_buf_len);
switch_mutex_lock(conf_globals.hash_mutex);
conf_globals.threads++;
switch_mutex_unlock(conf_globals.hash_mutex);
switch_mutex_lock(conference_globals.hash_mutex);
conference_globals.threads++;
switch_mutex_unlock(conference_globals.hash_mutex);
member = &smember;
@ -221,7 +221,7 @@ void *SWITCH_THREAD_FUNC conf_record_thread_run(switch_thread_t *thread, void *o
flags = SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT;
if (conference->members_with_video && conf_utils_test_flag(conference, CFLAG_TRANSCODE_VIDEO)) {
if (conference->members_with_video && conference_utils_test_flag(conference, CFLAG_TRANSCODE_VIDEO)) {
flags |= SWITCH_FILE_FLAG_VIDEO;
if (conference->canvas) {
char *orig_path = rec->path;
@ -240,7 +240,7 @@ void *SWITCH_THREAD_FUNC conf_record_thread_run(switch_thread_t *thread, void *o
if (test_eflag(conference, EFLAG_RECORD) &&
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conf_event_add_data(conference, event);
conference_event_add_data(conference, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "start-recording");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Path", rec->path);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Error", "File could not be opened for recording");
@ -252,8 +252,8 @@ void *SWITCH_THREAD_FUNC conf_record_thread_run(switch_thread_t *thread, void *o
switch_mutex_lock(conference->mutex);
if (conference->video_floor_holder) {
conf_member_t *member;
if ((member = conf_member_get(conference, conference->video_floor_holder))) {
conference_member_t *member;
if ((member = conference_member_get(conference, conference->video_floor_holder))) {
if (member->session) {
switch_core_session_video_reinit(member->session);
}
@ -278,37 +278,37 @@ void *SWITCH_THREAD_FUNC conf_record_thread_run(switch_thread_t *thread, void *o
if (test_eflag(conference, EFLAG_RECORD) &&
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conf_event_add_data(conference, event);
conference_event_add_data(conference, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "start-recording");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Path", rec->path);
switch_event_fire(&event);
}
if (conf_member_add(conference, member) != SWITCH_STATUS_SUCCESS) {
if (conference_member_add(conference, member) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Joining Conference\n");
goto end;
}
while (conf_utils_member_test_flag(member, MFLAG_RUNNING) && conf_utils_test_flag(conference, CFLAG_RUNNING) && (conference->count + conference->count_ghosts)) {
while (conference_utils_member_test_flag(member, MFLAG_RUNNING) && conference_utils_test_flag(conference, CFLAG_RUNNING) && (conference->count + conference->count_ghosts)) {
len = 0;
mux_used = (uint32_t) switch_buffer_inuse(member->mux_buffer);
if (conf_utils_member_test_flag(member, MFLAG_FLUSH_BUFFER)) {
if (conference_utils_member_test_flag(member, MFLAG_FLUSH_BUFFER)) {
if (mux_used) {
switch_mutex_lock(member->audio_out_mutex);
switch_buffer_zero(member->mux_buffer);
switch_mutex_unlock(member->audio_out_mutex);
mux_used = 0;
}
conf_utils_member_clear_flag_locked(member, MFLAG_FLUSH_BUFFER);
conference_utils_member_clear_flag_locked(member, MFLAG_FLUSH_BUFFER);
}
again:
if (switch_test_flag((&member->rec->fh), SWITCH_FILE_PAUSE)) {
conf_utils_member_set_flag_locked(member, MFLAG_FLUSH_BUFFER);
conference_utils_member_set_flag_locked(member, MFLAG_FLUSH_BUFFER);
goto loop;
}
@ -334,10 +334,10 @@ void *SWITCH_THREAD_FUNC conf_record_thread_run(switch_thread_t *thread, void *o
len = (switch_size_t) samples;
}
if (!conf_utils_member_test_flag(member, MFLAG_PAUSE_RECORDING)) {
if (!conference_utils_member_test_flag(member, MFLAG_PAUSE_RECORDING)) {
if (!len || switch_core_file_write(&member->rec->fh, data_buf, &len) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write Failed\n");
conf_utils_member_clear_flag_locked(member, MFLAG_RUNNING);
conference_utils_member_clear_flag_locked(member, MFLAG_RUNNING);
}
}
@ -363,7 +363,7 @@ void *SWITCH_THREAD_FUNC conf_record_thread_run(switch_thread_t *thread, void *o
switch_safe_free(data_buf);
switch_core_timer_destroy(&timer);
conf_member_del(conference, member);
conference_member_del(conference, member);
if (conference->canvas) {
conference->canvas->send_keyframe = 1;
@ -371,7 +371,7 @@ void *SWITCH_THREAD_FUNC conf_record_thread_run(switch_thread_t *thread, void *o
switch_buffer_destroy(&member->audio_buffer);
switch_buffer_destroy(&member->mux_buffer);
conf_utils_member_clear_flag_locked(member, MFLAG_RUNNING);
conference_utils_member_clear_flag_locked(member, MFLAG_RUNNING);
if (switch_test_flag((&member->rec->fh), SWITCH_FILE_OPEN)) {
switch_mutex_lock(conference->mutex);
switch_mutex_unlock(conference->mutex);
@ -379,7 +379,7 @@ void *SWITCH_THREAD_FUNC conf_record_thread_run(switch_thread_t *thread, void *o
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Recording of %s Stopped\n", rec->path);
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conf_event_add_data(conference, event);
conference_event_add_data(conference, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "stop-recording");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Path", rec->path);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Samples-Out", "%ld", (long) member->rec->fh.samples_out);
@ -411,9 +411,9 @@ void *SWITCH_THREAD_FUNC conf_record_thread_run(switch_thread_t *thread, void *o
switch_core_destroy_memory_pool(&pool);
}
switch_mutex_lock(conf_globals.hash_mutex);
conf_globals.threads--;
switch_mutex_unlock(conf_globals.hash_mutex);
switch_mutex_lock(conference_globals.hash_mutex);
conference_globals.threads--;
switch_mutex_unlock(conference_globals.hash_mutex);
switch_thread_rwlock_unlock(conference->rwlock);
return NULL;

View File

@ -41,7 +41,7 @@
*/
#include <mod_conference.h>
const char *conf_utils_combine_flag_var(switch_core_session_t *session, const char *var_name)
const char *conference_utils_combine_flag_var(switch_core_session_t *session, const char *var_name)
{
switch_event_header_t *hp;
switch_event_t *event, *cevent;
@ -85,7 +85,7 @@ const char *conf_utils_combine_flag_var(switch_core_session_t *session, const ch
}
void conf_utils_set_mflags(const char *flags, member_flag_t *f)
void conference_utils_set_mflags(const char *flags, member_flag_t *f)
{
if (flags) {
char *dup = strdup(flags);
@ -150,7 +150,7 @@ void conf_utils_set_mflags(const char *flags, member_flag_t *f)
void conf_utils_set_cflags(const char *flags, conference_flag_t *f)
void conference_utils_set_cflags(const char *flags, conference_flag_t *f)
{
if (flags) {
char *dup = strdup(flags);
@ -203,7 +203,7 @@ void conf_utils_set_cflags(const char *flags, conference_flag_t *f)
}
void conf_utils_clear_eflags(char *events, uint32_t *f)
void conference_utils_clear_eflags(char *events, uint32_t *f)
{
char buf[512] = "";
char *next = NULL;
@ -280,7 +280,7 @@ void conf_utils_clear_eflags(char *events, uint32_t *f)
}
void conf_utils_merge_mflags(member_flag_t *a, member_flag_t *b)
void conference_utils_merge_mflags(member_flag_t *a, member_flag_t *b)
{
int x;
@ -289,71 +289,71 @@ void conf_utils_merge_mflags(member_flag_t *a, member_flag_t *b)
}
}
void conf_utils_set_flag(conference_obj_t *conference, conference_flag_t flag)
void conference_utils_set_flag(conference_obj_t *conference, conference_flag_t flag)
{
conference->flags[flag] = 1;
}
void conf_utils_set_flag_locked(conference_obj_t *conference, conference_flag_t flag)
void conference_utils_set_flag_locked(conference_obj_t *conference, conference_flag_t flag)
{
switch_mutex_lock(conference->flag_mutex);
conference->flags[flag] = 1;
switch_mutex_unlock(conference->flag_mutex);
}
void conf_utils_clear_flag(conference_obj_t *conference, conference_flag_t flag)
void conference_utils_clear_flag(conference_obj_t *conference, conference_flag_t flag)
{
conference->flags[flag] = 0;
}
void conf_utils_clear_flag_locked(conference_obj_t *conference, conference_flag_t flag)
void conference_utils_clear_flag_locked(conference_obj_t *conference, conference_flag_t flag)
{
switch_mutex_lock(conference->flag_mutex);
conference->flags[flag] = 0;
switch_mutex_unlock(conference->flag_mutex);
}
switch_bool_t conf_utils_test_flag(conference_obj_t *conference, conference_flag_t flag)
switch_bool_t conference_utils_test_flag(conference_obj_t *conference, conference_flag_t flag)
{
return !!conference->flags[flag];
}
#if 0
void conf_utils_conf_utils_set_mflag(conference_obj_t *conference, member_flag_t mflag)
void conference_utils_conference_utils_set_mflag(conference_obj_t *conference, member_flag_t mflag)
{
conference->mflags[mflag] = 1;
}
void conf_utils_clear_mflag(conference_obj_t *conference, member_flag_t mflag)
void conference_utils_clear_mflag(conference_obj_t *conference, member_flag_t mflag)
{
conference->mflags[mflag] = 0;
}
switch_bool_t conf_utils_test_mflag(conference_obj_t *conference, member_flag_t mflag)
switch_bool_t conference_utils_test_mflag(conference_obj_t *conference, member_flag_t mflag)
{
return !!conference->mflags[mflag];
}
#endif
void conf_utils_member_set_flag(conf_member_t *member, member_flag_t flag)
void conference_utils_member_set_flag(conference_member_t *member, member_flag_t flag)
{
member->flags[flag] = 1;
}
void conf_utils_member_set_flag_locked(conf_member_t *member, member_flag_t flag)
void conference_utils_member_set_flag_locked(conference_member_t *member, member_flag_t flag)
{
switch_mutex_lock(member->flag_mutex);
member->flags[flag] = 1;
switch_mutex_unlock(member->flag_mutex);
}
void conf_utils_member_clear_flag(conf_member_t *member, member_flag_t flag)
void conference_utils_member_clear_flag(conference_member_t *member, member_flag_t flag)
{
member->flags[flag] = 0;
}
void conf_utils_member_clear_flag_locked(conf_member_t *member, member_flag_t flag)
void conference_utils_member_clear_flag_locked(conference_member_t *member, member_flag_t flag)
{
switch_mutex_lock(member->flag_mutex);
member->flags[flag] = 0;
switch_mutex_unlock(member->flag_mutex);
}
switch_bool_t conf_utils_member_test_flag(conf_member_t *member, member_flag_t flag)
switch_bool_t conference_utils_member_test_flag(conference_member_t *member, member_flag_t flag)
{
return !!member->flags[flag];
}

File diff suppressed because it is too large Load Diff

View File

@ -103,7 +103,7 @@
//#define lock_member(_member) switch_mutex_lock(_member->write_mutex)
//#define unlock_member(_member) switch_mutex_unlock(_member->write_mutex)
#define CONFFUNCAPISIZE (sizeof(conf_api_sub_commands)/sizeof(conf_api_sub_commands[0]))
#define CONFFUNCAPISIZE (sizeof(conference_api_sub_commands)/sizeof(conference_api_sub_commands[0]))
#define MAX_MUX_CODECS 10
@ -119,7 +119,7 @@
/* STRUCTS */
struct conf_fps {
struct conference_fps {
float fps;
int ms;
int samples;
@ -129,7 +129,7 @@ struct conf_fps {
typedef enum {
CONF_SILENT_REQ = (1 << 0),
CONF_SILENT_DONE = (1 << 1)
} conf_app_flag_t;
} conference_app_flag_t;
extern char *mod_conference_cf_name;
extern char *api_syntax;
@ -142,7 +142,7 @@ typedef enum {
} file_stop_t;
/* Global Values */
typedef struct conf_globals_s {
typedef struct conference_globals_s {
switch_memory_pool_t *conference_pool;
switch_mutex_t *conference_mutex;
switch_hash_t *conference_hash;
@ -153,13 +153,13 @@ typedef struct conf_globals_s {
int32_t running;
uint32_t threads;
switch_event_channel_id_t event_channel_id;
} conf_globals_t;
} conference_globals_t;
extern conf_globals_t conf_globals;
extern conference_globals_t conference_globals;
/* forward declaration for conference_obj and caller_control */
struct conference_member;
typedef struct conference_member conf_member_t;
typedef struct conference_member conference_member_t;
struct caller_control_actions;
@ -249,17 +249,17 @@ typedef enum {
CFLAG_MAX
} conference_flag_t;
typedef struct conf_cdr_node_s {
typedef struct conference_cdr_node_s {
switch_caller_profile_t *cp;
char *record_path;
switch_time_t join_time;
switch_time_t leave_time;
member_flag_t mflags[MFLAG_MAX];
uint32_t id;
conf_member_t *member;
conference_member_t *member;
switch_event_t *var_event;
struct conf_cdr_node_s *next;
} conf_cdr_node_t;
struct conference_cdr_node_s *next;
} conference_cdr_node_t;
typedef enum {
CDRR_LOCKED = 1,
@ -267,12 +267,12 @@ typedef enum {
CDRR_MAXMEMBERS
} cdr_reject_reason_t;
typedef struct conf_cdr_reject_s {
typedef struct conference_cdr_reject_s {
switch_caller_profile_t *cp;
switch_time_t reject_time;
cdr_reject_reason_t reason;
struct conf_cdr_reject_s *next;
} conf_cdr_reject_t;
struct conference_cdr_reject_s *next;
} conference_cdr_reject_t;
typedef enum {
CDRE_NONE,
@ -353,7 +353,7 @@ typedef struct al_handle_s {
ALfloat pos_z;
} al_handle_t;
void conf_al_close(al_handle_t *al);
void conference_al_close(al_handle_t *al);
#else
typedef struct al_handle_s {
int unsupported;
@ -388,14 +388,14 @@ typedef enum {
} recording_action_type_t;
/* conference xml config sections */
typedef struct conf_xml_cfg {
typedef struct conference_xml_cfg {
switch_xml_t profile;
switch_xml_t controls;
} conf_xml_cfg_t;
} conference_xml_cfg_t;
struct vid_helper {
conf_member_t *member_a;
conf_member_t *member_b;
conference_member_t *member_a;
conference_member_t *member_b;
int up;
};
@ -496,13 +496,13 @@ typedef struct conference_record {
switch_bool_t autorec;
struct conference_record *next;
switch_file_handle_t fh;
} conf_record_t;
} conference_record_t;
typedef enum {
CONF_VIDEO_MODE_PASSTHROUGH,
CONF_VIDEO_MODE_TRANSCODE,
CONF_VIDEO_MODE_MUX
} conf_video_mode_t;
} conference_video_mode_t;
/* Conference Object */
typedef struct conference_obj {
@ -540,7 +540,7 @@ typedef struct conference_obj {
char *video_super_canvas_bgcolor;
char *video_letterbox_bgcolor;
char *no_video_avatar;
conf_video_mode_t conf_video_mode;
conference_video_mode_t conference_video_mode;
int members_with_video;
int members_with_avatar;
switch_codec_settings_t video_codec_settings;
@ -569,8 +569,8 @@ typedef struct conference_obj {
uint32_t interval;
uint32_t channels;
switch_mutex_t *mutex;
conf_member_t *members;
conf_member_t *floor_holder;
conference_member_t *members;
conference_member_t *floor_holder;
uint32_t video_floor_holder;
uint32_t last_video_floor_holder;
switch_mutex_t *member_mutex;
@ -598,8 +598,8 @@ typedef struct conference_obj {
int end_count;
uint32_t count_ghosts;
/* allow extra time after 'endconf' member leaves */
switch_time_t endconf_time;
int endconf_grace_time;
switch_time_t endconference_time;
int endconference_grace_time;
uint32_t relationship_total;
uint32_t score;
@ -614,15 +614,15 @@ typedef struct conference_obj {
char *uuid_str;
uint32_t originating;
switch_call_cause_t cancel_cause;
conf_cdr_node_t *cdr_nodes;
conf_cdr_reject_t *cdr_rejected;
conference_cdr_node_t *cdr_nodes;
conference_cdr_reject_t *cdr_rejected;
switch_time_t start_time;
switch_time_t end_time;
char *log_dir;
cdr_event_mode_t cdr_event_mode;
struct vid_helper vh[2];
struct vid_helper mh;
conf_record_t *rec_node_head;
conference_record_t *rec_node_head;
int last_speech_channels;
mcu_canvas_t *canvas;
mcu_canvas_t *canvases[MAX_CANVASES+1];
@ -633,7 +633,7 @@ typedef struct conference_obj {
switch_mutex_t *canvas_mutex;
switch_hash_t *layout_hash;
switch_hash_t *layout_group_hash;
struct conf_fps video_fps;
struct conference_fps video_fps;
int playing_video_file;
int recording_members;
uint32_t video_floor_packets;
@ -673,7 +673,7 @@ struct conference_member {
switch_codec_t write_codec;
char *rec_path;
switch_time_t rec_time;
conf_record_t *rec;
conference_record_t *rec;
uint8_t *frame;
uint8_t *last_frame;
uint32_t frame_size;
@ -702,7 +702,7 @@ struct conference_member {
uint32_t avg_tally;
struct conference_member *next;
switch_ivr_dmachine_t *dmachine;
conf_cdr_node_t *cdr_node;
conference_cdr_node_t *cdr_node;
char *kicked_sound;
switch_queue_t *dtmf_queue;
switch_queue_t *video_queue;
@ -762,17 +762,17 @@ typedef struct codec_set_s {
uint8_t *packet;
} codec_set_t;
typedef void (*conf_key_callback_t) (conf_member_t *, struct caller_control_actions *);
typedef void (*conference_key_callback_t) (conference_member_t *, struct caller_control_actions *);
typedef struct {
conf_member_t *member;
conference_member_t *member;
caller_control_action_t action;
conf_key_callback_t handler;
conference_key_callback_t handler;
} key_binding_t;
struct _mapping {
const char *name;
conf_key_callback_t handler;
conference_key_callback_t handler;
};
typedef enum {
@ -825,126 +825,126 @@ struct bg_call {
/* FUNCTION DEFINITIONS */
switch_bool_t conf_utils_test_flag(conference_obj_t *conference, conference_flag_t flag);
conference_relationship_t *conf_member_get_relationship(conf_member_t *member, conf_member_t *other_member);
switch_bool_t conference_utils_test_flag(conference_obj_t *conference, conference_flag_t flag);
conference_relationship_t *conference_member_get_relationship(conference_member_t *member, conference_member_t *other_member);
uint32_t next_member_id(void);
void conf_utils_set_cflags(const char *flags, conference_flag_t *f);
void conf_utils_set_mflags(const char *flags, member_flag_t *f);
void conf_utils_merge_mflags(member_flag_t *a, member_flag_t *b);
void conf_utils_clear_eflags(char *events, uint32_t *f);
void conf_event_pres_handler(switch_event_t *event);
void conf_data_event_handler(switch_event_t *event);
void conf_event_call_setup_handler(switch_event_t *event);
void conf_member_add_file_data(conf_member_t *member, int16_t *data, switch_size_t file_data_len);
void conf_send_notify(conference_obj_t *conference, const char *status, const char *call_id, switch_bool_t final);
void conference_utils_set_cflags(const char *flags, conference_flag_t *f);
void conference_utils_set_mflags(const char *flags, member_flag_t *f);
void conference_utils_merge_mflags(member_flag_t *a, member_flag_t *b);
void conference_utils_clear_eflags(char *events, uint32_t *f);
void conference_event_pres_handler(switch_event_t *event);
void conference_data_event_handler(switch_event_t *event);
void conference_event_call_setup_handler(switch_event_t *event);
void conference_member_add_file_data(conference_member_t *member, int16_t *data, switch_size_t file_data_len);
void conference_send_notify(conference_obj_t *conference, const char *status, const char *call_id, switch_bool_t final);
switch_status_t conference_file_close(conference_obj_t *conference, conference_file_node_t *node);
void *SWITCH_THREAD_FUNC conf_record_thread_run(switch_thread_t *thread, void *obj);
void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *thread, void *obj);
void conf_al_gen_arc(conference_obj_t *conference, switch_stream_handle_t *stream);
void conf_al_process(al_handle_t *al, void *data, switch_size_t datalen, int rate);
void conference_al_gen_arc(conference_obj_t *conference, switch_stream_handle_t *stream);
void conference_al_process(al_handle_t *al, void *data, switch_size_t datalen, int rate);
void conf_utils_member_set_flag_locked(conf_member_t *member, member_flag_t flag);
void conf_utils_member_set_flag(conf_member_t *member, member_flag_t flag);
void conference_utils_member_set_flag_locked(conference_member_t *member, member_flag_t flag);
void conference_utils_member_set_flag(conference_member_t *member, member_flag_t flag);
void conf_member_update_status_field(conf_member_t *member);
void conf_video_vmute_snap(conf_member_t *member, switch_bool_t clear);
void conf_video_reset_video_bitrate_counters(conf_member_t *member);
void conf_video_clear_layer(mcu_layer_t *layer);
int conf_member_get_canvas_id(conf_member_t *member, const char *val, switch_bool_t watching);
void conf_video_reset_member_codec_index(conf_member_t *member);
void conf_video_detach_video_layer(conf_member_t *member);
void conf_utils_set_flag(conference_obj_t *conference, conference_flag_t flag);
void conf_utils_set_flag_locked(conference_obj_t *conference, conference_flag_t flag);
void conf_utils_clear_flag(conference_obj_t *conference, conference_flag_t flag);
void conf_utils_clear_flag_locked(conference_obj_t *conference, conference_flag_t flag);
switch_status_t conf_loop_dmachine_dispatcher(switch_ivr_dmachine_match_t *match);
void conference_member_update_status_field(conference_member_t *member);
void conference_video_vmute_snap(conference_member_t *member, switch_bool_t clear);
void conference_video_reset_video_bitrate_counters(conference_member_t *member);
void conference_video_clear_layer(mcu_layer_t *layer);
int conference_member_get_canvas_id(conference_member_t *member, const char *val, switch_bool_t watching);
void conference_video_reset_member_codec_index(conference_member_t *member);
void conference_video_detach_video_layer(conference_member_t *member);
void conference_utils_set_flag(conference_obj_t *conference, conference_flag_t flag);
void conference_utils_set_flag_locked(conference_obj_t *conference, conference_flag_t flag);
void conference_utils_clear_flag(conference_obj_t *conference, conference_flag_t flag);
void conference_utils_clear_flag_locked(conference_obj_t *conference, conference_flag_t flag);
switch_status_t conference_loop_dmachine_dispatcher(switch_ivr_dmachine_match_t *match);
int conf_member_setup_media(conf_member_t *member, conference_obj_t *conference);
int conference_member_setup_media(conference_member_t *member, conference_obj_t *conference);
al_handle_t *conf_al_create(switch_memory_pool_t *pool);
switch_status_t conf_member_parse_position(conf_member_t *member, const char *data);
video_layout_t *conf_video_find_best_layout(conference_obj_t *conference, layout_group_t *lg, uint32_t count);
void conf_list_count_only(conference_obj_t *conference, switch_stream_handle_t *stream);
void conf_member_set_floor_holder(conference_obj_t *conference, conf_member_t *member);
void conf_utils_member_clear_flag(conf_member_t *member, member_flag_t flag);
void conf_utils_member_clear_flag_locked(conf_member_t *member, member_flag_t flag);
switch_status_t conf_video_attach_video_layer(conf_member_t *member, mcu_canvas_t *canvas, int idx);
int conf_video_set_fps(conference_obj_t *conference, float fps);
void conf_video_layer_set_logo(conf_member_t *member, mcu_layer_t *layer, const char *path);
void conf_video_layer_set_banner(conf_member_t *member, mcu_layer_t *layer, const char *text);
void conf_fnode_seek(conference_file_node_t *fnode, switch_stream_handle_t *stream, char *arg);
uint32_t conf_member_stop_file(conf_member_t *member, file_stop_t stop);
switch_bool_t conf_utils_member_test_flag(conf_member_t *member, member_flag_t flag);
void conf_list_pretty(conference_obj_t *conference, switch_stream_handle_t *stream);
switch_status_t conf_record_stop(conference_obj_t *conference, switch_stream_handle_t *stream, char *path);
switch_status_t conf_record_action(conference_obj_t *conference, char *path, recording_action_type_t action);
void conf_xlist(conference_obj_t *conference, switch_xml_t x_conference, int off);
void conf_event_send_json(conference_obj_t *conference);
void conf_event_send_rfc(conference_obj_t *conference);
void conf_member_update_status_field(conf_member_t *member);
void conf_event_la_command_handler(switch_live_array_t *la, const char *cmd, const char *sessid, cJSON *jla, void *user_data);
void conf_event_adv_la(conference_obj_t *conference, conf_member_t *member, switch_bool_t join);
switch_status_t conf_video_init_canvas(conference_obj_t *conference, video_layout_t *vlayout, mcu_canvas_t **canvasP);
switch_status_t conf_video_attach_canvas(conference_obj_t *conference, mcu_canvas_t *canvas, int super);
void conf_video_init_canvas_layers(conference_obj_t *conference, mcu_canvas_t *canvas, video_layout_t *vlayout);
switch_status_t conf_video_attach_video_layer(conf_member_t *member, mcu_canvas_t *canvas, int idx);
void conf_video_reset_video_bitrate_counters(conf_member_t *member);
void conf_video_layer_set_banner(conf_member_t *member, mcu_layer_t *layer, const char *text);
void conf_video_layer_set_logo(conf_member_t *member, mcu_layer_t *layer, const char *path);
void conf_video_detach_video_layer(conf_member_t *member);
void conf_video_check_used_layers(mcu_canvas_t *canvas);
void conf_video_set_canvas_letterbox_bgcolor(mcu_canvas_t *canvas, char *color);
void conf_video_set_canvas_bgcolor(mcu_canvas_t *canvas, char *color);
void conf_video_scale_and_patch(mcu_layer_t *layer, switch_image_t *ximg, switch_bool_t freeze);
void conf_video_reset_layer(mcu_layer_t *layer);
void conf_video_clear_layer(mcu_layer_t *layer);
void conf_video_reset_image(switch_image_t *img, switch_rgb_color_t *color);
void conf_video_parse_layouts(conference_obj_t *conference, int WIDTH, int HEIGHT);
int conf_video_set_fps(conference_obj_t *conference, float fps);
video_layout_t *conf_video_get_layout(conference_obj_t *conference, const char *video_layout_name, const char *video_layout_group);
void conf_video_check_avatar(conf_member_t *member, switch_bool_t force);
void conf_video_find_floor(conf_member_t *member, switch_bool_t entering);
void conf_video_destroy_canvas(mcu_canvas_t **canvasP);
void conf_video_fnode_check(conference_file_node_t *fnode);
switch_status_t conf_al_parse_position(al_handle_t *al, const char *data);
switch_status_t conf_video_thread_callback(switch_core_session_t *session, switch_frame_t *frame, void *user_data);
void *SWITCH_THREAD_FUNC conf_video_muxing_write_thread_run(switch_thread_t *thread, void *obj);
void conf_member_check_agc_levels(conf_member_t *member);
void conf_member_clear_avg(conf_member_t *member);
int conf_member_noise_gate_check(conf_member_t *member);
void conf_member_check_channels(switch_frame_t *frame, conf_member_t *member, switch_bool_t in);
al_handle_t *conference_al_create(switch_memory_pool_t *pool);
switch_status_t conference_member_parse_position(conference_member_t *member, const char *data);
video_layout_t *conference_video_find_best_layout(conference_obj_t *conference, layout_group_t *lg, uint32_t count);
void conference_list_count_only(conference_obj_t *conference, switch_stream_handle_t *stream);
void conference_member_set_floor_holder(conference_obj_t *conference, conference_member_t *member);
void conference_utils_member_clear_flag(conference_member_t *member, member_flag_t flag);
void conference_utils_member_clear_flag_locked(conference_member_t *member, member_flag_t flag);
switch_status_t conference_video_attach_video_layer(conference_member_t *member, mcu_canvas_t *canvas, int idx);
int conference_video_set_fps(conference_obj_t *conference, float fps);
void conference_video_layer_set_logo(conference_member_t *member, mcu_layer_t *layer, const char *path);
void conference_video_layer_set_banner(conference_member_t *member, mcu_layer_t *layer, const char *text);
void conference_fnode_seek(conference_file_node_t *fnode, switch_stream_handle_t *stream, char *arg);
uint32_t conference_member_stop_file(conference_member_t *member, file_stop_t stop);
switch_bool_t conference_utils_member_test_flag(conference_member_t *member, member_flag_t flag);
void conference_list_pretty(conference_obj_t *conference, switch_stream_handle_t *stream);
switch_status_t conference_record_stop(conference_obj_t *conference, switch_stream_handle_t *stream, char *path);
switch_status_t conference_record_action(conference_obj_t *conference, char *path, recording_action_type_t action);
void conference_xlist(conference_obj_t *conference, switch_xml_t x_conference, int off);
void conference_event_send_json(conference_obj_t *conference);
void conference_event_send_rfc(conference_obj_t *conference);
void conference_member_update_status_field(conference_member_t *member);
void conference_event_la_command_handler(switch_live_array_t *la, const char *cmd, const char *sessid, cJSON *jla, void *user_data);
void conference_event_adv_la(conference_obj_t *conference, conference_member_t *member, switch_bool_t join);
switch_status_t conference_video_init_canvas(conference_obj_t *conference, video_layout_t *vlayout, mcu_canvas_t **canvasP);
switch_status_t conference_video_attach_canvas(conference_obj_t *conference, mcu_canvas_t *canvas, int super);
void conference_video_init_canvas_layers(conference_obj_t *conference, mcu_canvas_t *canvas, video_layout_t *vlayout);
switch_status_t conference_video_attach_video_layer(conference_member_t *member, mcu_canvas_t *canvas, int idx);
void conference_video_reset_video_bitrate_counters(conference_member_t *member);
void conference_video_layer_set_banner(conference_member_t *member, mcu_layer_t *layer, const char *text);
void conference_video_layer_set_logo(conference_member_t *member, mcu_layer_t *layer, const char *path);
void conference_video_detach_video_layer(conference_member_t *member);
void conference_video_check_used_layers(mcu_canvas_t *canvas);
void conference_video_set_canvas_letterbox_bgcolor(mcu_canvas_t *canvas, char *color);
void conference_video_set_canvas_bgcolor(mcu_canvas_t *canvas, char *color);
void conference_video_scale_and_patch(mcu_layer_t *layer, switch_image_t *ximg, switch_bool_t freeze);
void conference_video_reset_layer(mcu_layer_t *layer);
void conference_video_clear_layer(mcu_layer_t *layer);
void conference_video_reset_image(switch_image_t *img, switch_rgb_color_t *color);
void conference_video_parse_layouts(conference_obj_t *conference, int WIDTH, int HEIGHT);
int conference_video_set_fps(conference_obj_t *conference, float fps);
video_layout_t *conference_video_get_layout(conference_obj_t *conference, const char *video_layout_name, const char *video_layout_group);
void conference_video_check_avatar(conference_member_t *member, switch_bool_t force);
void conference_video_find_floor(conference_member_t *member, switch_bool_t entering);
void conference_video_destroy_canvas(mcu_canvas_t **canvasP);
void conference_video_fnode_check(conference_file_node_t *fnode);
switch_status_t conference_al_parse_position(al_handle_t *al, const char *data);
switch_status_t conference_video_thread_callback(switch_core_session_t *session, switch_frame_t *frame, void *user_data);
void *SWITCH_THREAD_FUNC conference_video_muxing_write_thread_run(switch_thread_t *thread, void *obj);
void conference_member_check_agc_levels(conference_member_t *member);
void conference_member_clear_avg(conference_member_t *member);
int conference_member_noise_gate_check(conference_member_t *member);
void conference_member_check_channels(switch_frame_t *frame, conference_member_t *member, switch_bool_t in);
void conf_fnode_toggle_pause(conference_file_node_t *fnode, switch_stream_handle_t *stream);
void conference_fnode_toggle_pause(conference_file_node_t *fnode, switch_stream_handle_t *stream);
// static conference_relationship_t *conf_member_get_relationship(conf_member_t *member, conf_member_t *other_member);
// static conference_relationship_t *conference_member_get_relationship(conference_member_t *member, conference_member_t *other_member);
// static void conference_list(conference_obj_t *conference, switch_stream_handle_t *stream, char *delim);
conference_relationship_t *conf_member_add_relationship(conf_member_t *member, uint32_t id);
conf_member_t *conf_member_get(conference_obj_t *conference, uint32_t id);
conference_relationship_t *conference_member_add_relationship(conference_member_t *member, uint32_t id);
conference_member_t *conference_member_get(conference_obj_t *conference, uint32_t id);
switch_status_t conf_member_del_relationship(conf_member_t *member, uint32_t id);
switch_status_t conf_member_add(conference_obj_t *conference, conf_member_t *member);
switch_status_t conf_member_del(conference_obj_t *conference, conf_member_t *member);
void *SWITCH_THREAD_FUNC conf_thread_run(switch_thread_t *thread, void *obj);
void *SWITCH_THREAD_FUNC conf_video_muxing_thread_run(switch_thread_t *thread, void *obj);
void *SWITCH_THREAD_FUNC conf_video_super_muxing_thread_run(switch_thread_t *thread, void *obj);
void conf_loop_output(conf_member_t *member);
switch_status_t conference_member_del_relationship(conference_member_t *member, uint32_t id);
switch_status_t conference_member_add(conference_obj_t *conference, conference_member_t *member);
switch_status_t conference_member_del(conference_obj_t *conference, conference_member_t *member);
void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *obj);
void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thread, void *obj);
void *SWITCH_THREAD_FUNC conference_video_super_muxing_thread_run(switch_thread_t *thread, void *obj);
void conference_loop_output(conference_member_t *member);
uint32_t conference_file_stop(conference_obj_t *conference, file_stop_t stop);
switch_status_t conference_file_play(conference_obj_t *conference, char *file, uint32_t leadin, switch_channel_t *channel, uint8_t async);
void conf_member_send_all_dtmf(conf_member_t *member, conference_obj_t *conference, const char *dtmf);
switch_status_t conf_say(conference_obj_t *conference, const char *text, uint32_t leadin);
conference_obj_t *conf_find(char *name, char *domain);
void conf_member_bind_controls(conf_member_t *member, const char *controls);
void conf_send_presence(conference_obj_t *conference);
void conf_video_set_floor_holder(conference_obj_t *conference, conf_member_t *member, switch_bool_t force);
void conf_video_canvas_del_fnode_layer(conference_obj_t *conference, conference_file_node_t *fnode);
void conf_video_canvas_set_fnode_layer(mcu_canvas_t *canvas, conference_file_node_t *fnode, int idx);
void conference_member_send_all_dtmf(conference_member_t *member, conference_obj_t *conference, const char *dtmf);
switch_status_t conference_say(conference_obj_t *conference, const char *text, uint32_t leadin);
conference_obj_t *conference_find(char *name, char *domain);
void conference_member_bind_controls(conference_member_t *member, const char *controls);
void conference_send_presence(conference_obj_t *conference);
void conference_video_set_floor_holder(conference_obj_t *conference, conference_member_t *member, switch_bool_t force);
void conference_video_canvas_del_fnode_layer(conference_obj_t *conference, conference_file_node_t *fnode);
void conference_video_canvas_set_fnode_layer(mcu_canvas_t *canvas, conference_file_node_t *fnode, int idx);
void conference_list(conference_obj_t *conference, switch_stream_handle_t *stream, char *delim);
const char *conf_utils_combine_flag_var(switch_core_session_t *session, const char *var_name);
int conf_loop_mapping_len();
const char *conference_utils_combine_flag_var(switch_core_session_t *session, const char *var_name);
int conference_loop_mapping_len();
switch_status_t conf_outcall(conference_obj_t *conference,
switch_status_t conference_outcall(conference_obj_t *conference,
char *conference_name,
switch_core_session_t *session,
char *bridgeto, uint32_t timeout,
@ -954,139 +954,139 @@ switch_status_t conf_outcall(conference_obj_t *conference,
char *profile,
switch_call_cause_t *cause,
switch_call_cause_t *cancel_cause, switch_event_t *var_event);
switch_status_t conf_outcall_bg(conference_obj_t *conference,
switch_status_t conference_outcall_bg(conference_obj_t *conference,
char *conference_name,
switch_core_session_t *session, char *bridgeto, uint32_t timeout, const char *flags, const char *cid_name,
const char *cid_num, const char *call_uuid, const char *profile, switch_call_cause_t *cancel_cause,
switch_event_t **var_event);
void conf_video_launch_muxing_thread(conference_obj_t *conference, mcu_canvas_t *canvas, int super);
void conf_launch_thread(conference_obj_t *conference);
void conf_video_launch_muxing_write_thread(conf_member_t *member);
void *SWITCH_THREAD_FUNC conf_loop_input(switch_thread_t *thread, void *obj);
void conference_video_launch_muxing_thread(conference_obj_t *conference, mcu_canvas_t *canvas, int super);
void conference_launch_thread(conference_obj_t *conference);
void conference_video_launch_muxing_write_thread(conference_member_t *member);
void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, void *obj);
switch_status_t conference_file_local_play(conference_obj_t *conference, switch_core_session_t *session, char *path, uint32_t leadin, void *buf,
uint32_t buflen);
switch_status_t conf_member_play_file(conf_member_t *member, char *file, uint32_t leadin, switch_bool_t mux);
switch_status_t conf_member_say(conf_member_t *member, char *text, uint32_t leadin);
uint32_t conf_member_stop_file(conf_member_t *member, file_stop_t stop);
conference_obj_t *conf_new(char *name, conf_xml_cfg_t cfg, switch_core_session_t *session, switch_memory_pool_t *pool);
switch_status_t conference_member_play_file(conference_member_t *member, char *file, uint32_t leadin, switch_bool_t mux);
switch_status_t conference_member_say(conference_member_t *member, char *text, uint32_t leadin);
uint32_t conference_member_stop_file(conference_member_t *member, file_stop_t stop);
conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_core_session_t *session, switch_memory_pool_t *pool);
switch_status_t chat_send(switch_event_t *message_event);
void conf_record_launch_thread(conference_obj_t *conference, char *path, switch_bool_t autorec);
void conference_record_launch_thread(conference_obj_t *conference, char *path, switch_bool_t autorec);
typedef switch_status_t (*conf_api_args_cmd_t) (conference_obj_t *, switch_stream_handle_t *, int, char **);
typedef switch_status_t (*conf_api_member_cmd_t) (conf_member_t *, switch_stream_handle_t *, void *);
typedef switch_status_t (*conf_api_text_cmd_t) (conference_obj_t *, switch_stream_handle_t *, const char *);
typedef switch_status_t (*conference_api_args_cmd_t) (conference_obj_t *, switch_stream_handle_t *, int, char **);
typedef switch_status_t (*conference_api_member_cmd_t) (conference_member_t *, switch_stream_handle_t *, void *);
typedef switch_status_t (*conference_api_text_cmd_t) (conference_obj_t *, switch_stream_handle_t *, const char *);
switch_status_t conf_event_add_data(conference_obj_t *conference, switch_event_t *event);
switch_status_t conf_member_add_event_data(conf_member_t *member, switch_event_t *event);
switch_status_t conference_event_add_data(conference_obj_t *conference, switch_event_t *event);
switch_status_t conference_member_add_event_data(conference_member_t *member, switch_event_t *event);
cJSON *conf_cdr_json_render(conference_obj_t *conference, cJSON *req);
char *conf_cdr_rfc4579_render(conference_obj_t *conference, switch_event_t *event, switch_event_t *revent);
void conf_cdr_del(conf_member_t *member);
void conf_cdr_add(conf_member_t *member);
void conf_cdr_rejected(conference_obj_t *conference, switch_channel_t *channel, cdr_reject_reason_t reason);
void conf_cdr_render(conference_obj_t *conference);
void conf_event_channel_handler(const char *event_channel, cJSON *json, const char *key, switch_event_channel_id_t id);
void conf_event_la_channel_handler(const char *event_channel, cJSON *json, const char *key, switch_event_channel_id_t id);
void conf_event_mod_channel_handler(const char *event_channel, cJSON *json, const char *key, switch_event_channel_id_t id);
cJSON *conference_cdr_json_render(conference_obj_t *conference, cJSON *req);
char *conference_cdr_rfc4579_render(conference_obj_t *conference, switch_event_t *event, switch_event_t *revent);
void conference_cdr_del(conference_member_t *member);
void conference_cdr_add(conference_member_t *member);
void conference_cdr_rejected(conference_obj_t *conference, switch_channel_t *channel, cdr_reject_reason_t reason);
void conference_cdr_render(conference_obj_t *conference);
void conference_event_channel_handler(const char *event_channel, cJSON *json, const char *key, switch_event_channel_id_t id);
void conference_event_la_channel_handler(const char *event_channel, cJSON *json, const char *key, switch_event_channel_id_t id);
void conference_event_mod_channel_handler(const char *event_channel, cJSON *json, const char *key, switch_event_channel_id_t id);
void conf_member_itterator(conference_obj_t *conference, switch_stream_handle_t *stream, uint8_t non_mod, conf_api_member_cmd_t pfncallback, void *data);
void conference_member_itterator(conference_obj_t *conference, switch_stream_handle_t *stream, uint8_t non_mod, conference_api_member_cmd_t pfncallback, void *data);
switch_status_t conf_api_sub_mute(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_tmute(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_unmute(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_vmute(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_tvmute(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_unvmute(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_deaf(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_undeaf(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_floor(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_vid_floor(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_clear_vid_floor(conference_obj_t *conference, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_position(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_conf_video_vmute_snap(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_dtmf(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_pause_play(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_play(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_say(conference_obj_t *conference, switch_stream_handle_t *stream, const char *text);
switch_status_t conf_api_sub_dial(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_agc(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_bgdial(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_auto_position(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_saymember(conference_obj_t *conference, switch_stream_handle_t *stream, const char *text);
switch_status_t conf_api_sub_check_record(conference_obj_t *conference, switch_stream_handle_t *stream, int arc, char **argv);
switch_status_t conf_api_sub_check_record(conference_obj_t *conference, switch_stream_handle_t *stream, int arc, char **argv);
switch_status_t conf_api_sub_volume_in(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_file_seek(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_stop(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_hup(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_pauserec(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_volume_out(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_lock(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_unlock(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_relate(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_pin(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_exit_sound(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_vid_banner(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_enter_sound(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_set(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_vid_res_id(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_get(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_vid_mute_img(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_vid_logo_img(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_vid_fps(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_write_png(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_file_vol(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_recording(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_vid_layout(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_list(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_xml_list(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_energy(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_watching_canvas(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_canvas(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_layer(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_kick(conf_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conf_api_sub_transfer(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_record(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_norecord(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_sub_vid_bandwidth(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conf_api_dispatch(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv, const char *cmdline, int argn);
switch_status_t conf_api_sub_syntax(char **syntax);
switch_status_t conf_api_main_real(const char *cmd, switch_core_session_t *session, switch_stream_handle_t *stream);
switch_status_t conference_api_sub_mute(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_tmute(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_unmute(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_vmute(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_tvmute(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_unvmute(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_deaf(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_undeaf(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_floor(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_vid_floor(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_clear_vid_floor(conference_obj_t *conference, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_position(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_conference_video_vmute_snap(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_dtmf(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_pause_play(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_play(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_say(conference_obj_t *conference, switch_stream_handle_t *stream, const char *text);
switch_status_t conference_api_sub_dial(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_agc(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_bgdial(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_auto_position(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_saymember(conference_obj_t *conference, switch_stream_handle_t *stream, const char *text);
switch_status_t conference_api_sub_check_record(conference_obj_t *conference, switch_stream_handle_t *stream, int arc, char **argv);
switch_status_t conference_api_sub_check_record(conference_obj_t *conference, switch_stream_handle_t *stream, int arc, char **argv);
switch_status_t conference_api_sub_volume_in(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_file_seek(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_stop(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_hup(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_pauserec(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_volume_out(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_lock(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_unlock(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_relate(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_pin(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_exit_sound(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_vid_banner(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_enter_sound(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_set(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_vid_res_id(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_get(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_vid_mute_img(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_vid_logo_img(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_vid_fps(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_write_png(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_file_vol(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_recording(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_vid_layout(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_list(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_xml_list(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_energy(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_watching_canvas(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_canvas(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_layer(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_kick(conference_member_t *member, switch_stream_handle_t *stream, void *data);
switch_status_t conference_api_sub_transfer(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_record(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_norecord(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_sub_vid_bandwidth(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv);
switch_status_t conference_api_dispatch(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv, const char *cmdline, int argn);
switch_status_t conference_api_sub_syntax(char **syntax);
switch_status_t conference_api_main_real(const char *cmd, switch_core_session_t *session, switch_stream_handle_t *stream);
void conf_loop_mute_on(conf_member_t *member, caller_control_action_t *action);
void conf_loop_mute_toggle(conf_member_t *member, caller_control_action_t *action);
void conf_loop_energy_dn(conf_member_t *member, caller_control_action_t *action);
void conf_loop_energy_equ_conf(conf_member_t *member, caller_control_action_t *action);
void conf_loop_volume_talk_zero(conf_member_t *member, caller_control_action_t *action);
void conf_loop_volume_talk_up(conf_member_t *member, caller_control_action_t *action);
void conf_loop_volume_listen_dn(conf_member_t *member, caller_control_action_t *action);
void conf_loop_lock_toggle(conf_member_t *member, caller_control_action_t *action);
void conf_loop_volume_listen_up(conf_member_t *member, caller_control_action_t *action);
void conf_loop_volume_listen_zero(conf_member_t *member, caller_control_action_t *action);
void conf_loop_volume_talk_dn(conf_member_t *member, caller_control_action_t *action);
void conf_loop_energy_up(conf_member_t *member, caller_control_action_t *action);
void conf_loop_floor_toggle(conf_member_t *member, caller_control_action_t *action);
void conf_loop_vid_floor_toggle(conf_member_t *member, caller_control_action_t *action);
void conf_loop_energy_up(conf_member_t *member, caller_control_action_t *action);
void conf_loop_floor_toggle(conf_member_t *member, caller_control_action_t *action);
void conf_loop_vid_floor_force(conf_member_t *member, caller_control_action_t *action);
void conf_loop_vmute_off(conf_member_t *member, caller_control_action_t *action);
void conf_loop_conf_video_vmute_snap(conf_member_t *member, caller_control_action_t *action);
void conf_loop_conf_video_vmute_snapoff(conf_member_t *member, caller_control_action_t *action);
void conf_loop_vmute_toggle(conf_member_t *member, caller_control_action_t *action);
void conf_loop_vmute_on(conf_member_t *member, caller_control_action_t *action);
void conf_loop_deafmute_toggle(conf_member_t *member, caller_control_action_t *action);
void conf_loop_hangup(conf_member_t *member, caller_control_action_t *action);
void conf_loop_transfer(conf_member_t *member, caller_control_action_t *action);
void conf_loop_mute_off(conf_member_t *member, caller_control_action_t *action);
void conf_loop_event(conf_member_t *member, caller_control_action_t *action);
void conf_loop_transfer(conf_member_t *member, caller_control_action_t *action);
void conf_loop_exec_app(conf_member_t *member, caller_control_action_t *action);
void conference_loop_mute_on(conference_member_t *member, caller_control_action_t *action);
void conference_loop_mute_toggle(conference_member_t *member, caller_control_action_t *action);
void conference_loop_energy_dn(conference_member_t *member, caller_control_action_t *action);
void conference_loop_energy_equ_conf(conference_member_t *member, caller_control_action_t *action);
void conference_loop_volume_talk_zero(conference_member_t *member, caller_control_action_t *action);
void conference_loop_volume_talk_up(conference_member_t *member, caller_control_action_t *action);
void conference_loop_volume_listen_dn(conference_member_t *member, caller_control_action_t *action);
void conference_loop_lock_toggle(conference_member_t *member, caller_control_action_t *action);
void conference_loop_volume_listen_up(conference_member_t *member, caller_control_action_t *action);
void conference_loop_volume_listen_zero(conference_member_t *member, caller_control_action_t *action);
void conference_loop_volume_talk_dn(conference_member_t *member, caller_control_action_t *action);
void conference_loop_energy_up(conference_member_t *member, caller_control_action_t *action);
void conference_loop_floor_toggle(conference_member_t *member, caller_control_action_t *action);
void conference_loop_vid_floor_toggle(conference_member_t *member, caller_control_action_t *action);
void conference_loop_energy_up(conference_member_t *member, caller_control_action_t *action);
void conference_loop_floor_toggle(conference_member_t *member, caller_control_action_t *action);
void conference_loop_vid_floor_force(conference_member_t *member, caller_control_action_t *action);
void conference_loop_vmute_off(conference_member_t *member, caller_control_action_t *action);
void conference_loop_conference_video_vmute_snap(conference_member_t *member, caller_control_action_t *action);
void conference_loop_conference_video_vmute_snapoff(conference_member_t *member, caller_control_action_t *action);
void conference_loop_vmute_toggle(conference_member_t *member, caller_control_action_t *action);
void conference_loop_vmute_on(conference_member_t *member, caller_control_action_t *action);
void conference_loop_deafmute_toggle(conference_member_t *member, caller_control_action_t *action);
void conference_loop_hangup(conference_member_t *member, caller_control_action_t *action);
void conference_loop_transfer(conference_member_t *member, caller_control_action_t *action);
void conference_loop_mute_off(conference_member_t *member, caller_control_action_t *action);
void conference_loop_event(conference_member_t *member, caller_control_action_t *action);
void conference_loop_transfer(conference_member_t *member, caller_control_action_t *action);
void conference_loop_exec_app(conference_member_t *member, caller_control_action_t *action);
@ -1095,7 +1095,7 @@ void conf_loop_exec_app(conf_member_t *member, caller_control_action_t *action);
/* API Interface Function sub-commands */
/* Entries in this list should be kept in sync with the enum above */
extern api_command_t conf_api_sub_commands[];
extern api_command_t conference_api_sub_commands[];
extern struct _mapping control_mappings[];