Page tree
Skip to end of metadata
Go to start of metadata

Hang-up Detection

This section describes terminology, tips and settings that might aid in troubleshooting hangup detection issues most notably within applications using analogue phones.  
Hangup signals are generate by a FXS interface and are used to signal an FXO that the line has been hung up on the FXS end.  

Note in the opposite case the FXO would indicate a hangup by bringing the line to the on-hook voltage level (this section is to help with configuring the former).

What is Disconnect Supervision

  • Refers to opening/closing the 2-wire circuit (as in hanging up a telephone), and in some cases, reversing tip/ring (48 volt polarity change)
  • It is something your telco should be providing to you
  • Complain to your telco about them not giving you "disconnection supervision" on your line

What is Kewlstart signalling

  • Under Asterisk, the term used to describe Remote Disconnect Supervision
  • To enable - put "signalling=fx[s/o]_ks" in /etc/asterisk/chan_dahdi.conf
  • Is by far the most reliable method of telling Asterisk that the line has been disconnected
  • Try asking your Telco if they can supply you with Kewlstart or Forward Disconnect Supervision on your line
  • what it does - momentarily reverses the polarity on the line to indicate that the line has been disconnected

What is CPC (Calling Party Control)

  • an open circuit (0 V) signal sent from most modern electronic COs to indicate that the "Calling Party" has hung up

 

  

How to Configure Hangup Detection

The following settings can be adjusted in the file /etc/asterisk/chand_dahdi.conf

NOTE* These values are examples and must be set according to your Telco's requirements and provided services

( source:  http://www.voip-info.org/wiki/view/chan_dahdi.conf )


busydetect=yes

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.  
This enables listening for the beep-beep busy pattern.

 busycount=6

If busydetect is enabled, it is also possible to specify how many busy tones  to wait for before hanging up. 
The default is 3, but it might be  safer to set to 6 or even 8.  Mind that the higher the number, the more
time that will be needed to hangup a channel, but lowers the probability  that you will get random hangups.

busypattern=500,500

If busydetect is enabled, it is also possible to specify the cadence of your busy signal.  In many countries,
it is 500msec on, 500msec off.  Without busypattern specified, we'll accept any regular sound-silence pattern
that repeats <busycount> times as a busy signal.  If you specify busypattern, then we'll further check the
length of the sound (tone) and silence, which will further reduce the chance of a false positive.

answeronpolarityswitch=yes

Use a polarity reversal to mark when a outgoing call is answered by the
remote party. In some countries, a polarity reversal is used to signal the
disconnect of a phone line.

hanguponpolarityswitch=yes

If the hanguponpolarityswitch option is selected, the call will be considered 
"hung up" on a polarity reversal.

callprogress=yes
progzone=uk

Few zones are supported at the time of this writing, but may be selected
with "progzone".  Progzone also affects the pattern used for buzydetect (unless
busypattern is set explicitly). The possible values are: 
  us (default)
  ca (alias for 'us')
  cr (Costa Rica)
  br (Brazil, alias for 'cr')
  uk

This feature can also easily detect false hangups. The symptoms of this is
being disconnected in the middle of a call for no reason.

tonezone = 0 

Set the tonezone. Equivalent of the defaultzone settings in
/etc/dahdi.conf . This sets the tone zone by number.
Note that you'd still need to load tonezones (loadzone in dahdi.conf).
The default is -1: not to set anything. 0 is US.

ringtimeout=8000

FXO (FXS signalled) devices must have a timeout to determine if there was a
hangup before the line was answered.  This value can be tweaked to shorten
how long it takes before DAHDI considers a non-ringing line to have hungup.
ring timeout will not update on a reload.

 

Sangoma Driver (Wanpipe) Settings

The following settings can be adjusted in the file /etc/wanpipe/wanpipeX.conf
NOTE* Try to fix hang up detection issues using DAHDI settings first !

RM_BATTTHRESH = 3

This value determines the level which the line voltage must be strictly less then in order for the line to be in a "battery removed" state. 

RM_BATTDEBOUNCE = 4 - 16 

This value defines the time period the wanpipe driver will wait for voltage level changes to settle on the line.
So if the far end sends a battery debounce (e.g. drops/reverses the line voltage level to indicate a hangup)  or a battery removal, this variable determines how long the driver will wait before making conclusions about the final battery state / voltage level on the line.
The value is decremented once every 4 interrupt periods (1 ms interrupts) and therefore determines the settling time with the simple relation:

settling time (ms) = RM_BATTDEBOUNCE * 4

External Resources

http://www.voip-info.org/wiki/index.php?page=Asterisk+Disconnect+Supervision
http://www.voip-info.org/wiki/view/Australia+Asterisk+Details

  • No labels