Asterisk Disconnect Supervision
Situation: You have a connection to the PSTN. A caller from the Out There calls in to your PBX. They go into Voicemail, MusicOnHold, or enter a Conference. They hang up. But Asterisk does not notice, and continues recording voicemail messages/playing music/annoying other conference members by relaying a dialtone from the disconnected line. What's happening?
And what about when you have a SIP provider over an IP connection, NOT a PSTN connection? Any clues on that? (PHSchmidt)
Since I (JazEzork) don't have a clue, let me quote a few other people. If someone knows more than me, kindly edit this page.
Rich Adamson said:
"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)."
Mark Spencer said:
"[FXO analog ports] don't detect busy signals. If you have "disconnect supervision" from your phone company (which is easy to test — just plug in a phone with a lighted keypad and watch to see if the keypad blinks off when the other end hangs up — if it does, you have the disconnect supervision), then your FXO should always be able to detect hangup."
"Generally, loopstart does not include hang-up notification unless specifically done through forward-disconnect. Groundstart does include hangup notification as do the E&M based protocols. E&M also provides answer supervision, which neither Groundstart nor Loopstart do."
Steven Critchfield said:
"Under Asterisk, Remote Disconnect Supervision is known as Kewlstart. In the Adtran it may be known just as disconnect supervision. Unless it is provided by the PSTN provider it doesn't help really."
Mike Holloway said:
"CPC (Calling Party Control) is a signal sent from most modern electronic COs to indicate that the "Calling Party" has hung up. It's usually called "Open Loop Disconnect" when you're programming telephone equipment. http://www.sandman.com/cpcbull.html"
"I am betting you have a X100P card. I'm betting you have not enabled progress detection. I'm betting you do not have disconnect supervision. All this combines to give you a simple problem that asterisk doesn't know when the line was hungup and continues to try and service it. You can fix the problem by either getting the correct service, configuring your system to fake disconnect functions, or set a timeout on the call as you enter the section that leaves voicemail so the time allowed in this section is appropriately short and asterisk will hang up afterwards."
- "Progress Detection": set callprogress=yes in zapata.conf
- "Disconnect Supervision": something your telco should be providing to you.
- "Get the correct service": Complain to your telco about them not giving you "disconnection supervision" on your line.
- "Configure the system to fake disconnect functions": probably means to set busydetect=yes or callprogress=yes in zapata.conf
- "Set a timeout on the call": See the AbsoluteTimeout command
Wade J. Weppler said:
"kewlstart signaling ... is by far the most reliable method of telling Asterisk that the line has been disconnected. Trying asking your Telco if they can supply you with Kewlstart or Forward Disconnect Supervision on your line. Basically, all this does is momentarily reverse the polarity on the line to indicate that the line has been disconnected. The Zaptel FXO devices detect this condition to indicate to Asterisk that the line has been disconnected."
"Also check Asterisk's main Makefile for some options related to busydetect. ... Make sure that your voice-menus always have a timeout, so it's impossible for your system to get stuck in one in the first place, should a caller not hang up or this fact not be detected by Asterisk."
- Voicemenu timeout: see the ResponseTimeout command.
James Sharp says:
"Make sure you're using fxs_ks signalling for the FXO channels and also make sure that your incoming lines support disconnect supervision. Otherwise, Asterisk has no idea when the calling party hung up."
Hadley Rich says:
If you live in New Zealand you want to call Telecom Business (even if you have a residential line) and ask for "Clear forward answer reversal". This should get you going with CPC.
Scott Bussinger says:
To enable disconnect supervision on my Qwest lines (in the US) the magic feature to request was "cutoff on disconnect". Once this was turned on, my Sipura SPA-3000 ATA worked great at detecting the disconnect.
How do you find out what, if anything, your telco is providing now?Take a look at the Voice Network Signaling and Control whitepaper by Cisco and grab your trusty voltmeter.
STD Pips (Australia)If you are in Australia, you may find that turning busydetect=yes in your zaptel.conf causes Asterisk to think that STD pips are a busy signal. it seems that the busy-detect code is rather open-minded about what it thinks might be a busy signal. Try turning busydetect=no (do any Australian phone lines suffer this lack of "Disconnection Supervision"?), or try setting busycount to a higher value.
Central Australia (Northern Territory)Out here in the outback, all we get is basic loop start, -48vdc onhook.
I had difficulties getting my Zaptel card to detect when a person hungup.
I had to set my busydetect to yes, and my busycount to 6.
My signalling to fxs_ls. It all works now!
SingaporeIn Singapore, if CPC is provided by Singtel, there is a line reversal when the call answers and another when the caller hangs up. Kewstart hangs up the call when the call answers. I have only tested this with an X101p. Will the same occurs when using a TDM400p. The only solution was to change to loopstart and use busydetect to hang up the call. Could the zaptel code be modified to recognised answer and well as hangup. Maybe I could post a bounty?
UKIn the UK, if you are using BT and are having problems with Asterisk not detecting hangups when using a TDM400P, contact BT and ask what the current "Disconnect Clear Time" setting is for your phone line. Mine was set to 100 and increasing it to 800 fixed the issue. "Disconnect Clear Time" (DCT) is BT's name for CPC. You will need to speak to the BT Faults service--they can check to see what your DCT/CPC is set to and reset it instantly to another value.
BT have two analogue line specifications: single line (BT SIN 351), and multiline (BT SIN 352), which explain the different forward disconnect parameters (http://www.sinet.bt.com/). These specifications state that for single line (like most of us have), the disconnect time is between 90ms and 130ms, for multiline it is 800ms. My impression is that the rest of the World (North America included) has a disconnect time in excess of 500ms, this explains why the default behaviour of zaptel (Digium and Sangoma cards alike) don't play well with single line BT phone lines for disconnect supervision.
When ordering lines from BT - especially feature lines or business lines ask the sales person to set lines to PABX working.
See a Workaround here
Asterisk | Asterisk FAQ
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+