[core] Turn DTMF logging on or off using sensitive_dtmf var
This commit is contained in:
parent
d3752173bf
commit
b997c4fc8b
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -7958,9 +7958,12 @@ SWITCH_DECLARE(switch_size_t) switch_rtp_dequeue_dtmf(switch_rtp_t *rtp_session,
|
|||
switch_mutex_lock(rtp_session->dtmf_data.dtmf_mutex);
|
||||
if (switch_queue_trypop(rtp_session->dtmf_data.dtmf_inqueue, &pop) == SWITCH_STATUS_SUCCESS) {
|
||||
|
||||
_dtmf = (switch_dtmf_t *) pop;
|
||||
_dtmf = (switch_dtmf_t *)pop;
|
||||
*dtmf = *_dtmf;
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG, "RTP RECV DTMF %c:%d\n", dtmf->digit, dtmf->duration);
|
||||
/* Only log DTMF buffer if sensitive_dtmf channel variable not set to true */
|
||||
if (!(switch_channel_var_true(switch_core_session_get_channel(rtp_session->session), SWITCH_SENSITIVE_DTMF_VARIABLE))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG,"RTP RECV DTMF %c:%d\n", dtmf->digit, dtmf->duration);
|
||||
}
|
||||
bytes++;
|
||||
free(pop);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue