|
libvpb
4.2.54
|
The libvpb api functions for the programmable tone detector are described here.
When a tone is detected, a VPB_TONEDETECT event is placed on the event queue with the tone identifier in the data element of the event structure. There are 9 pre-defined tones, which default to a selection of standard tones but which may be redefined to suit local requirements. They are:
VPB_DIAL - dial for USVPB_RINGBACK - ringback for USVPB_BUSY - busy for USVPB_GRUNT - grunt detectedVPB_RINGBACK_308 - ringback from Studio 308 PBXVPB_BUSY_308 - busy from studio 308 PBXVPB_FAX - fax CNG tone/preambleVPB_BUSY_AUST - busy/disconnect for AustraliaVPB_RINGBACK_AUS - ringback for AustraliaUp to 10 tone detectors can be independently defined for each port of each board. To redefine a pre-defined tone, specify its tone identifier as the tone_id parameter of the VPB_DETECT structure when programming.
The tone detectors may be controlled either by direct calls to the api functions with a user specified TONE_DETECT structure or by setting the VPB_TONE and VPB_TONE1 ... VPB_TONE9 variables in the environment where the application is started.
The parameters required to detect a particular tone may be computed manually with reference to the appropriate standards that define it, or computed from a recorded tone with the assistance of the tonetrain utility which is provided with libvpb.