Basic PSTN setup driving me scatty


I have a TDM400P with an FXO and an FXS card on.

All I am trying to do is setup the FXO with my PSTN connection and prove I can call in. I am in the UK and would be grateful for any sample configurations which are proven.

My problem is as follows : I am calling very simple dialplan which supposed to echo back what the call says. This works fine by the way under SIP/xlite. When I call into the PSTN/FXO, after three rings it answers, but I cannot hear anything and am therefore unable to hear any echo. If I change the dialplan to playback a sound file instead of doing an echo I still cannot hear anything.

I have changed the PCI slot for the card, used a different cable and used a different PSTN connection - all without a change to the symptoms. My configuration is as follows:

exten => s,1,Answer()
exten => s,n,Echo()

context = incoming
callwaiting= no
signalling = fxs_ks
channel => 4


channel 2, WCTDM, no module.

channel 3, WCTDM, no module.

loadzone = us
defaultzone = us

If I monitor the dialplan using asterisk -rvvv I get the following when I make a call :

-- Starting simple switch on 'Zap/4-1'
-- Executing Answer("Zap/4-1", "") in new stack
-- Executing Echo("Zap/4-1", "") in new stack

== Spawn extension (incoming, s, 2) exited non-zero on ‘Zap/4-1’
– Hungup ‘Zap/4-1’

Which implies that the Dialplan is executing OK (the hangup is caused by me giving up after not hearing anything).

Note that if I change the dialplan to redirect the incoming PSTN call to an XLite SIP Softphone rather than playing back an echo …

exten => s,1,Answer()
exten => s,n,Dial(SIP/3094,30)
exten => s,n,Hangup()

… after the first 3 rings the softphone rings and when picked up a conversation can be had as normal - i.e. it works fine. There is something amiss when the FXO just interacts with audio generated from the dialplan like an echo or playback.

Suggestions please on what could be causing this (it really is driving me scatty)

Thanks- Marty

Part of the problem has gone away - all on its own. Even without a reboot. Very odd and unscientific.

I can now get Asterisk to playback audio files to a PSTN caller (this was definitely not working earlier). However, I STILL cannot get it to Echo using

exten => s,1,Answer()
exten => s,n,Echo()

Is there some technical reason why this should not work for a caller to the FXO/PSTN port. It works fine if I call the dialplan from a SIP/Xlite phone.

Thanks for any suggestions.