[core] Turn DTMF logging on or off using sensitive_dtmf var

This commit is contained in:
Visytel authored and GitHub committed 2020-02-12 23:44:35 +04:00
1 parent d3752173bf
commit b997c4fc8b
2 files changed
+11 -4

No files matched your search

+6 -2
View File
@@ -901,8 +901,12 @@ SWITCH_DECLARE(char *) CoreSession::getDigits(int maxdigits,
terminators,
&terminator,
(uint32_t) timeout, (uint32_t)interdigit, (uint32_t)abstimeout);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "getDigits dtmf_buf: %s\n", dtmf_buf);
/* Only log DTMF buffer if sensitive_dtmf channel variable not set to true */
if (!(switch_channel_var_true(switch_core_session_get_channel(session), SWITCH_SENSITIVE_DTMF_VARIABLE))) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "getDigits dtmf_buf: %s\n", dtmf_buf);
}
end_allow_threads();
return dtmf_buf;
}