diff --git a/QnetGateway.cpp b/QnetGateway.cpp index 8416724..a0384b1 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -1560,9 +1560,6 @@ void CQnetGateway::process() band_txt[i].num_bit_errors += ber_errs; band_txt[i].num_dv_frames++; - if (bool_dtmf_debug) - printf("ber_data = %X %X %X, ber_data[0] & 0xffc = %X\n", - ber_data[0], ber_data[1], ber_data[2], ber_data[0] & 0xffc); if ((ber_data[0] & 0x0ffc) == 0xfc0) { dtmf_digit = (ber_data[0] & 0x03) | ((ber_data[2] & 0x60) >> 3); if (dtmf_counter[i] > 0) { @@ -1570,13 +1567,17 @@ void CQnetGateway::process() dtmf_counter[i] = 0; } dtmf_last_frame[i] = dtmf_digit; - dtmf_counter[i] ++; + dtmf_counter[i]++; + if (bool_dtmf_debug) + printf("got a dtmf digit = %d and counter is %d\n", dtmf_digit, dtmf_counter[i]); if ((dtmf_counter[i] == 5) && (dtmf_digit >= 0) && (dtmf_digit <= 15)) { if (dtmf_buf_count[i] < MAX_DTMF_BUF) { const char *dtmf_chars = "147*2580369#ABCD"; dtmf_buf[i][ dtmf_buf_count[i] ] = dtmf_chars[dtmf_digit]; - dtmf_buf_count[i] ++; + dtmf_buf_count[i]++; + if (bool_dtmf_debug) + printf("dtmf_buf[%d] = %s\n", i, dtmf_buf[i]); } } // const unsigned char silence[9] = { 0x4e, 0x8d, 0x32, 0x88, 0x26, 0x1a, 0x3f, 0x61, 0xe8 };