FS-7855 pass userVariables back to the live array
This commit is contained in:
parent
9d070b5c98
commit
d262f07d0f
|
@ -417,8 +417,8 @@ void conference_event_adv_la(conference_obj_t *conference, conference_member_t *
|
||||||
|
|
||||||
switch_core_get_variables(&variables);
|
switch_core_get_variables(&variables);
|
||||||
for (hp = variables->headers; hp; hp = hp->next) {
|
for (hp = variables->headers; hp; hp = hp->next) {
|
||||||
if (!strncasecmp(hp->name, "conference_verto_", 11)) {
|
if (!strncasecmp(hp->name, "conference_verto_", 17)) {
|
||||||
char *var = hp->name + 11;
|
char *var = hp->name + 17;
|
||||||
if (var) {
|
if (var) {
|
||||||
cJSON_AddItemToObject(data, var, cJSON_CreateString(hp->value));
|
cJSON_AddItemToObject(data, var, cJSON_CreateString(hp->value));
|
||||||
}
|
}
|
||||||
|
|
|
@ -905,6 +905,10 @@ switch_status_t conference_member_add(conference_obj_t *conference, conference_m
|
||||||
|
|
||||||
if (conference->la && member->channel && !switch_channel_test_flag(member->channel, CF_VIDEO_ONLY)) {
|
if (conference->la && member->channel && !switch_channel_test_flag(member->channel, CF_VIDEO_ONLY)) {
|
||||||
if (!conference_utils_member_test_flag(member, MFLAG_SECOND_SCREEN)) {
|
if (!conference_utils_member_test_flag(member, MFLAG_SECOND_SCREEN)) {
|
||||||
|
cJSON *dvars;
|
||||||
|
switch_event_t *var_event;
|
||||||
|
switch_event_header_t *hi;
|
||||||
|
|
||||||
member->json = cJSON_CreateArray();
|
member->json = cJSON_CreateArray();
|
||||||
cJSON_AddItemToArray(member->json, cJSON_CreateStringPrintf("%0.4d", member->id));
|
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")));
|
cJSON_AddItemToArray(member->json, cJSON_CreateString(switch_channel_get_variable(member->channel, "caller_id_number")));
|
||||||
|
@ -915,12 +919,27 @@ switch_status_t conference_member_add(conference_obj_t *conference, conference_m
|
||||||
switch_channel_get_variable(member->channel, "original_read_rate")
|
switch_channel_get_variable(member->channel, "original_read_rate")
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
member->status_field = cJSON_CreateString("");
|
member->status_field = cJSON_CreateString("");
|
||||||
cJSON_AddItemToArray(member->json, member->status_field);
|
cJSON_AddItemToArray(member->json, member->status_field);
|
||||||
|
|
||||||
|
switch_channel_get_variables(member->channel, &var_event);
|
||||||
|
|
||||||
|
dvars = cJSON_CreateObject();
|
||||||
|
|
||||||
|
for (hi = var_event->headers; hi; hi = hi->next) {
|
||||||
|
if (!strncasecmp(hi->name, "verto_dvar_", 11)) {
|
||||||
|
char *var = hi->name + 11;
|
||||||
|
|
||||||
|
if (var) {
|
||||||
|
cJSON_AddItemToObject(dvars, var, cJSON_CreateString(hi->value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cJSON_AddItemToArray(member->json, dvars);
|
||||||
|
|
||||||
|
switch_event_destroy(&var_event);
|
||||||
|
|
||||||
cJSON_AddItemToArray(member->json, cJSON_CreateNull());
|
cJSON_AddItemToArray(member->json, cJSON_CreateNull());
|
||||||
|
|
||||||
conference_member_update_status_field(member);
|
conference_member_update_status_field(member);
|
||||||
|
|
Loading…
Reference in New Issue