diff --git a/conf/vanilla/autoload_configs/xml_rpc.conf.xml b/conf/vanilla/autoload_configs/xml_rpc.conf.xml
index 714a909907..c5c3354293 100644
--- a/conf/vanilla/autoload_configs/xml_rpc.conf.xml
+++ b/conf/vanilla/autoload_configs/xml_rpc.conf.xml
@@ -6,5 +6,11 @@
+
+
+
+
+
diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c
index 4fbce0152a..8c4886066f 100644
--- a/src/mod/applications/mod_conference/mod_conference.c
+++ b/src/mod/applications/mod_conference/mod_conference.c
@@ -9278,7 +9278,7 @@ SWITCH_STANDARD_APP(conference_function)
if (flags_str) {
set_mflags(flags_str,&mflags);
- if (!(mflags & MFLAG_CAN_SPEAK) && (mflags & MFLAG_INDICATE_MUTE)) {
+ if (!((mflags & MFLAG_CAN_SPEAK) && (mflags & MFLAG_INDICATE_MUTE))) {
switch_core_media_hard_mute(session, SWITCH_TRUE);
}
@@ -9579,7 +9579,7 @@ SWITCH_STANDARD_APP(conference_function)
set_mflags(flags_str, &mflags);
mflags |= MFLAG_RUNNING;
- if (!(mflags & MFLAG_CAN_SPEAK) && (mflags & MFLAG_INDICATE_MUTE)) {
+ if (!((mflags & MFLAG_CAN_SPEAK) && (mflags & MFLAG_INDICATE_MUTE))) {
switch_core_media_hard_mute(member.session, SWITCH_TRUE);
}
diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c
index 0a77f9869f..7fb0039188 100644
--- a/src/mod/endpoints/mod_verto/mod_verto.c
+++ b/src/mod/endpoints/mod_verto/mod_verto.c
@@ -3042,7 +3042,17 @@ static switch_bool_t verto__info_func(const char *method, cJSON *params, jsock_t
if ((dtmf = cJSON_GetObjectCstr(params, "dtmf"))) {
verto_pvt_t *tech_pvt = switch_core_session_get_private_class(session, SWITCH_PVT_SECONDARY);
char *send = switch_mprintf("~%s", dtmf);
- switch_channel_queue_dtmf_string(tech_pvt->channel, send);
+
+ if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MODE)) {
+ switch_core_session_t *other_session = NULL;
+
+ if (switch_core_session_get_partner(tech_pvt->session, &other_session) == SWITCH_STATUS_SUCCESS) {
+ switch_core_session_send_dtmf_string(other_session, send);
+ switch_core_session_rwunlock(other_session);
+ }
+ } else {
+ switch_channel_queue_dtmf_string(tech_pvt->channel, send);
+ }
free(send);
cJSON_AddItemToObject(*response, "message", cJSON_CreateString("SENT"));
}
diff --git a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
index 0951fc0d9c..c271ffb359 100644
--- a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
+++ b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
@@ -89,6 +89,7 @@ static struct {
TServer abyssServer;
xmlrpc_registry *registryP;
switch_bool_t enable_websocket;
+ char *commands_to_log;
} globals;
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_realm, globals.realm);
@@ -103,6 +104,8 @@ static switch_status_t do_config(void)
char *realm, *user, *pass, *default_domain;
default_domain = realm = user = pass = NULL;
+ globals.commands_to_log = NULL;
+
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", cf);
return SWITCH_STATUS_TERM;
@@ -130,6 +133,8 @@ static switch_status_t do_config(void)
globals.virtual_host = switch_true(val);
} else if (!strcasecmp(var, "enable-websocket")) {
globals.enable_websocket = switch_true(val);
+ } else if (!strcasecmp(var, "commands-to-log")) {
+ globals.commands_to_log = val;
}
}
}
@@ -800,6 +805,7 @@ abyss_bool handler_hook(TSession * r)
{
switch_stream_handle_t stream = { 0 };
char *command;
+ char *full_command;
int i;
char *fs_user = NULL, *fs_domain = NULL;
char *path_info = NULL;
@@ -1054,6 +1060,16 @@ abyss_bool handler_hook(TSession * r)
/* fs api command will write to stream, calling http_stream_write / http_stream_raw_write */
/* switch_api_execute will stream INVALID COMMAND before it fails */
switch_api_execute(command, api_str, NULL, &stream);
+
+ if (globals.commands_to_log != NULL) {
+ full_command = switch_mprintf("%s%s%s", command, (api_str==NULL ? "" : " "), api_str);
+
+ if (switch_regex_match(full_command, globals.commands_to_log) == SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Executed HTTP request command: [%s].\n", full_command);
+ }
+
+ switch_safe_free(full_command);
+ }
r->responseStarted = TRUE;
ResponseStatus(r, 200); /* we don't want an assertion failure */