DAHDI not picking up answer

I’ve got a UK BT line (well, it’s a fully unbundled BE/Sky phone line) that i’ve hooked up to an A400E and Asterisk using DAHDI. I was having some problems with the card not detecting hangup on the far end, but I fixed that by setting callprogress=yes, but now when I try and dial out through the card, it rings on the other end and I can answer it, but it seems that the answer isn’t picked up by asterisk so the SIP client remains in the dialing state and the audio never goes through. I’ve tried fiddling with the answeronpolarityswitch and hanguponpolarityswitch settings and I can get it so that it is automatically answered (i.e. on the SIP phone you hear the actual dialing on the card, regardless of whether somebody has picked up on the other end), but that ends up breaking remote hangup detection. Any help would be greatly appreciated!

My confs are here (as well as a voltage reading from a phone call): gist.github.com/anonymous/b5411dab7c0ce5ac7abd

Assuming this is a BT single line, SIN 351 sinet.bt.com/sinet/SINs/pdf/351v4p6.pdf says nothing about any answer supervision than I can find on a quick look.

Not sure if this will fix it for you but the following works for me on two BT lines on a four port Digium card.

language=en
rxwink=300
hidecallerid=no
echocancelwhenbridged=no
callprogress=no
rxgain=2.0
txgain=0.0
overlapdial=no
faxdetect=no
cidsignalling=v23
cidstart=polarity
busydetect=yes
busycount=4
immediate=yes
hanguponpolarityswitch=yes
echotraining=no

signalling = fxs_ks
group = 7
context = inbound-analogue1
channel => 127

signalling = fxs_ks
group = 8
context = inbound-analogue2
channel => 128

Worked like that for years with no problems in or out.

That seems to be using the default of assuming answer the moment dialing stops. People who ask about answer supervision usually want to know the call has actually been answered.