xpp: fix FXS D DTMF detection (not zero)
* 'D' DTMF digits were accidentally discarded with the notice message: "Bad DTMF value 0. Ignored". * No need for an odd 1-based translation table anymore - it's 0-based. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10209 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
parent
e025a651fb
commit
dafb5f401b
@ -1300,7 +1300,8 @@ static void process_digital_inputs(xpd_t *xpd, const reg_cmd_t *info)
|
||||
#endif
|
||||
|
||||
static const char dtmf_digits[] = {
|
||||
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '*', '#', 'A', 'B', 'C', 'D'
|
||||
'D', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '*', '#',
|
||||
'A', 'B', 'C'
|
||||
};
|
||||
|
||||
/*
|
||||
@ -1322,12 +1323,6 @@ static void process_dtmf(xpd_t *xpd, uint portnum, byte val)
|
||||
return;
|
||||
priv = xpd->priv;
|
||||
val &= 0xF;
|
||||
if(val <= 0) {
|
||||
if(key_down)
|
||||
XPD_NOTICE(xpd, "Bad DTMF value %d. Ignored\n", val);
|
||||
return;
|
||||
}
|
||||
val--;
|
||||
digit = dtmf_digits[val];
|
||||
want_mute = IS_SET(priv->want_dtmf_mute, portnum);
|
||||
want_event = IS_SET(priv->want_dtmf_events, portnum);
|
||||
|
Loading…
Reference in New Issue
Block a user