diff --git a/applications/conference/src/conf_config_req.erl b/applications/conference/src/conf_config_req.erl index 91ce93293fa..c7bf484df89 100644 --- a/applications/conference/src/conf_config_req.erl +++ b/applications/conference/src/conf_config_req.erl @@ -60,9 +60,11 @@ handle_request(<<"Controls">>, JObj, Conference) -> handle_profile_request(JObj, Conference) -> ProfileName = requested_profile_name(JObj), Profile = lookup_profile(ProfileName, Conference), + Controls = conference_controls(Conference), ServerId = kz_api:server_id(JObj), Resp = [{<<"Profiles">>, kz_json:from_list([{ProfileName, Profile}])} + ,{<<"Caller-Controls">>, Controls} ,{<<"Advertise">>, advertise(ProfileName)} ,{<<"Chat-Permissions">>, chat_permissions(ProfileName)} ,{<<"Msg-ID">>, kz_api:msg_id(JObj)} @@ -252,3 +254,9 @@ requested_controls_name(JObj) -> controls(ControlsName, Controls) -> kz_json:from_list([{ControlsName, Controls}]). +conference_controls(Conference) -> + ControlNames = lists:usort([kapps_conference:caller_controls(Conference) + ,kapps_conference:moderator_controls(Conference) + ]), + kz_json:from_list([{Name, kapps_conference:controls(Conference, Name)} || Name <- ControlNames]). +