libvpb  4.2.61
Collaboration diagram for Caller id generation:

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...
 

Detailed Description

Enumeration Type Documentation

◆ CidDataType

Field type identifiers for CID data.

Enumerator
VPB_CID_EMPTY 

Flag to clear CID data fields.

VPB_CID_DATE_TIME 

Timestamp.

VPB_CID_CALLING_LINE_DN 

Caller directory number.

VPB_CID_CALLED_DN 

Called directory number.

VPB_CID_RFA_CLDN 

Reason for absence of caller number.

VPB_CID_CALLER_NAME 

Caller name.

VPB_CID_RFA_CN 

Reason for absence of caller name.

VPB_CID_CALL_TYPE 

Call type indicator.

VPB_CID_NMSS 

Network message system status.

Function Documentation

◆ vpb_cid_compose_dlp() [1/2]

int WINAPI vpb_cid_compose_dlp ( const VPB_CID cid,
char *  dlp 
)

Create a data link packet from a VPB_CID structure.

Parameters
cidThe VPB_CID structure to send.
dlpPointer to storage for the returned data packet.
Returns
The number of bytes in the dlp.

◆ vpb_cid_compose_dlp() [2/2]

int WINAPI vpb_cid_compose_dlp ( const VPB_CID cid,
char *  dlp 
)

Create a data link packet from a VPB_CID structure.

Parameters
cidThe VPB_CID structure to send.
dlpPointer to storage for the returned data packet.
Returns
The number of bytes in the dlp.

◆ vpb_cid_compose_wav()

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.

Parameters
dlpData link layer packet (as created by vpb_cid_compose_dlp())
dlp_lenThe length of the dlp data (as returned by vpb_cid_compose_dlp())
wav_bufPointer to storage for the returned wav data.
wav_lenPointer to storage for the wav data sample count.
countryLocale specific data about the modulation to use.

◆ vpb_cid_set()

int WINAPI vpb_cid_set ( VPB_CID cid,
CidDataType  field,
void *  value 
)

Set a field in the cid data structure.

Parameters
cidThe VPB_CID structure to initialise.
fieldThe 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.
valueThe value to set field to.
Returns
0 upon success, -1 in the event of error or an invalid value.
Note
Setting some fields may reset other dependent fields to appropriate values.

◆ vpb_cid_t2_compose_wav()

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.

Parameters
dlpData link layer packet (as created by vpb_cid_compose_dlp())
dlp_lenThe length of the dlp data (as returned by vpb_cid_compose_dlp())
wav_bufPointer to storage for the returned wav data.
wav_lenPointer to storage for the wav data sample count.
countryLocale specific data about the modulation to use.

◆ vpb_ring_with_cid()

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.

Parameters
handleThe handle to a station port to ring.
cidThe called id information to transmit.
cadenceThe ring cadence to use. If not specified, the normal ring cadence for the country associated with handle will be used.
Exceptions
variousexceptions may be thrown in the event of an error.
See also
vpb_ring_station_async()