ADSI library

The ADSI library provides facilities to transmit two kinds of Analog Display Services Interface (ADSI) messages. ADSI is defined in Bellcore document GR-1273-CORE. The implementation is intended to be compatible with other similar systems, such as the one used by Telestra (described in DC.002), and that used by Telenet (see TS-103-A etc). The ADSI library is provided in source code form with Prosody so that you can modify it to suit variants of the protocol. This documentation will describe the Bellcore variant, including sufficient technical specification of the implementation to allow you to check compatibility with other variants.

The two messages that the library can send are CND (calling number delivery) and VMWI (visual message waiting indicator). The general principle of ADSI is that these messages are sent on analogue phone lines, with provision for communication even when the phone is on-hook. The whole protocol sequence used to send a message when on-hook is:

Item Duration (mS)Generated by
Ringing 200-300Analogue line card
Open Switching Interval 0-300-
Silence 90-110application
SAS 250-1000 sm_play_sas_cas()
Silence 0-50
CAS 80-85
Silence (DTMF detector active) 155-165
Silence 50-500Application
FSK carrying message varies sm_play_vmwi_fsk() or sm_play_cnd_fsk()
Silence 0-320Application

The sequence used for off-hook transmission is simpler:

Item Duration (mS)Generated by
Silence 0-60application
SAS 250-1000 sm_play_sas_cas()
Silence 0-50
CAS 80-85
Silence (DTMF detector active) 155-165
Silence 50-500Application
FSK carrying message varies sm_play_vmwi_fsk() or sm_play_cnd_fsk()
Silence 0-320Application

The normal Prosody speech API can be used to detect the DTMF acknowledgement (i. e. sm_listen_for()). Two test programs are also provided in the directory $(TiNG)/test, which can exercise the ADSI library. They are cndtest and vmwitest. For simplicity, they merely print out any DTMF digits received, and perform the whole transmission sequence regardless of whether or not any DTMF digits are received.

Using the library

The declarations for this API are in adsilib/adsilib.h, and the code implementing it is in adsilib/adsilib.c, which should be included in any program using this library. Note that, unlike other Prosody APIs, this one does not guarantee backward compatibility.

Details of functions

API details by function


The ADSI library is distributed with Prosody.