SQLphone developer site home page


Detecting Hang-Up Tone

SQLphone Runtime detects caller hang-up in two ways:

  1. detect loop current drop
  2. 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:

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:

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:

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.