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

This commit is contained in:
Visytel
2020-02-13 06:44:35 +11:00
committed by GitHub
parent d3752173bf
commit b997c4fc8b
2 changed files with 11 additions and 4 deletions

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;
}