libvpb
4.2.61
|
Modules | |
Japanese caller id | |
Additional support for the Japanese caller id standard. | |
Macros | |
#define | VPB_CID_MAX_BUF 20400 |
Maximum size of CID wav data. | |
#define | VPB_CID_MAX_DLP 256 |
Maximum size of CID dlp data. | |
Enumerations | |
enum | CidDataType { VPB_CID_EMPTY = 0 , VPB_CID_DATE_TIME = 1 , VPB_CID_CALLING_LINE_DN = 2 , VPB_CID_CALLED_DN = 3 , VPB_CID_RFA_CLDN = 4 , VPB_CID_CALLER_NAME = 7 , VPB_CID_RFA_CN = 8 , VPB_CID_CALL_TYPE = 0x11 , VPB_CID_NMSS = 0x13 } |
Field type identifiers for CID data. More... | |
High level functions | |
int WINAPI | vpb_cid_set (VPB_CID *cid, CidDataType field, void *value) |
Set a field in the cid data structure. More... | |
void WINAPI | vpb_ring_with_cid (int handle, const VPB_CID &cid, int cadence=-1) |
Start handle ringing and send type 1 caller id information. More... | |
void WINAPI | vpb_send_cid_t2_sync (int handle, const VPB_CID &cid) |
Send type 2 caller id information to handle. | |
Low level functions | |
int WINAPI | vpb_cid_compose_dlp (const VPB_CID &cid, char *dlp) |
Create a data link packet from a VPB_CID structure. More... | |
int WINAPI | vpb_cid_compose_dlp (const VPB_CID *cid, char *dlp) |
Create a data link packet from a VPB_CID structure. More... | |
void WINAPI | vpb_cid_compose_wav (const char *dlp, int dlp_len, short *wav_buf, int *wav_len, const Country *country=NULL) |
Encode a data link packet into CP-FSK wav data for type 1 CID. More... | |
void WINAPI | vpb_cid_t2_compose_wav (const char *dlp, int dlp_len, short *wav_buf, int *wav_len, const Country *country=NULL) |
Encode a data link packet into CP-FSK wav data for type 2 CID. More... | |
enum CidDataType |
Field type identifiers for CID data.
int WINAPI vpb_cid_compose_dlp | ( | const VPB_CID & | cid, |
char * | dlp | ||
) |
int WINAPI vpb_cid_compose_dlp | ( | const VPB_CID * | cid, |
char * | dlp | ||
) |
void WINAPI vpb_cid_compose_wav | ( | const char * | dlp, |
int | dlp_len, | ||
short * | wav_buf, | ||
int * | wav_len, | ||
const Country * | country = NULL |
||
) |
Encode a data link packet into CP-FSK wav data for type 1 CID.
The resulting wav includes the required CSS and MSS headers.
dlp | Data link layer packet (as created by vpb_cid_compose_dlp() ) |
dlp_len | The length of the dlp data (as returned by vpb_cid_compose_dlp() ) |
wav_buf | Pointer to storage for the returned wav data. |
wav_len | Pointer to storage for the wav data sample count. |
country | Locale specific data about the modulation to use. |
int WINAPI vpb_cid_set | ( | VPB_CID * | cid, |
CidDataType | field, | ||
void * | value | ||
) |
Set a field in the cid data structure.
cid | The VPB_CID structure to initialise. |
field | The VPB_CID field to set. If VPB_CID_EMPTY is passed here, then value will be ignored and all fields will be reset to their default values. |
value | The value to set field to. |
0
upon success, -1
in the event of error or an invalid value. void WINAPI vpb_cid_t2_compose_wav | ( | const char * | dlp, |
int | dlp_len, | ||
short * | wav_buf, | ||
int * | wav_len, | ||
const Country * | country = NULL |
||
) |
Encode a data link packet into CP-FSK wav data for type 2 CID.
The resulting wav includes the required MSS headers.
dlp | Data link layer packet (as created by vpb_cid_compose_dlp() ) |
dlp_len | The length of the dlp data (as returned by vpb_cid_compose_dlp() ) |
wav_buf | Pointer to storage for the returned wav data. |
wav_len | Pointer to storage for the wav data sample count. |
country | Locale specific data about the modulation to use. |
void WINAPI vpb_ring_with_cid | ( | int | handle, |
const VPB_CID & | cid, | ||
int | cadence = -1 |
||
) |
Start handle ringing and send type 1 caller id information.
This function will return once the normal ring cadence has begun. That may be several seconds from the time it is first called.
handle | The handle to a station port to ring. |
cid | The called id information to transmit. |
cadence | The ring cadence to use. If not specified, the normal ring cadence for the country associated with handle will be used. |
various | exceptions may be thrown in the event of an error. |