Hangup just when the other person answer the phone

Hi,

Only with a few telephones number (just near to our phisical place, on our same village) I have this problem: I can receive calls from them without problems. But when I try to call them, I get a hungup, just in the moment they answer the call (just in the moment, they take the phone).

I have a TDM400P with two FXO modules (the red one). I set the wctdm module debug to 1, and this is the log in /var/log/messages just in the moment that the other person try to answer the phone after a few rings:

Jun 22 10:26:55 trixbox1 kernel: NO BATTERY on 1/1!
Jun 22 10:26:55 trixbox1 kernel: 1551996612 Polarity reversed (1 ->-1)
Jun 22 10:26:55 trixbox1 kernel: BATTERY on 1/1 (-)!
Jun 22 10:26:55 trixbox1 kernel: 1551996836 Polarity reversed (-1 -> 1)

If I try to call to my mobile phone (or another phones that I know works fine), I have no problem, and this log is like this

Jun 22 10:28:52 trixbox1 kernel: 1552054064 Polarity reversed (1 ->-1)
Jun 22 10:29:04 trixbox1 kernel: 1552066467 Polarity reversed (-1 -> 1)

And I can talk without any problem.

Do you have any clue to fix that?

Thanks a lot!

This is my zaptel.conf and zapata.conf

[trunkgroups]

[channels]
usercallerid=yes
callerid=asreceived
hidecallerid=no
relaxdtmf=yes
adsi=yes
sendcalleridafter=2
distinctiveringaftercid=yes
polarityevents=yes
callprogress=yes
callwaiting=yes
callwaitingcallerid=yes
threewaycalling=no
transfer=yes
useincommingcalleridonzaptransfer=yes
cidsignalling=bell
cidstart=ring
restrictcid=no
busydetect=yes
busycount=6
language=es
context=from-zaptel
signalling=fxs_ks
answeronpolarityswitch=yes
hanguponpolarityswitch=yes
polarityonanswerdelay=1
faxdetect=both
group=0
channel => 1-4

zaptel.conf

fxsks=1-4
loadzone = es
defaultzone = es

If you can ignore temporary open circuits on the line, I suspect it will be in the kernel driver configuration, rather than the Asterisk configuration.

Thanks for your answer. You give me the clue. I need to add the parameter

battthresh=2 (the default is three)

in order to reduce the level in which wctdm detects no battery on the analog line.

Thanks a lot