[Help] Outbound call "answered" before it even rin

My configuration:

Gentoo Linux 2.6.15-r1
Asterisk 1.2.6 from source
Zaptel 1.2.5 from source

6 analog lines -> TDM2402E -> Asterisk




; define any trunk groups

; hardware channels
; default

; define channels

group = 1
channel => 17-22



exten => s,1,Answer()
exten => s,2,Hangup()

exten => _NXXXXXX,1,Dial(Zap/22/ww${EXTEN},10)

exten => h,1,NoOP(Call result was ${DIALSTATUS})

Now, if I make a call from my softphone to 540-2179 (one of my own, unused, will never pickup, just ring), I get this at the CLI:

    -- Executing Dial("SIP/ryan.mcdonnell-88e1", "Zap/22/ww5402179|10") in new stack
    -- Called 22/ww5402179
    -- Zap/22-1 answered SIP/ryan.mcdonnell-88e1

The bizarre part is the last line. That line appears before I even hear the first ring. The line continues to ring and ring and ring and does not timeout according the 10 seconds I passed to the Dial() application. Once I hangup via the softphone, this appears on the CLI:

    -- Hungup 'Zap/22-1'
  == Spawn extension (internal, 5402179, 1) exited non-zero on 'SIP/ryan.mcdonnell-88e1'
    -- Executing NoOp("SIP/ryan.mcdonnell-88e1", "Call result was ANSWER") in new stack

I thought this might be caused by the hardware echo cancellation module on my TDM2400P. I removed it and still had the same results.

Can anyone shed some light on this issue?

Couple questions.

1.) What are your 6 analog lines connected to? Phone company, PBX, stations (phones)?

2.) How are the physical ports on your card configured? FXO / FXS


  1. Plain old telephone lines from SBC.
  2. All ports are FXO. (8 total ports, only 6 connected)

Your config looks ok as far as I can tell. In your logger.conf file try uncommenting the line

full => notice,warning,error,debug,verbose

This will cause Asterisk to write a log file, /var/log/asterisk/full, which contains everything Asterisk logs.

Try looking in there for clues. If you can post a link to the file here. It might be too large to paste in directly.


See your dialplan:

You spawn your ZAP in the INCOMING context where EVERY dialstring gets answered and hangup immediatly.

That fast, thet the phone keeps ringing tho the line is dropped already.

I dunno what your dialplan is sposed to do anyway…except answering and hanging up every call in the same second…

I’m still configuring and testing the system so I don’t need incoming calls to be answered yet.

Thanks for the suggestion. I’m in the process of reformatting the system and reinstalling everything fresh. I will be sure to check that log file if the problem appears again.

Well, I completely reformatted and reinstalled Gentoo, Zaptel and Asterisk.

Configuration is now:

Gentoo 2.6.16 r6
Zaptel 1.2.5

Same configuration files as above. Same problem. :frowning:

As suggested, I enabled full logging. Here is the log file: