[Home]

Summary:ASTERISK-14146: [patch] Incoming DTMF causes "Cannot handle frames in 2 format" error, call dies
Reporter:Benjamin Howell (bhowell)Labels:
Date Opened:2009-05-16 08:18:19Date Closed:2009-12-15 10:06:32.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_dahdi
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20090918__issue15129.diff.txt
( 1) debug
Description:All incoming DTMF tones over my DAHDI interface (a PRI) cause the following error:

[May 16 08:38:27] WARNING[2387]: chan_dahdi.c:5624 dahdi_write: Cannot handle frames in 2 format
[May 16 08:38:27] WARNING[2387]: file.c:723 ast_readaudio_callback: Failed to write frame
   -- Hungup 'DAHDI/1-1'

The call is dropped and this error appears on the Asterisk console as soon as any DTMF is received over the DAHDI interface. Calls otherwise function normally until any digit on a phone's keypad is pressed while calling in.


****** ADDITIONAL INFORMATION ******

I'm using the dahdi_dynamic_eth module and a RedFone FoneBridge2 to send the frames via TDMoE to asterisk.

Contents of chan_dahdi.conf:

[trunkgroups]

[channels]
context=incoming
switchtype=national
rxwink=300
signalling=pri_cpe

usecallerid=yes
callerid=asreceived
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes

group=1
callgroup=1
pickupgroup=1
immediate=no
channel => 1-23
Comments:By: Benjamin Howell (bhowell) 2009-05-16 09:11:07

This configuration works without issue under Asterisk 1.4.x using zaptel with the very same config in zapata.conf (instead of chan_dahdi.conf).

By: Joshua C. Colp (jcolp) 2009-05-18 08:25:50

Can you please upload a *complete* console output log with debug set to go to console in logger.conf and "core set debug 2" executed in the CLI? The message is actually coming up because a GSM audio frame is getting to chan_dahdi when it shouldn't be. So the real question is - what is causing that to happen? Hopefully the console log will show exactly what is up.

By: Benjamin Howell (bhowell) 2009-05-19 05:52:40

The log shows that DAHDI/1-1 is set to use gsm as the write format when the call is initially accepted. Eight seconds later, at the same time the digits are pressed on the calling phone's keypad, the write format is changed to ulaw. Asterisk receives the frame (apparently still in gsm format) and bails out on the call.

Is it normal for the initial format to be gsm? Or is something else going on?

[see the debug attachment]



By: Leif Madsen (lmadsen) 2009-07-13 10:01:03

Changing status back to new as it appears the request for information was filled.

By: Tilghman Lesher (tilghman) 2009-09-14 17:04:55

Patch uploaded that may fix this, but I need your testing and confirmation.

By: Tilghman Lesher (tilghman) 2009-09-16 20:03:02

bmh: ping

By: Digium Subversion (svnbot) 2009-09-20 12:54:06

Repository: asterisk
Revision: 219653

U   branches/1.4/main/file.c

------------------------------------------------------------------------
r219653 | tilghman | 2009-09-20 12:54:05 -0500 (Sun, 20 Sep 2009) | 8 lines

Really stop the stream, when ast_closestream() is called.
(closes issue ASTERISK-14146)
Reported by: bmh
Patches:
      20090918__issue15129.diff.txt uploaded by tilghman (license 14)
Review:
      https://reviewboard.asterisk.org/r/372/

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

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

By: Digium Subversion (svnbot) 2009-09-20 12:57:50

Repository: asterisk
Revision: 219654

_U  trunk/
U   trunk/main/file.c

------------------------------------------------------------------------
r219654 | tilghman | 2009-09-20 12:57:49 -0500 (Sun, 20 Sep 2009) | 15 lines

Merged revisions 219653 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r219653 | tilghman | 2009-09-20 12:52:05 -0500 (Sun, 20 Sep 2009) | 8 lines
 
 Really stop the stream, when ast_closestream() is called.
 (closes issue ASTERISK-14146)
  Reported by: bmh
  Patches:
        20090918__issue15129.diff.txt uploaded by tilghman (license 14)
  Review:
        https://reviewboard.asterisk.org/r/372/
........

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

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

By: Digium Subversion (svnbot) 2009-09-20 13:22:06

Repository: asterisk
Revision: 219663

_U  branches/1.6.0/
U   branches/1.6.0/main/file.c

------------------------------------------------------------------------
r219663 | tilghman | 2009-09-20 13:22:06 -0500 (Sun, 20 Sep 2009) | 22 lines

Merged revisions 219654 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r219654 | tilghman | 2009-09-20 12:55:49 -0500 (Sun, 20 Sep 2009) | 15 lines
 
 Merged revisions 219653 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r219653 | tilghman | 2009-09-20 12:52:05 -0500 (Sun, 20 Sep 2009) | 8 lines
   
   Really stop the stream, when ast_closestream() is called.
   (closes issue ASTERISK-14146)
    Reported by: bmh
    Patches:
          20090918__issue15129.diff.txt uploaded by tilghman (license 14)
    Review:
          https://reviewboard.asterisk.org/r/372/
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-09-20 13:23:06

Repository: asterisk
Revision: 219667

_U  branches/1.6.1/
U   branches/1.6.1/main/file.c

------------------------------------------------------------------------
r219667 | tilghman | 2009-09-20 13:23:06 -0500 (Sun, 20 Sep 2009) | 22 lines

Merged revisions 219654 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r219654 | tilghman | 2009-09-20 12:55:49 -0500 (Sun, 20 Sep 2009) | 15 lines
 
 Merged revisions 219653 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r219653 | tilghman | 2009-09-20 12:52:05 -0500 (Sun, 20 Sep 2009) | 8 lines
   
   Really stop the stream, when ast_closestream() is called.
   (closes issue ASTERISK-14146)
    Reported by: bmh
    Patches:
          20090918__issue15129.diff.txt uploaded by tilghman (license 14)
    Review:
          https://reviewboard.asterisk.org/r/372/
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-09-20 13:23:16

Repository: asterisk
Revision: 219669

_U  branches/1.6.2/
U   branches/1.6.2/main/file.c

------------------------------------------------------------------------
r219669 | tilghman | 2009-09-20 13:23:15 -0500 (Sun, 20 Sep 2009) | 22 lines

Merged revisions 219654 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r219654 | tilghman | 2009-09-20 12:55:49 -0500 (Sun, 20 Sep 2009) | 15 lines
 
 Merged revisions 219653 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r219653 | tilghman | 2009-09-20 12:52:05 -0500 (Sun, 20 Sep 2009) | 8 lines
   
   Really stop the stream, when ast_closestream() is called.
   (closes issue ASTERISK-14146)
    Reported by: bmh
    Patches:
          20090918__issue15129.diff.txt uploaded by tilghman (license 14)
    Review:
          https://reviewboard.asterisk.org/r/372/
 ........
................

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

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