comparison libutil/dtmf_valid.c @ 1:b161dbfffdaa

include, libutil: port from old ThemWi
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 08 Jun 2024 23:06:53 +0000
parents
children
comparison
equal deleted inserted replaced
0:214716b13c61 1:b161dbfffdaa
1 /*
2 * Here we implement a function that validates DTMF digits which arrive
3 * from GSM MS via MNCC_START_DTMF_IND.
4 */
5
6 is_valid_dtmf_digit(c)
7 {
8 switch (c) {
9 case '0':
10 case '1':
11 case '2':
12 case '3':
13 case '4':
14 case '5':
15 case '6':
16 case '7':
17 case '8':
18 case '9':
19 case '*':
20 case '#':
21 case 'A':
22 case 'B':
23 case 'C':
24 case 'D':
25 return(1);
26 default:
27 return(0);
28 }
29 }