[asterisk-bugs] [JIRA] (ASTERISK-25315) DAHDI channels send shortened duration DTMF tones.

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Tue Aug 11 12:59:32 CDT 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=227216#comment-227216 ] 

Richard Mudgett edited comment on ASTERISK-25315 at 8/11/15 12:58 PM:
----------------------------------------------------------------------

The attached files were made with a modified Asterisk that added debug messages to show what happens better:

PJSIP/202 calls PJSIP/201 where this call's channel chain is:
{noformat}
PJSIP/202-00000000 -> DAHDI/i1/2564286001-1 -> PRI -> DAHDI/i2/0000000202-1 -> PJSIP/201-00000001
{noformat}

The TE205P card's T1 PRI spans 1 and 2 are connected by a cross over cable so everything is available on one box.

[^asterisk_25315_full.txt] - Log capture of an established call sending digits 1-9, 0, *, #.  Only the 1, 6, 8, *, and # went through.  The BUGBUG log messages show that the DAHDI/i1 channel is passing the digits to DAHDI but they are not getting to the other side for the DAHDI/i2 channel to see them.

[^asterisk_25315_digits.wav] - dahdi_monitor capture of the received audio on PRI span 2.  Capture command used: {{dahdi_monitor 25 -m -r asterisk_25315_digits.wav}}

The key option set in {{chan_dahdi.conf}} for the PRI channels is {{buffers=12,half}}.


was (Author: rmudgett):
The attached files were made with a modified Asterisk that added debug messages to show what happens better:

PJSIP/202 calls PJSIP/201 where this call's channel chain is:
PJSIP/202-00000000 -> DAHDI/i1/2564286001-1 -> PRI -> DAHDI/i2/0000000202-1 -> PJSIP/201-00000001

The TE205P card's T1 PRI spans 1 and 2 are connected by a cross over cable so everything is available on one box.

[^asterisk_25315_full.txt] - Log capture of an established call sending digits 1-9, 0, *, #.  Only the 1, 6, 8, *, and # went through.  The BUGBUG log messages show that the DAHDI/i1 channel is passing the digits to DAHDI but they are not getting to the other side for the DAHDI/i2 channel to see them.

[^asterisk_25315_digits.wav] - dahdi_monitor capture of the received audio on PRI span 2.  Capture command used: {{dahdi_monitor 25 -m -r asterisk_25315_digits.wav}}

The key option set in {{chan_dahdi.conf}} for the PRI channels is {{buffers=12,half}}.

> DAHDI channels send shortened duration DTMF tones.
> --------------------------------------------------
>
>                 Key: ASTERISK-25315
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25315
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_dahdi
>    Affects Versions: 11.19.0, 13.5.0
>            Reporter: Richard Mudgett
>            Assignee: Richard Mudgett
>         Attachments: asterisk_25315_digits.wav, asterisk_25315_full.txt
>
>
> Pressing DTMF digits on a phone to go out on a DAHDI channel can result in the digit not being recognized or even heard by the peer.
> {noformat}
> Phone -> Asterisk -> DAHDI/channel
> {noformat}
> Turns out the DAHDI behavior with DTMF generation (and any other generated tones) is exposed by the {{buffers=}} setting in {{chan_dahdi.conf}}.  When Asterisk requests to start sending DTMF then DAHDI waits until the write buffer is empty before generating any samples for the DTMF tones.  When Asterisk subsequently requests DAHDI to stop sending DTMF then DAHDI immediately stops generating the DTMF samples.  As a result, the more samples there are in the write buffer the shorter the time DTMF actually gets sent on the wire.  If there are more samples in the write buffer than the time DTMF is supposed to be sent then no DTMF gets sent on the wire.  With the {{buffers=12,half}} setting and each buffer representing 20 ms of samples then the write buffer is going to contain around 120 ms of samples.  For DTMF to be recognized by the peer the actual sent DTMF duration needs to be a minimum of 40 ms.  Therefore, the intended duration needs to be a minimum of 160 ms for the peer to receive the minimum DTMF digit duration to recognize it.
> A simple and effective solution to work around the DAHDI behavior is for Asterisk to flush the write buffer when sending DTMF so the full duration of DTMF is actually sent on the wire.  When someone is going to send DTMF they are not likely to be talking before sending the tones so the flushed write samples are expected to just contain silence.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list