When installing zaptel pstn cards, such as the x100p or a digium tdm400p card with fxo module(s), very often problems occur with hangups of the zaptel end not being detected by asterisk.
For example:
You are using zaptel to dial in into your asterisk server, noone is there, you hit voicemail, you leave a message and hangup the phone.
When you listen to the recordings of the answering machine, you notice a very large recording, asterisk kept the line open for hours and hours.
A common approach is to go have a look at voicemail and see what is going on, force it to hangup after some seconds of silence etc etc.
This is not a good approach as in most cases the problem is not only with voicemail but with any call with at least 1 zap leg. (although it doesnt show up as often on a ZAP to SIP call as normally at the end of a conversation both ends will hangup, and the sip bye will go through, ending both call legs).
Possible Solutions: ordered by recommendation - higher is better
1) Try reverse polarity (cvs-head only, dates after 17nov '04 - bug here )
If your asterisk version is recent enough (and you did a make samples) you should see the following in zapata.conf:
; In some countries, a polarity reversal is used to signal the disconnect
; of a phone line. If the hanguponpolarityswitch option is selected, the
; call will be considered "hung up" on a polarity reversal
;
;hanguponpolarityswitch
If you now uncomment this hanguponpolarityswitch line, and your pstn line uses polarity reversal, asterisk should detect it and hangup the line.
This solution is by far the best, as it will not get you false hangups and will hangup in 100% of the calls.
If you want to see if this might work, you might want to try to load the wctdm kernel module with the debug=1 parameter. (insmod wctdm debug=1) and look for reverse polarity messages on the console).
You might want to try this option if you enabled the fxs Kewlstart signalling in zapata.conf
2) Go fix your location in zapata.conf
By default, asterisk listens for a busy tone or a a dial tone on the line to detect if the line got hung up.
These tones are different in different countries, duration and tones might differ a little between carriers.
The definitions of these indications can be found in /etc/asterisk/indications.conf
Try to find your country in the list, if its there, go look at /etc/asterisk/zapata.conf
;
; On trunk interfaces (FXS) and E&M interfaces (E&M, Wink, Feature Group D
; etc, it can be useful to perform busy detection either in an effort to
; detect hangup or for detecting busies
;
;busydetect=yes
;
; On trunk interfaces (FXS) it can be useful to attempt to follow the progress
; of a call through RINGING, BUSY, and ANSWERING. If turned on, call
; progress attempts to determine answer, busy, and ringing on phone lines.
; This feature is HIGHLY EXPERIMENTAL and can easily detect false answers,
; so don't count on it being very accurate. Also, it is ONLY configured for
; standard U.S. tones
;
;busycount=4
;
;callprogress=no
Lets explain what those 3 options mean:
busydetect:
With this option enabled, asterisk will try to 'listen' for busy signals on the line, if your carrier sends you a busy tone on a hangup, this should detect it. (Note that this is not exact science, asterisk might think your cat screaming is a busy tone and hangup. In case of loopstart in zapata.conf, you will certainly need this.
To avoid this, they invented the next option,
Busycount:
Busycount defines the amount of busy tones asterisk needs to recognize before actually considering the line to really really give a busy tone, to avoid false hangups on non hangup sounds.
The standard setting is 3, but you could change that to 6 or 10 if you would want to.
A side effect is, that it will take longer to detect a hangup and in case of a real hangup, the line will stay occupied for a little longer than with a lower value of busycount.
callprogress:
This option is similar to the busydetect option, but will also listen for a ringing tone, congestion tone and will try to detect if the line got answered.
It might work for you, but its highly unreliable and will probably give many false hangups.
Please note that none of these 3 options should be activated on digital zaptel channels, (BRI, PRI) as they will not help with anything, they will just cause false hangups).
When you get the reverse polarity to work, dont use these options either.
3) Check your signalling settings in zapata.conf:
; fxs_ls: FXS (Loop Start)
; fxs_gs: FXS (Ground Start)
; fxs_ks: FXS (Kewl Start)
signalling=fxs_ks
The correct choice for the signalling= line depends on your carrier.
When you call them with this question they probably wont have a clue what you are talking about so trying several might be a good idea.
Kewl start is the best option there is, but it might not work in your situation, try to call your telco and ask for "disconnect supervision"
In this case, the telco will cut the power on the 2 telephone lines for a small period of time or will reverse the polarity on the lines.
(You could check this by calling to that pstn line, and connecting a phone with a lighted keypad and without external power supply there).
If the lights go out when the other end disconnects, the telco has disconnect supervision.
Loop start does not send a hangup signal, you will need the busydetect parameter.
I dont know if you need extra options with Ground start signalling, i never tried it myself. Let us know if you know.
4) Sell your x100p or clone on ebay or feed it to the dogs, and buy a real TDM card, like the tdm400p.
The x100p's are not very good with the hangups or with callerids.
5) Buy a device like : this device
Nenhum comentário:
Postar um comentário