TDM400P is slow to answer

I’ve seen that this has been reported before, but Asterisk (1.2.10) waits for around 8 seconds before answering my PSTN lines connected via a Digium TDM400P with 4 FXO ports (all connected)

Here are the active lines in zapata.conf

[code][trunkgroups]

[channels]
language=en
context=from-pstn
signalling=fxs_ks
usecallerid=no
hidecallerid=no
callwaiting=yes
usecallingpres=yes
sendcalleridafter=0
callwaitingcallerid=yes
threewaycalling=no
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
echotraining=200
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=yes
callerid=asreceived
busydetect=yes
busycount=4
hanguponpolarityswitch=no
channel=>1-4
[/code]
and /etc/zaptel.conf

fxsks=1-4 loadzone=uk defaultzone=uk

Here’s the relevant bit of extensions.conf

[code][from-pstn]
exten => s,1,NoOp
exten => s,2,Verbose(Incoming call from BT - callerid = ${CALLERID})
exten => s,3,Set(CALLERID(name)=PSTN: INBOUND ${CALLERID})
exten => s,4,Macro(switchboard)
exten => s,5,GotoIf($["${DIALSTATUS}"=“ANSWER”]?999)
exten => s,6,Dial(${EMMA},${T_RINGTIME})
exten => s,7,GotoIf($["${DIALSTATUS}"=“ANSWER”]?999)
exten => s,8,Dial(LOCAL/${SALESHEAD},${T_RINGTIME})
exten => s,9,GotoIf($["${DIALSTATUS}"=“ANSWER”]?999)
exten => s,10,VoiceMail(100)

exten => s,999,NoOp
[/code]
When the call arrives, I get an immediate Event 18 on Zap 1/1, followed a couple of seconds later by an Event 6, followed a couple of seconds after that by Event 18 and sometime after that I see my NoOp and Verbose lines. There is a similar lag upon hangup too (i.e. Asterisk keeps ringing the extension for a few seconds) … very puzzling (to me at least).

Anyway, if anyone has any ideas I’d appreciate some help.

Cheers

Mark