TDM400p Not Hanging up on UK BT (FIXED!)

Hello,

You might of read my post about the card not hanging up after a call on a BT Line Read it Here!. Well Ive found a fix. edit wcfxs.c in your favourite editor and edit the line "#define BATT_DEBOUNCE* and change it from 64 to 24. Then edit the line #define BATT_THRESH and change it from the default value to 3. BATT_DEBOUNCE basically means its the delay that the driver will wait once the hangup happens before actually sending the hangup signal to asterisk the default of 64 is far to long as on a BT line it tends to be around 24ms.

chris,

i had an issue recently with a TDM02B not detecting remote hangup on BT lines, but fixed it by loading the wctdm module with “opermode=UK”.

at least, i think it’s fixed … client not reporting any problems getting outside lines anymore. maybe i’ll check !!! :confused:

edit : what version of Asterisk are you using ?

Hi,
I was setting opermode=UK too but asterisk still wasnt hanging up the call. I’m using "Asterisk CVS-v1-0-10/19/05-12:34:52*. Recompiling the driver with those things I mentioned does the trick for me :smiley: took me 6 goddamn hours of intense web searching to fix though :frowning:.

chris,

just checked with the client and he’s having no probs. there’s only 2 lines so non-dropped lines show up really quickly. he’s on 1.0.9 and the zaptel drivers are totally different ! no wcfxs.c file but wctdm has a DEFAULT_BATT_DEBOUNCE line that’s set to 16 (16*4=64ms) … i’ll try that next if he reports any hangup issues … thanks for the heads-up.

and only 6 hours ??? :smiley:

lol yeah constantly swearing and getting p***ed off :wink:. Ive been using the Net since 1994 which helps alot :stuck_out_tongue:.

Hi Chris,
I am thinking your solution might solve my problem as well. I have have an Asterisk@Home 1.5 with a TDM400 4FXO. It does not detect remote caller hangups. I have tried callprogress (progzone=us and ca), busydetect, Loopstar, Kewlstart (in zapata.conf and zaptel.conf) and notthing makes a diffirence.
My system works in the city I live, but as soon as I take it to the rural area an install there, it does not detect the hangups.
So, maybe your trick would solve my problem. With your solution, do you use ks or ls signalling?
Which file would I have to edit in Asterisk@Home and where is it located? I imagine I would have to compile again, can you give me the step by step procedure?

Thanks for your help,

David

Hi,

You need to go to the directory where the zaptel source is located… Usually /usr/src/zaptel (not sure with @home though). Then you need to text edit wcfxs.c file and look for "#define BATT_DEBOUNCE" and change it from 64 to 24, Then you need to find “#define BATT_THRESH” and change it to 3. then you need to do make clean, then make, and then make install (although I think asterisk at home has a (recompile drivers command / button somewhere). I dont know the exact figures because its in canada but just have a play and see if it works.

PS: I use KS signalling

Kind regards

Chris

Thank you very much Chris. I will try it and make a post with my results.
One more question: Do you use busydetect, busycount and/or callprogress besides this change you made?
With this particular line we are using, after the remote caller hangs up, we get a couple of senconds of silence with one or two clicks and then dial tone, so I don’t think busydetect and busycount would not work anyway.

Thanks again for your help.

Regards,

David

Hi Here’s my zapata.conf,

;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-pstn
signalling=fxs_ks
;rxwink=300             ; Atlas seems to use long (250ms) winks
; Chris 02/10/2005 commented out... did some funky stuff *gonna set fire to BT >:(*

;
; Whether or not to do distinctive ring detection on FXO lines
;
;usedistinctiveringdetection=yes


usecallerid=no
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=yes

busydetect=no
busycount=3

;hanguponpolarityswitch=yes #Chris 02/10/2005 - Deprecated (Didn't work anyway)

;faxdetect=both
;faxdetect=incoming
; default incoming
;faxdetect=outgoing
;faxdetect=no
faxdetect=no

;Include genzaptelconf configs
;#include zapata-auto.conf

;Include AMP configs            #Chris 22/10/2005 - Removed AMP and configs as it was playing dirty
#include zapata_additional.conf
channel => 4

Hope your getting on OK. Also Ive just remembered about the Debug option when loading wcfxs. edit /etc/modprobe.conf and change the line that loads wcfxs to " install wcfxs /sbin/modprobe --ignore-install wcfxs opermode=UK && /sbin/ztcfg" without quotes. This should give you more info whats going on in the syslog when the remote call hangs up.