Detecting End of Call

On systems using VoIP - SIP or T1/E1 ISDN end of call is detectable by:

- End of call message.
- Timeout awaiting input from caller.

On systems using Analog Telephony Cards (eg: Dialogic D/4PCI) end of call is detectable by:

- Loop Current Drop on the line.
- Disconnect tone on the line.
- Special DTMF tone played by PBX/Switch.
- Timeout awaiting input from caller.

On systems using Voice Modems end of call detection is made by:

- Disconnect tone on the line.
- Timeout awaiting input from caller.


End of Call Message

VoIP and ISDN systems all use digital signalling to immediately indicate end of call when the other party hangs up the handset. This is the most reliable way of obtaining end of call signal. No special configuration is required in order fro the system to detect the ISDN end of call signalling. VoiceGuide will detect the VoIP and ISDN signalling immediately and will end the script and hangup the line as well.


Loop Current Drop

Loop current drop is used by many telephone companies and PBXs to indicate end of call (other party has hung up). Telephony Cards can detect loop current drop and will inform VoiceGuide of it - VoiceGuide will then immediately hang up as well. Please note that sometimes a loop current drop can be delayed and can arrive several seconds after caller has hung up.


Timeout awaiting input from caller

If there is a timeout awaiting a response from the caller then VoiceGuide will by default hangup the call.
If however a 'timeout' or a 'fail' path has been set up in that module, then that path will be taken instead.
'Timeout' or 'fail' paths should not be used to advance script from one module that expects a response from caller to another module that again expects some response from caller, as this will just delay the system hanging up the call.


Disconnect Tone

A tone is usually played on the line when the caller has hung up. This tone is known as a 'busy tone' or a 'disconnect tone'. PBXs can be configured to play a tone, or send a DTMF tone (usually tone "D") to indicate end of call.

Detection of disconnect tones: Voice modems come pre-programmed with sets tones that they will detect as 'end-of-call' tones - which cannot be changed. Some voice modems detect end-of-call tones well, but some do not. Telephony cards also come pre-programmed with sets tones that they will detect as 'end-of-call' tones, but can also be be programmed what disconnect tones to listen for. This allows telephony card to have its end-of-call (disconnect) tone detection matched to those played on the line used.

Accuracy of tone detection with telephony cards is much better then with modems. Some modems do not detect tones and some falsely detect disconnect tones while playing/recording sound files or when a DTMF key is pressed by the caller.


Determining the Disconnect tone frequency and cadence :

Dialogic has the PBXpert application which automates the detection and setting of disconnect tones. This is a good tool to use if you have access to 2 lines attached to the Dialogic card.

Otherwise please see instructions below for recording and determining frequencies when only a single analog line is available:

To find out the frequencies of the disconnect tone played by your telephone system just record it using VoiceGuide's Record module (just start recording then hang up) and then analyze the frequencies using any of the more advanced sound editors

eg: when using Audacity ( :

1. Open the file in Audacity
2. Highlight the section of the sound file where the tone is present (the "ON" part of the tone)
3. Go to "View" menu and select "Plot Spectrum"
4. Note at what frequency the peak(s) is/are.
5. Highlight the entire section when tone is ON and check the interval, looking at the selection's timing data at bottom of Audacity's window.
6. Highlight the entire section when tone is OFF and check the interval, looking at the selection's timing data at bottom of Audacity's window.

Screenshot below shows Audacity with a disconnect tone with the ON part of the disconnect tone highlighted. The Selection interval timing is displayed at the bottom of the window - in this case the ON part of the tone lasts about 250milliseconds (0.250 seconds).

Below screenshot shows the Frequency analysis window which is shown when Audacity's "View"-> "Plot Spectrum" menu is selected.

The peak is at 428Hz.

Screenshot below shows Audacity with a disconnect tone with the OFF part of the disconnect tone highlighted. The Selection interval timing is displayed at the bottom of the window - in this case the OFF part of the tone lasts about 750milliseconds (0.750 seconds).

Based on the above information the disconnect tone in he example above is a single tone of 428Hz which lasts about 250ms and then a period of silence which lasts about 750ms.

The recommended settings for Dialogic cards to detect this tone reliably would be:

Freq1: 428
Freq1 dev: 40
Freq2: 0
Freq2 dev: 0
On time: 25
On time dev: 5
Off time: 75
Off time dev: 5
Repetition count: 3

When specifying the On/Off times (cadence times) for Dialogic the lengths of time are in units of 10milliseconds, so a value of 25 represents 250milliseconds.

For allowed variances (deviations) in frequency and time it's usually appropriate to use about 10% of the value for variance. For 'cadence' usually a value of 5 is OK (a value of 5 is 50 milliseconds). If trying to detect a continuous tone which does not have ON/OFF cadence you should set the "Repetition Count" to be 0 and the OFF time to 0 as well.

VoiceGuide 7 and VoiceGuide 6 :

The Disconnect tone must be set in ConfigLine.xml file which can be found in VoiceGuide's \data\ subdirectory.

The Tone definitions which should be edited is the DISCONNECT_USER_1 or DISCONNECT_USER_2 (DISCONNECT_TAPI1 or DISCONNECT_TAPI2 in v6). The TID_DISCONNECT tone definition is only used on outbound calls, and it can also be changed if required.

An example entry in ConfigLine.xml:

<Notes>Disconnect Tone</Notes>



DTMF Disconnect tones :

Detection of DTMF disconnect tones : VoiceGuide is configured by default to react to DTMF key "D" as an indication of disconnect. Selection of which DTMF tone should be used by VoiceGuide as a disconnection tone can be made in the [PBX] section of the VG.INI file.

There have been a few good threads covering this on VoiceGuide's Support Forum:


In general Dialogic cards are pretty good at correctly detecting disconnection tones and if the tones are defined with low tolerance bands then the probability of false detections is low. If the tolerance bands however are set widely, allowing a wide range of tones and/or frequencies then false detections of disconnect tones can occur just while a person is speaking or a sound file is being played. As disconnect tone detections will result in the call being ended immediately it is imperative that the possibility of false detections is as low as possible.

One of the situations where disconnect tone definition parameters need to be set broadly is when a number of different disconnect tones needs to be detected. To setup the system to detect a variety of tones it would be necessary to record all the tones which you want the system needs to detect, analyze them with Audacity to find out the frequencies and timings and then come up with the one global setting which will be able to detect them all - keeping in mind that the broader the tolerances the higher the chance of false busy detections... In situations like these using T1/E1 ISDN lines would be a better solution.

NB. VoiceGuide allows for a different ConfigLine.xml file to be used for each channel - so each channel can have it's own tone configurations. Use <ConfigLine> tag within the <Channel> entry to specify the LinesConfig.xml file specific for that channel. eg:



End of Call Detection: Special DTMF tone played by PBX/Switch

Some PBXs and Switches can be set up to play a DTMF tone on the line when the PBX/Switch detects that the other party has hung up. The DTMF tone chosen to indicate that is usually the "D" tone.

Most telephone handsets do not have the DTMF A, B, C and D tones on their keypad, so the callers cannot generate these tones themselves (either intentionally or by mistake). This makes the "DTMF Disconnect Tone" a very useful way of detecting end of call.

If the PBX or Switch is capable of generating DTMF tone at end of call then we highly recommend using this approach as it is a very reliable way of informing VoiceGuide immediately when the call has finished.

The DTMF Disconnect Tone for which VoiceGuide will listen and use as an indication of end of call can be set by selecting "PBX Command Strings" from the "Edit" menu in VoiceGuide Script Designer:



© Katalina Technologies Pty. Ltd.