Analog line not being released when call disconnects

ironix
Posts: 7
Member Since:
2010-08-23

Hi,

I'm running a Trixbox v2.8.0.1 install (Asterisk 1.6.0.9) and have a Digium TDM2400P 24-port card installed and configured. There are 12 active channels and they all work correctly, both incoming and outgoing.

On random (and infrequent - perhaps once a week) occasions, one of the channels / lines does not "release" the line after the call completes, the elapsed time simply counts up continuously (170h42m31s for example) and if you attempt to access that channel / line directly, there is a high pitched "screaming" noise on the line. The line / channel this happens on also appears to be random. All lines are analog lines, part of a hunt group.

If you reload asterisk, no change, however if you restart the server completely, the instance of the problem is resolved, or if you physically disconnect the line from the card, and re-connect it, the instance of the problem is resolved (immediately).

I have tried searching the trixbox (and general asterisk) forums and don't seem to be able to find anything specifically related to this.
I am new to the forum, but have multiple Trixbox installations running, all with very similar configurations and very similar cards TDM400, TDM800 and TDM2400's and only have this issue on one of the installations (which may imply line problems but the PSTN has assured me that is not the case).

The machine spec is Intel Core2Duo 2.9GHz with 3GB RAM.
50 extensions
12 PSTN Lines
Linksys SPA942 SIP Devices

If anyone has any insight or suggestions regarding this, I would be extremely grateful.



Kbedford
Posts: 187
Member Since:
2008-06-12
What you are describing

What you are describing sounds like a failure of hangup detection except for the high pitch screaming part. There are a number of settings that can help with this but no guaranteed cure all.

you should be able to hang up the offending channel from the asterisk cli
use "core show channels" to identify the offending channel and "soft hangup [channel]" to hangup the channel.

If it is hangup detection it only causes a problem when a call is not answered from a handset and nothing else in the dialplan explicitly hangs up the call.

Depending on where you are geographically you may need to change the default zone settings.



ironix
Posts: 7
Member Since:
2010-08-23
Thank you for the quick

Thank you for the quick reply.

That was my first thought too, however the problem seems to occur even after a normal conversation on the line, and when both ends hangup (physically - handset and remote party) the line is not released.

Also, hangup has worked on each "tested" occasion - (hangup during IVR, hangup during voicemail & prompt etc).
I am unable consistently re-create the problem.

The soft hangup [channel] did work it seems, which is a point for the problem being hangup detection related.

Any other suggestions would be most welcome.



randy7376
Posts: 89
Member Since:
2006-10-10
ironix, You may want to take

ironix,

You may want to take a look at your Zaptel/DAHDI signaling options.

---

From Digium's website [http://kb.digium.com/entry/44/30/]:

What is the difference between loopstart, groundstart, and kewlstart signalling?

Loopstart signalling is used by virtually all analog phone lines. It allows a phone to indicate on hook/offhook, and the switch to indicate ring/no ring.

Kewlstart is based on loopstart, but extends the protocol by allowing the switch to drop battery on the phone line to indicate to the phone that the other end of the party has disconnected the call. Most real phone switches, and almost no PBX's (except Asterisk, of course) support this feature. It is generally required for getting hangup notification.

Groundstart signalling is sometimes used by PBX's. If you don't know what it is, don't worry, you won't need it.

---

A friend of mine in another part of the city had to change from the default `kewlstart` signaling to `loopstart` because they're on a very old telco switch. I just spoke to him and he seems to remember having similar problems until they made the change to `loopstart`. You should be able regenerate your Zaptel/DAHDI configuration with the alternative signaling method. Look at the script `/usr/sbin/genzaptelconf` for some more information.

I don't have an analogue card handy to test with, so you'll have to do some homework on how to go about it. Good luck!



ironix
Posts: 7
Member Since:
2010-08-23
Thanks for the info. I have

Thanks for the info.

I have set my signaling to loopstart (it has been loopstart since installation) specifically for hangup detection as our telco is "old" at best.
(Telkom - RSA)
In my dahdi-channels.conf file (generated by dahdi_genconf) each channel is indicated to be using loopstart

;;; line="1 WCTDM/0/0 FXSKS"
signalling=fxs_ls

This is the same for each line.

Thanks for all the help so far. Much appreciated.
Any further advice is very welcome.



ironix
Posts: 7
Member Since:
2010-08-23
I seem to have found a way

I seem to have found a way of replicating the problem.

Seems as though if the external caller disconnects / hangs up while listening to the voice mail (unavailable or busy) message nearing the end of the recorded message, but prior to playing the "standard greeting" the line does not disconnect.

(that's not particularly clear I know...)

basically - inbound route -> IVR -> t destination = operator : if no answer -> operator voicemail
the operator voicemail plays a recording (...not available...press 0 to return ... hold to leave a message - "wait for input" - if no input then play built in recording "please leave a message after the tone..." vm-intro)
If the caller hangs up approximately 0 - 2 seconds before the "wait for input" then the problem occurs. Any time before or after that (including during the timeout period) the problem does not occur.

It also seems only to occur on analog lines - dialing the extension / voicemail from another sip device I cannot re-create the problem (though that was expected).

So to me it appears that the hangup detection does not "have time" to detect the hangup if it occurs that close to the pause. I've tried increasing and decreasing my "busycount" to no avail.

If you barge the channel that's being affected, you can hear the remainder of the vm-intro message being played, the beep and then the high pitched "screaming" sound mentioned in the first post.

I'm afraid I'm not even sure where to look at this point so any advice would be greatly appreciated.
I'm happy to do the research if someone has any ideas and can point me in the right direction but I've exhausted my (limited) knowledge on this.
Many thanks.



randy7376
Posts: 89
Member Since:
2006-10-10
One quick thought... have

One quick thought... have you tried changing the Zaptel channels back to 'kewlstart' signaling to see if possibly something on the telco side may have change. Perhaps they had an equipment upgrade of some kind and 'kewlstart' may be the appropriate signaling choice now.



ironix
Posts: 7
Member Since:
2010-08-23
Not on that install, but on

Not on that install, but on an install that was done perhaps 6 months before the problematic one, kewlstart would not detect any hangup at all.
Changing to loopstart worked immediately. Also, as I write I realise that all other installs are happily running loopstart and don't experience this problem.

Not to sure how to progress, so if you have any further thoughts, please don't hold back. Willing to try anything at this point.

Appreciate all the input thus far.



randy7376
Posts: 89
Member Since:
2006-10-10
My next thought would be

My next thought would be replacing the card with a known good unit, if possible. At least that would tell you if the situation changes. You might need to tweak the card settings as it could just be something unique to the telco switch that system is connected to.

If you haven't already come across these pages, they may help:

http://www.voip-info.org/wiki/view/Asterisk+Disconnect+Supervisio...

http://www.voip-info.org/wiki/view/Asterisk+config+chan_dahdi.con...

Can you post chan_dahdi.conf from that system?



ironix
Posts: 7
Member Since:
2010-08-23
Apologies for the delayed

Apologies for the delayed response.

I had come across both links however not related to this problem, but prior to config of my first couple of systems.
Useful and necessary information.

chan_dahdi.cfg looks like this...

-----------------------------------------
[trunkgroups]

[channels]

language=en
context=from-zaptel
signalling=fxs_ls

usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=9
txgain=9
group=0
callgroup=1
pickupgroup=1
immediate=no
busydetect=yes
busycount=3 ------------ has been as high as 10 and as low as 2 - 3 seems to be the best thus far
callprogress=no
flash=250
rxflash=250

faxdetect=incoming

#include dahdi-channels.conf

group=1

#include chan_dahdi_additional.conf

---------------

dahdi-channels.conf

---------------
; Span 1: WCTDM/0 "Wildcard TDM2400P Board 1" (MASTER)
;;; line="1 WCTDM/0/0 FXSKS"
signalling=fxs_ls
callerid=asreceived
group=0
context=from-pstn
channel => 1
callerid=
group=
context=default
-----------------
(same for 12 channels)
- line 2 of each channel indicates FXSKS however since that is a comment and line 3 indicates the required fxs_ls I don't think that's the problem.

chan_dahdi_additional.conf - is empty

--------------

I don't seem any closer to solving this I'm afraid, so still looking for any advice available.
A second, far less frequent, but perhaps related, problem seems to be "random" premature termination of calls.
Seems that calls are being disconnect mid conversation and after various durations.
The log indicates nothing out of the ordinary that I can find, but seems consistent to specific destinations (or sources as the case may be) on a given day. i.e. the same person will call the pbx 3 times in a day and be disconnected mid conversation, but after very different durations.
Listening to the recording of the conversations in question there are no audible anomalies - just normal conversation and very abrupt termination. Recording does not record any hangup signal.

If not related, I'll troubleshoot separately and start a new thread if necessary (can one hijack their own thread?) but I think the hangup detection is probably the problem in both cases - inverse reaction though.

Thanks again to all those offering assistance.



randy7376
Posts: 89
Member Since:
2006-10-10
I'm going to post my

I'm going to post my chan_dahdi.conf file. I'm running the TDM410P with the hardware echo canceler with one FXO port (port 1) and two FXS ports (port 2,3) with no issues. Maybe there will be something that stands out because I'm certainly running out of ideas. Looking at your config, I'd try turning the faxdetect=incoming off and set it to faxdetect=no. See if it changes your problem.

You might also see if your TDM2400P uses any kind of firmware. For instance, my card requires dahdi-fw-vpmadt032.bin be installed in /lib/firmware or it won't talk to the DSP.

A quick look at user's guide found here:
http://www.digium.com/en/products/analog/tdm2400p.php#documentati...

... didn't turn up anything about firmware

Configuration file chan_dahdi.conf:

;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-dahdi
signalling=fxs_ks
rxwink=300              ; Atlas seems to use long (250ms) winks
;
; Whether or not to do distinctive ring detection on FXO lines
;
;usedistinctiveringdetection=yes
busydetect=yes
busycount=6
hanguponpolarityswitch=yes
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
;echotraining=800
rxgain=1.0
txgain=1.0
group=0
callgroup=1
pickupgroup=1
immediate=no

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

;Include genzaptelconf configs
#include dahdi-channels.conf

group=1

;Include AMP configs
#include chan_dahdi_additional.conf

The only other item that stands out is hanguponpolarityswitch=yes which I didn't see in your config file. Beyond that, my final suggestion would be for you to contact Digium.



ironix
Posts: 7
Member Since:
2010-08-23
I haven't had a look at

I haven't had a look at firmware changes for the card itself, something Digium would be able to recommend.

The hanguponpolarityswitch was removed because our Telco doesn't support that. It's known to cause problems here so necessary to remove (or disable) it.

I wonder if the tx and rx gain might not cause some interference - change the expected busy signal somehow.
I needed to increase that immediately after installation because call volume was too low. That change corrected that instantly.
Unfortunately that was as I say, within a day of installation so I don't know if the problem started after that change.

Think I'll chat to the hardware vendor again, and drop Digium a mail.

Thank you again for all your help.



Suresh
Posts: 1
Member Since:
2010-10-27
Having the same issue

Hi,
I am new to this. I am having the same issue when I make a call from one of the Telco provider in Sri Lanka. I have change the indications.conf to sl with the Telco's indications as well. However the some times when I use that trunk for outgoing calls and when hangup the line wont hang up and it says the line is temporally out of service when I name a incoming call to the same number.

Please let me know anyways I can fix this. I have tried with loopstart ans kl as well both doesn't help.

I am thinking of using this trunk only for incoming calls and making the out going calls from the other trunks. Will that be possible?

Many thanks.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.