[Home]

Summary:ASTERISK-29436: core/channel : DTMF emulation doesn't queue the end when last RTP received is the END frame
Reporter:Arnaud Willem (awillem)Labels:
Date Opened:2021-05-20 02:04:09Date Closed:2021-05-21 17:36:41
Priority:MajorRegression?
Status:Closed/CompleteComponents:Core/Channels
Versions:16.2.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Debian/stable - Xen HVM - Linux 4.19Attachments:( 0) ast_bugreport.txt
Description:In this specific context, a PJSIP peer (peerA) is sending RFC4733 DTMF towards Asterisk.
Asterisk then forwards it to the PSTN over chan_pjsip (peerB).

peerA sends sequences of 2-3 DTMF digits. When the last digit is sent, it stops sending RTP frames and awaits responses from the called party.

This appears to trigger an odd "off-by-one" bug in main/channel.c:__ast_read() where an additional frame is expected to stop DTMF emulation in the queue.

Attached log shows this happening twice, around lines 92 (begin emulation of DTMF 8 to peerB ... but no END until line 257 where a new rfc4733 frame has previously been received from peerA.) and 286, (begin emulation of DTMF C to peerB, then the call is hung up after a while.)

A pcap dump can also be provided if necessary.
Comments:By: Asterisk Team (asteriskteam) 2021-05-20 02:04:10.138-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Joshua C. Colp (jcolp) 2021-05-20 03:59:31.926-0500

It appears the bug you have submitted is against a rather old version of a supported branch of Asterisk. There have been many issues fixed between the version you are using and the current version of your branch. Please test with the latest version in your Asterisk branch and report whether the issue persists.

Please see the Asterisk Versions [1] wiki page for info on which versions of Asterisk are supported.
[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions



By: Arnaud Willem (awillem) 2021-05-21 15:38:25.449-0500

Hello,

Will test against a fresh compile of the latest Asterisk 16 and 18 branches and provide feedback.

For reference, this commit fixes a similar issue (ongoing DTMF regen/emulation) but with a different cause (vanishing channel from the bridge) : 6ad0126425993bd9c9c73b0c05a52984cbcadc5d

By: Arnaud Willem (awillem) 2021-05-21 16:54:37.884-0500

Hello (again),

once deployed, both latest LTS branches (16.18 and 18.4) seem to fix the issue. No reproduction possible using the same test environment.

Sorry for the noise !

Solution for Debian package users in buster (16.2.1) : recompile/upgrade to the latest release.