[asterisk-users] odd DTMF behavior on dahdi channel during Echo test

Eric Cooper ecc at cmu.edu
Sun Jun 2 14:38:59 CDT 2013


I'm running Asterisk 1.8 from Debian.  I have some analog phones
connected via a TDM400P.  I'm testing them with these simple
extensions:

    exten => 600,1,Answer()
      same => n,Festival(This is an echo test)
      same => n,Festival(Hang up or press pound when you are done)
      same => n,Echo()
      same => n,Festival(Good-bye)
      same => n,Hangup()

    exten => 601,1,Answer()
      same => n,Festival(Please record your voice)
      same => n,Festival(Hang up or press pound when you are done)
      same => n,Record(/tmp/recording.ulaw)
      same => n,Festival(This is what you said)
      same => n,Playback(/tmp/recording)
      same => n,Festival(Good-bye)
      same => n,Hangup()

(Ignore the fact that I'm using Festival; the behavior I describe
below also happens when I use the stock voice prompts.)

Here's the problem:

In the Echo test, pressing the # key does not terminate the action --
audio just stops, I never hear the "good-bye" message, and I have to
hang up.  The same thing happens if I press any other key on the phone
besides #.  But in the Record test, it all works fine.

I used dahdi_monitor to try to debug this, and found that during
dialing the extension, each DTMF tone lasts about 100ms.  But whatever
DTMF is sent during the Echo test (# or anything else) gets cut off at
about 70ms, and that tone is then transmitted continuously on the
channel until I hang up, even though I don't hear it on the phone.

Here's what I see in the log when this happens:

    Set channel DAHDI/1-1 to write format ulaw
    Launching 'Echo'
    Begin DTMF digit: 0x23 '#' on DAHDI/1-1
    Begin DTMF digit: 0x23 '#' on DAHDI/1-1
    DTMF begin '#' received on DAHDI/1-1
    DTMF begin passthrough '#' on DAHDI/1-1
    Channel DAHDI/1-1 started VLDTMF digit '#'
    analog_exception 1
    Exception on 7, channel 1
    __analog_handle_event 1
    Got event ANALOG_EVENT_ONHOOK(1) on channel 1 (index 0)

By contrast, here's what I see when terminating the Record test with #:

    Set channel DAHDI/1-1 to write format ulaw
    Launching 'Record'
    Set channel DAHDI/1-1 to write format slin
    Set channel DAHDI/1-1 to write format ulaw
    Requested indication 18 on channel DAHDI/1-1
    Begin DTMF digit: 0x23 '#' on DAHDI/1-1
    Begin DTMF digit: 0x23 '#' on DAHDI/1-1
    DTMF begin '#' received on DAHDI/1-1
    DTMF begin passthrough '#' on DAHDI/1-1
    End DTMF digit: 0x23 '#' on DAHDI/1-1
    End DTMF digit: 0x23 '#' on DAHDI/1-1
    DTMF end '#' received on DAHDI/1-1, duration 63 ms
    DTMF end accepted with begin '#' on DAHDI/1-1
    DTMF end '#' has duration 63 but want minimum 80, emulating on DAHDI/1-1
    DTMF end emulation of '#' queued on DAHDI/1-1
    Launching 'Festival'
    Parsing /etc/asterisk/festival.conf
    Text passed to festival server : This is what you said
    ...

DTMF recognition is fine during dialing, and also when I use the Read
application to read DTMF.  I've tried two completely different analog
phones with the same results.

If anyone has a clue what I should try next, I'd appreciate it.  I can
also provide more details, like the recorded audio for the tones, on
request.

-- 
Eric Cooper             e c c @ c m u . e d u



More information about the asterisk-users mailing list