[Home]

Summary:ASTERISK-14855: pulse and hardware dtmf digits not detected in chan_dahdi/trunk
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2009-09-21 10:17:20Date Closed:2009-10-06 11:20:44
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_dahdi
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:sig_analog (in the chan_dahdi rewrite) fails to detect pulse digits events as well as DTMF up events sent from DAHDI.

The events 'pulse digit N', 'dtmf digit N down', and 'dtmf digit N up' are marked by (N | 1<<16) , (N | 1<<17) and (N | 1<<18), respectively. See dahdi/include/user.h .

However in chan_dahdi.c:my_get_event() , the raw event number is filtered through dahdievent_to_analogevent() . Which does not find those events and thus returns ANALOG_EVENT_ERROR . This has the unlucky value of 13. Sadly, though, computers are over-rational and don't consider 13 as an error value. And generally this functionality is missing.

Generally implementing pulse dialing should be simple. Supporting DTMF down/up events involves muting the line.
Comments:By: Digium Subversion (svnbot) 2009-10-05 14:23:46

Repository: asterisk
Revision: 222108

U   trunk/channels/chan_dahdi.c
U   trunk/channels/sig_analog.c
U   trunk/channels/sig_analog.h

------------------------------------------------------------------------
r222108 | jpeeler | 2009-10-05 14:23:46 -0500 (Mon, 05 Oct 2009) | 12 lines

Add a few missing events to analog_handle_event.

The reported bug was actually only for pulsedigit, dtmfup, and dtmfdown
handling. Also added recognition for fax events (just some verbose output) and
fixed handling for the ec_disabled_event. In order to make comparing the analog
version of events to the DAHDI events easier, the ordering has been changed to
follow that of the DAHDI events.

(closes issue ASTERISK-14855)
Reported by: tzafrir


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=222108

By: Digium Subversion (svnbot) 2009-10-05 14:24:14

Repository: asterisk
Revision: 222109

_U  branches/1.6.2/

------------------------------------------------------------------------
r222109 | jpeeler | 2009-10-05 14:24:13 -0500 (Mon, 05 Oct 2009) | 17 lines

Blocked revisions 222108 via svnmerge

........
 r222108 | jpeeler | 2009-10-05 14:20:36 -0500 (Mon, 05 Oct 2009) | 12 lines
 
 Add a few missing events to analog_handle_event.
 
 The reported bug was actually only for pulsedigit, dtmfup, and dtmfdown
 handling. Also added recognition for fax events (just some verbose output) and
 fixed handling for the ec_disabled_event. In order to make comparing the analog
 version of events to the DAHDI events easier, the ordering has been changed to
 follow that of the DAHDI events.
 
 (closes issue ASTERISK-14855)
 Reported by: tzafrir
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=222109

By: Digium Subversion (svnbot) 2009-10-06 11:20:44

Repository: asterisk
Revision: 222237

U   trunk/channels/chan_dahdi.c

------------------------------------------------------------------------
r222237 | tzafrir | 2009-10-06 11:20:43 -0500 (Tue, 06 Oct 2009) | 12 lines

Make sure digit events are not reported as "ERROR"

dahdievent_to_analogevent used a simple switch statement to convert DAHDI
event numbers to "ANALOG_*" event numbers. However "digit" events
(DAHDI_EVENT_PULSEDIGIT, DAHDI_EVENT_DTMFDOWN, DAHDI_EVENT_DTMFUP)
are accompannied by the digit in the low word of the event number.

This fix makes dahdievent_to_analogevent() return the event number as-is
for such an event.

This is also required to fix ASTERISK-14855 (in addition to r222108).  

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=222237