SQLphone developer site home page
Detecting Hang-Up Tone
SQLphone Runtime detects caller hang-up in two ways:
- detect loop current drop
- detect hang-up tone
In order for SQLphone to detect caller hang-up, there MUST be something to detect (current-drop or tone). Not all phone lines do (1) when a caller hangs-up, so you may need to define the hang-up tone. Your PBX manual may define the hang-up tone specification. Or you can record the hang-up tone and analyse it.
How to record hang-up tone
It is straightforward to record and analyse a hang-up tone frequency using a Dialogic card, as follows:
- Close SQLphone Runtime
- Download and run this test program: DxTest.exe
- Open a channel (menu > File > Open)
- Call-in to this channel from another phone
- Answer the call (menu > Action > Off Hook)
- Start recording (menu > Record)
- Hang-up the phone that you called-in from
- Wait for recording to complete
The recording file will contain the hang-up tone. Frequency analysis of the file (e.g. using a wave editor like WaveLab) can determine the frequencies present and the on/off time periods. Alternatively, send us the wave file, we will analyse it and suggest settings.
SQLphone hang-up tone settings
When the tone has been analysed, setup SQLphone Runtime to detect the tone:
- Start SQLphone Runtime
- Go to: menu > phone > hangup
- Enter the tone specification
Avoid Infinite Loops
It is very important to avoid infinite loops within your flowchart. If a hang-up is not detected (it's not always 100% reliable), you want to avoid the flowchart getting stuck in a loop, waiting for a caller to press digits.
You can usually avoid infinite loops by adding retry counters to digit boxes, so if the caller fails to respond after N attempts, the box can branch to another box (or to end).
Setup a retry counter as follows:
- Double-click a Digit box to view its properties
- Click the Conditions tab
- Click "enable retry counter" and choose a number of tries (2 or 3 is typical)
- Click OK
This adds a new condition to the box. You can leave this condition un-joined, so the call will end if no digits are pressed after N tries. Or join the condition to another box, to perform actions prior to ending the call.