libvpb  4.2.61
apifunc.h File Reference

Common internal helper functions. More...

#include "comm.h"
#include "wobbly.h"
Include dependency graph for apifunc.h:
This graph shows which files directly or indirectly include this file:

Functions

int RunTimeError (const Wobbly &w, const char *api_function)
 
void CheckHandle (VPBPortHandle handle, const char *where)
 Check for a valid device handle. More...
 
void ValidHandleCheck (int handle)
 
void validate_digits (const char *digits)
 Validate a NULL terminated string of DTMF digits. More...
 
int putevt (VPB_EVENT *event, unsigned long mask=0)
 Internal function to place an event on the API event queue. More...
 
void apifunc_trace (char s[])
 
int get_driver_type (int board)
 Return the symbolic type of the driver for board.
 
VPB_MODEL get_board_type (int board)
 Return the symbolic VPB_MODEL type of a board.
 
void get_board_model (int board, char *s)
 Return a descriptive model name for board in s.
 
VPB_PORT get_port_type (int board, int port)
 Return the type of a port on some board. VPB_FXO or VPB_FXS.
 
size_t get_total_port_count ()
 Return the total number of ports on all registered boards.
 
void set_country (int board, int port, const Country *country)
 Set the country data for port on board.
 
const Countryget_country (int board, int port)
 Return the country data for port on board.
 
void ring_station_async (int board, int port, int cadence)
 Internal function to control ringing on port of board.
 
void set_codec_reg (int handle, unsigned short addr, unsigned short data, Comm *comm)
 Write directly to a V4PCI codec register. More...
 

Variables

Commvpb_c
 Pointer to the global comm object. More...
 

Detailed Description

Common internal helper functions.

This file declares some commonly used functions that implement api features but which are not exposed to the application programmer.

VTCore::SetVDAAImpedance
void SetVDAAImpedance(int port, int impedance)
Override the default impedance for VDAA ports.
Definition: vtcore.cpp:974
OpenPri::PadTxFrame
void PadTxFrame(int port)
Pad a partial transmit frame for forwarding to the hardware.
Definition: openpri.cpp:2620
vpb_get_event_count
int WINAPI vpb_get_event_count()
Returns the number of events on the global event queue.
Definition: vpbapi.cpp:1927
vpb_record_get_hw_gain
float WINAPI vpb_record_get_hw_gain(VPBPortHandle handle)
Return the hardware record gain for a port.
Definition: playrec.cpp:1565
VpbException::what
const char * what() const
Return the message associated with the exception.
Definition: vpbapi.h:1258
VPB_DETECT::twist
int16_t twist
Allowable difference in tone powers.
Definition: vpbapi.h:1618
HostDSP::SetHookState
virtual void SetHookState(int port, HookState hookstate)=0
Set the hook state of port.
V4PCI_DSP::SetHookState
void SetHookState(int port, HookState hookstate)
Set the hook state of port.
Definition: comm.cpp:317
VPBHANDLE::VPBHANDLE
VPBHANDLE(int boardnum, int port)
Convenience constructor.
Definition: vpbreg.h:104
V4PCIDspFifo::HowFull
size_t HowFull()
Return the number of words used in the DSP FIFO.
Definition: dspfifo.cpp:187
TONE::c
char c
The identifying character to map to this tone.
Definition: vpbdial.cpp:62
validate_digits
void validate_digits(const char *digits)
Validate a NULL terminated string of DTMF digits.
Definition: digits.cpp:115
HostDSP::PadTxFrame
virtual void PadTxFrame(int port)=0
Pad a partial transmit frame for forwarding to the hardware.
VPBREG::ddmodel
uint16_t ddmodel
VPB Device Driver model.
Definition: vpbreg.h:149
VPBREG::chstat
uint16_t chstat[MAXCH]
status of each channel
Definition: vpbreg.h:128
Audio::linear_gain
float linear_gain
linear gain
Definition: playrec.cpp:79
vpb_sethook_sync
void WINAPI vpb_sethook_sync(VPBPortHandle handle, HookState hookstate)
Set the hook state of a port. Waits for it to change before returning.
Definition: vpbapi.cpp:2073
ADPCMCompression
Definition: comp.h:75
OPT_FILHEADER
Definition: coff.cpp:114
vpb_put_event
int WINAPI vpb_put_event(VPB_EVENT *event)
Places an event on the global and port specific event queues.
Definition: vpbapi.cpp:1900
DTMF_DIGIT
Definition: vpbdial.cpp:80
Country::flash_time
uint16_t flash_time
Generated hook flash time in ms.
Definition: vpbapi.h:1739
ToneGen::Config::Config
Config()
Default constructor.
Definition: tonegen.h:242
ToneGen::Config::GetNextCadence
const Cadence & GetNextCadence()
Return the next cadence timing in the sequence.
Definition: tonegen.h:468
vpb_open
VPBPortHandle WINAPI vpb_open(unsigned int board, unsigned int port, VPBOpenMode flags)
Open a port on some board for use.
Definition: vpbapi.cpp:1594
vpb_play_set_hw_gain
void WINAPI vpb_play_set_hw_gain(VPBPortHandle handle, float gain)
Set the hardware play gain component for a port.
Definition: playrec.cpp:997
ToneGen::ImplStop
virtual void ImplStop()
Called by Stop() for implementation specific operations.
Definition: tonegen.h:512
VPB_TONE_CONGESTION
@ VPB_TONE_CONGESTION
Network congestion tone.
Definition: vpbapi.h:1430
ToneGen::Config::Cadence::offms
unsigned int offms
Off time in ms.
Definition: tonegen.h:138
VPBRegister::GetCountryCode
unsigned int GetCountryCode() const
Return the global country code from vpb.conf.
Definition: vpbreg.h:335
VTCore::Reset
void Reset(unsigned int port)
Reset port to its default cold-start state.
Definition: vtcore.cpp:821
vpb_record_file_sync
int WINAPI vpb_record_file_sync(VPBPortHandle handle, const string &file_name, AudioCompress mode)
Utility function to record a wav file from a port.
Definition: playrec.cpp:1513
VTCore::SetCountry
void SetCountry(int port, const Country *country)
Configure the hardware for country on port of this board.
Definition: vtcore.cpp:857
ToneGen::Config::Freq
Data storage for a ToneGen frequency component.
Definition: tonegen.h:113
VPB_STRAN::tmin
uint16_t tmin
minimum tone on/off time (non timer) in ms
Definition: vpbapi.h:1600
VPB_RECORD_TIMEOUT
#define VPB_RECORD_TIMEOUT
Set recording parameters for a port.
Definition: vpbapi.h:1225
VPBREG
The DSP program "registry" info for each board.
Definition: vpbreg.h:115
vpb_open
VPBPortHandle WINAPI vpb_open(unsigned int board, unsigned int port, VPBOpenMode flags=VPB_OPEN_DEFAULTS)
Open a port on some board for use.
Definition: vpbapi.cpp:1594
VPB_CARD_INFO::date
char date[16]
Manufacture Date.
Definition: vpbapi.h:209
Play::List
std::vector< Play > List
Container type for a list of playback states.
Definition: playrec.cpp:113
ToneGen::GetState
State GetState() const
Return the current state of this ToneGen.
Definition: tonegen.h:651
vpb_wave_close_read
void WINAPI vpb_wave_close_read(WFILE *wav)
Close a RIFF wave file after reading.
Definition: wave.cpp:406
VPBREG::base
uint16_t base
base address of VPB
Definition: vpbreg.h:143
HostDSP::HostDSP
HostDSP(bool, VPBREG &reg)
Bare bones constructor for hardware DSP implementations.
Definition: vpbreg.h:204
VPB_STRAN
Cadence state transition data for VPB_DETECT.
Definition: vpbapi.h:1591
Country::lv_onhook
uint16_t lv_onhook
On hook voltage threshhold in V.
Definition: vpbapi.h:1743
get_total_port_count
size_t get_total_port_count()
Return the total number of ports on all registered boards.
Definition: apifunc.cpp:140
VPB_DETECT::glitch
uint16_t glitch
short transitions of glitch ms ignored
Definition: vpbapi.h:1623
vpb_get_event_count_ch
int WINAPI vpb_get_event_count_ch(VPBPortHandle handle)
Returns the number of events on the port specific event queue for handle.
Definition: vpbapi.cpp:1922
VPB_CID_JP
Definition: vpbapi.h:2269
vpb_event_callback
void(WINAPI * vpb_event_callback)(VPB_EVENT *e, void *context)
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:644
V4PCIDspFifo::Write
Status Write(uint16_t *buf, size_t len)
Write a block of words from the PC to a DSP FIFO.
Definition: dspfifo.cpp:110
OpenPri
Definition: openpri.h:71
PLAY_FILE_ASYNC_ARGS
Data for play_file_async_thread()
Definition: playrec.cpp:154
HostToneGen::HostToneGen
HostToneGen()
Default constructor.
Definition: tonegen.h:873
VPB_OPEN_RESET
const VPBOpenMode VPB_OPEN_RESET
Reset the port state.
Definition: vpbapi.h:130
VPB_CID::cn
char cn[21]
Caller name.
Definition: vpbapi.h:2088
VPB_AUDIO_TERMINATE_SYNC
@ VPB_AUDIO_TERMINATE_SYNC
Sync terminate requested.
Definition: vpbapi.h:746
VPB_PORT
VPB_PORT
Analogue port types.
Definition: vpbapi.h:89
DigitCollect
Definition: digits.cpp:50
vpb_cid_decode2
int WINAPI vpb_cid_decode2(VPB_CID *cli_struct, const short *in, int n)
Attempt to extract all caller id information from a buffer of samples.
Definition: cid.cpp:615
VPB_DIGITS::term_digits
const char * term_digits
A list of specific digits that may terminate collection.
Definition: vpbapi.h:1972
VPBREG::board
int board
listening board number
Definition: vpbreg.h:177
putevt
int putevt(VPB_EVENT *event, unsigned long mask=0)
Internal function to place an event on the API event queue.
Definition: vpbapi.cpp:1949
ToneGen::Config::Freq::ListList
std::vector< List > ListList
Container type for a list of Freq::List structures.
Definition: tonegen.h:120
vpb_record_terminate
int WINAPI vpb_record_terminate(int handle)
Stop audio recording.
Definition: playrec.cpp:1631
set_country
void set_country(int board, int port, const Country *country)
Set the country data for port on board.
Definition: vpbapi.cpp:799
vpb_get_event_mask
unsigned long WINAPI vpb_get_event_mask(VPBPortHandle handle)
Return the current event mask for handle.
Definition: vpbapi.cpp:1848
VPB_CID
Container type for caller id data.
Definition: vpbapi.h:2081
VPBOpenMode
int VPBOpenMode
Symbolic type for vpb_open() mode flags.
Definition: vpbapi.h:124
VPB_CID_CT_MW
@ VPB_CID_CT_MW
Message waiting.
Definition: vpbapi.h:2076
VPB_MD
#define VPB_MD
The maximum number of tone detectors per device.
Definition: vpbapi.h:1573
ToneGen::Config::Freq::Freq
Freq()
Default constructor.
Definition: tonegen.h:126
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)
Encode a data link packet into CP-FSK wav data for type 1 CID.
Definition: cidg.cpp:297
vpb_disable_event
int WINAPI vpb_disable_event(VPBPortHandle handle, unsigned long mask)
Disable the events specified by mask for handle.
Definition: vpbapi.cpp:1862
VPB_CID_RFA_CLDN
@ VPB_CID_RFA_CLDN
Reason for absence of caller number.
Definition: vpbapi.h:2172
VPBREG::defSbal1
uint16_t defSbal1
default codec balance register 1 for station
Definition: vpbreg.h:159
Record::Record
Record()
Default constructor.
Definition: playrec.cpp:139
vpb_get_port_country
const Country *WINAPI vpb_get_port_country(VPBPortHandle handle)
Get the current country data for port handle.
Definition: vpbapi.cpp:861
Country::List
std::vector< const Country * > List
Container type for a list of pointers to Country structures.
Definition: vpbapi.h:1732
VPB_RINGBACK_AUS
#define VPB_RINGBACK_AUS
ringback detected (Australia)
Definition: vpbapi.h:1640
voxstate
Definition: hostvox.cpp:41
ToneStateTransition
ToneStateTransition
Tone detector state transition types.
Definition: vpbapi.h:1580
Country::fsk_space
double fsk_space
Coefficient for cid generation.
Definition: vpbapi.h:1751
HostToneGen::MixTone
bool MixTone(int16_t *buf, size_t samples)
Add the next samples of this tone to the signal in buf.
VPB_DEV::evtmask
unsigned long evtmask
The current event mask.
Definition: vpbapi.cpp:113
Comm::WaitForMessageVPB
void WaitForMessageVPB(unsigned short board, uint16_t *mess, unsigned short mtype, unsigned short wait)
Wait for a DSP message of a certain type.
Definition: comm.cpp:541
VPBREG::cardtypnum
int cardtypnum
The number of the card of this type.
Definition: vpbreg.h:171
HostDSP::TapListen
virtual void TapListen(unsigned int port, unsigned int srcboard, unsigned int srcport)
Create a full duplex tap to port of the audio from srcport on srcboard.
Definition: vpbreg.h:291
Init
static int Init
Device initialisation flag.
Definition: vpbapi.cpp:165
vpb_get_card_info
int WINAPI vpb_get_card_info(int board, VPB_CARD_INFO *detail)
Return detail of the card model and revision for board.
Definition: vpbapi.cpp:3141
VPB_DEV::APIQ
HostFifo APIQ
Per channel API event Q object.
Definition: vpbapi.cpp:125
VPB_VLOG::channel
short channel
Channel number.
Definition: vpbapi.h:1833
vpb_wave_get_size
size_t vpb_wave_get_size(WFILE *wav)
Return the size of wave file data in bytes.
Definition: wave.cpp:509
vpb_get_driver_version
const char *WINAPI vpb_get_driver_version()
Return the driver version as a string.
Definition: vpbapi.cpp:749
VPB_EVT_NONE
@ VPB_EVT_NONE
Definition: vpbapi.h:446
AGCBOX
Definition: v4logagc.cpp:37
Play
Audio playback state data
Definition: playrec.cpp:110
Audio
Base class for play/record state.
Definition: playrec.cpp:72
VPB_FXO
@ VPB_FXO
Trunk port.
Definition: vpbapi.h:92
Record::v4log_agcstate
void * v4log_agcstate
AGC state (V4LOG card only)
Definition: playrec.cpp:132
vpb_play_buf_finish_sync
void WINAPI vpb_play_buf_finish_sync(VPBPortHandle handle)
Signal completion of audio playback and release a port for other users.
Definition: playrec.cpp:948
VPB_STRAN::type
uint16_t type
VPB_TIMER, VPB_RISING, or VPB_FALLING
Definition: vpbapi.h:1598
V4PCI_DSP
DSP interface implementation for OpenLine cards.
Definition: comm.h:54
vpb_hostecho_off
int WINAPI vpb_hostecho_off(int h)
Disable the host echo canceller for handle.
Definition: vpbapi.cpp:3209
VPB_BRIDGE_ON
@ VPB_BRIDGE_ON
start bridging
Definition: vpbapi.h:385
get_board_type
VPB_MODEL get_board_type(int board)
Return the symbolic VPB_MODEL type of a board.
Definition: vpbapi.cpp:2492
ToneGen::State
State
ToneGen state information
Definition: tonegen.h:92
Audio::sw_gain
float sw_gain
software gain parameter
Definition: playrec.cpp:78
Country::lv_offhook
uint16_t lv_offhook
Off hook voltage threshhold in V.
Definition: vpbapi.h:1744
VTCORE_CARD
Definition: utilfuncs.h:127
vpb_get_event_async
int WINAPI vpb_get_event_async(VPB_EVENT *event)
Fetch the next event from the global event queue.
Definition: vpbapi.cpp:2006
vtcore_chan
Definition: vtcore.h:48
ToneGen::BeginSequence
void BeginSequence(Config *tone, bool sync=false)
Prepare the tone generator for playing a sequence of related tones.
Definition: tonegen.h:696
VPB_AUDIO_IDLE
@ VPB_AUDIO_IDLE
No port audio playing.
Definition: vpbapi.h:742
Record::List
std::vector< Record > List
Container type for a list of recording states.
Definition: playrec.cpp:124
VPB_DEV::event_callback
vpb_event_callback event_callback
Optional event callback.
Definition: vpbapi.cpp:119
vpb_echo_canc_get_sup_thresh
int WINAPI vpb_echo_canc_get_sup_thresh(int handle, short *thresh)
Get the current echo suppressor threshold.
Definition: vpbapi.cpp:2425
VTCore::hook_state
HookState hook_state(int ch)
Get the hook state of a port.
Definition: vtcore.cpp:1296
vpb_wave_open_write
void WINAPI vpb_wave_open_write(WFILE **wav, const std::string &filename, int mode)
Open a RIFF wave file for writing.
Definition: wave.cpp:151
vpb_loopback_on
int WINAPI vpb_loopback_on(int handle)
Turns on software loop-back of tx->rx in the kernel.
Definition: vpbapi.cpp:3158
VPB_MODEL_UNKNOWN
@ VPB_MODEL_UNKNOWN
Placeholder for when card type is not yet known.
Definition: vpbapi.h:85
HostDSP::SetCountry
virtual void SetCountry(int port, const Country *country)=0
Configure the hardware for country on port of this board.
VPB_CID::pres
char pres[256]
Storage for presentation layer data.
Definition: vpbapi.h:2094
VPB_CID_CALL_TYPE
@ VPB_CID_CALL_TYPE
Call type indicator.
Definition: vpbapi.h:2175
VPB_TONE::level1
float level1
first tone level in dB, -inf to 0dB
Definition: vpbapi.h:1468
VPB_TONE::freq1
unsigned short freq1
frequency of first tone in Hz
Definition: vpbapi.h:1465
VPB_CID::ra_cldn
char ra_cldn[2]
Reason for absence of cldn, O or P.
Definition: vpbapi.h:2087
DD_VTCORE
#define DD_VTCORE
VTCore card driver.
Definition: vpbreg.h:89
HostDSP::SetPSImpedance
virtual void SetPSImpedance(int port, int impedance)
Override the default impedance for ProSLIC ports.
Definition: vpbreg.h:232
vpb_gettonedet
void WINAPI vpb_gettonedet(VPBPortHandle handle, int id, VPB_DETECT *d)
Set or change the parameters for a tone to detect on some port.
Definition: vpbtoned.cpp:322
SYMBOL_ENTRY
Definition: coff.cpp:144
VPBREG::szmess
uint16_t szmess
size in words of message FIFOs
Definition: vpbreg.h:131
VPB_TONE::next
VPB_TONE * next
Pointer to the next tone in a sequence.
Definition: vpbapi.h:1483
VPB_RAW
@ VPB_RAW
Raw data, no encoding.
Definition: vpbapi.h:734
get_driver_type
int get_driver_type(int board)
Return the symbolic type of the driver for board.
Definition: vpbapi.cpp:2486
VPB_DEV::devstate
DevState devstate
Flag to indicate if this device has been opened or not.
Definition: vpbapi.cpp:110
Audio::mutex
pthread_mutex_t mutex
global state protection
Definition: playrec.cpp:80
VTCore::WaitForTxEmpty
void WaitForTxEmpty(int port)
Block until the transmit buffers for port are empty.
Definition: vtcore.cpp:949
HostToneGen
Host based tone generator implementation.
Definition: tonegen.h:815
VPB_CARD_INFO::rev
char rev[8]
Revision.
Definition: vpbapi.h:210
VPB_DEV::~VPB_DEV
~VPB_DEV()
Default destructor.
Definition: vpbapi.cpp:147
VPB_CID::VPB_CID
VPB_CID()
Default constructor.
Definition: vpbapi.h:2097
VPB_CALL
Definition: vpbapi.h:1383
VPB_CID_CALLED_DN
@ VPB_CID_CALLED_DN
Called directory number.
Definition: vpbapi.h:2171
WAVE
Definition: wave.cpp:60
vpb_set_global_apiq_size
void WINAPI vpb_set_global_apiq_size(int size)
Set the maximum number of events the global APIQ may hold.
Definition: vpbapi.cpp:785
VPB_DETECT::nstates
uint16_t nstates
number of cadence states
Definition: vpbapi.h:1609
VPB_MVOXOFF
#define VPB_MVOXOFF
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:515
HostDSP::UNListen
virtual void UNListen(unsigned int port)
Remove a half duplex bridge or full duplex tap from port.
Definition: vpbreg.h:302
vpb_set_country
void WINAPI vpb_set_country(const Country *country)
Set the global default country specific information.
Definition: vpbapi.cpp:836
OBJS
Definition: objtrack.cpp:41
ToneGen::Config::ClearTones
void ClearTones()
Clear all frequency and cadence data from this Config.
Definition: tonegen.h:345
ToneGen::List
std::vector< ToneGen * > List
Container type for a list of pointers to ToneGen structures.
Definition: tonegen.h:86
ToneGen
Base type for the programmable tone generator interface.
Definition: tonegen.h:81
callhis
Definition: call.cpp:73
OL_INFO
Definition: utilfuncs.h:115
vpb_get_card_type
VPB_MODEL WINAPI vpb_get_card_type(VPBPortHandle handle)
Return the board model type for handle.
Definition: vpbapi.cpp:2497
vpb_ring_station_async
void WINAPI vpb_ring_station_async(VPBPortHandle handle, int cadence)
Start or stop a station port ringing.
Definition: vpbapi.cpp:2116
V4PCI_DSP::UNListen
void UNListen(unsigned int port)
Remove a half duplex bridge or full duplex tap from port.
Definition: comm.cpp:371
VPB_DETECT::snr
int16_t snr
min signal to noise ratio to accept tone
Definition: vpbapi.h:1622
vpb_log_terminate
void WINAPI vpb_log_terminate(VPBPortHandle h)
Stop full duplex logging on handle h.
Definition: callmonitor.cpp:160
Play::list
static List list
Container for a list of playback states.
Definition: playrec.cpp:116
Record::time_out
unsigned long time_out
Maximum time in ms to record for.
Definition: playrec.cpp:129
VPB_AUDIO_TERMINATE
@ VPB_AUDIO_TERMINATE
Async terminate requested.
Definition: vpbapi.h:745
VTCore::~VTCore
~VTCore()
Destructor.
Definition: vtcore.cpp:816
VPB_CID_CT_VOICE
@ VPB_CID_CT_VOICE
Voice Call.
Definition: vpbapi.h:2074
VPB_CID::cldn
char cldn[19]
Calling line directory number.
Definition: vpbapi.h:2086
VPBRegister
Definition: vpbreg.h:313
DD_PRI
#define DD_PRI
OpenPri driver.
Definition: vpbreg.h:88
ToneGen::Config::Cadence::List
std::vector< Cadence > List
Container type for a list of Cadence structures.
Definition: tonegen.h:135
VPB_FINISH
#define VPB_FINISH
return code for vpb_play_buf_sync() and vpb_record_buf_sync().
Definition: vpbapi.h:700
vpb_listen
int WINAPI vpb_listen(VPBPortHandle h1, VPBPortHandle h2, BridgeMode mode)
Create a half duplex bridge routing audio from src to dest.
Definition: vpbapi.cpp:2982
vpb_wave_open_read
void WINAPI vpb_wave_open_read(WFILE **wav, const std::string &filename)
Open a RIFF wave file for reading.
Definition: wave.cpp:262
get_board_model
void get_board_model(int board, char *s)
Return a descriptive model name for board in s.
Definition: vpbapi.cpp:2568
VPB_VOX
Definition: vpbapi.h:1796
vpb_tone_terminate
int WINAPI vpb_tone_terminate(int handle)
Terminate a currently playing tone (user defined or dtmf).
Definition: vpbdial.cpp:554
vpb_enable_event
int WINAPI vpb_enable_event(VPBPortHandle handle, unsigned long mask)
Enable the events specified by mask for handle.
Definition: vpbapi.cpp:1854
VPB_TONE_CALLWAITING
@ VPB_TONE_CALLWAITING
Call waiting signal.
Definition: vpbapi.h:1432
V4PCIToneGen::ImplStop
void ImplStop()
Called by Stop() for implementation specific operations.
Definition: comm.cpp:122
vpb_get_event_ch_sync
int WINAPI vpb_get_event_ch_sync(VPBPortHandle h, VPB_EVENT *e, unsigned int time_out)
Wait for an event on a port specific event queue.
Definition: vpbapi.cpp:2036
Hip
Definition: hip.h:38
VPB_RINGBACK
#define VPB_RINGBACK
ringback detected (US)
Definition: vpbapi.h:1633
vpb_wave_read
int WINAPI vpb_wave_read(WFILE *wav, char *buf, unsigned long n)
Read a block of audio samples from a RIFF wave file.
Definition: wave.cpp:422
VPB_EVENT::extra
void * extra
Support for user defined event data.
Definition: vpbapi.h:502
V4PCIDspFifo::V4PCIDspFifo
V4PCIDspFifo(Hip *hip, unsigned short board, unsigned short fifo_addr)
Open a link to a DSP FIFO. Assumes the DSP has been booted.
Definition: dspfifo.cpp:46
VPBREG::defRecordGainDown
float defRecordGainDown
record gain down control for better DTMF
Definition: vpbreg.h:167
tonegen.h
Voicetronix programmable tone generator API.
TONE::tone
VPB_TONE tone
The tone definition data.
Definition: vpbdial.cpp:65
Audio::state
AudioState state
current state
Definition: playrec.cpp:76
vpb_sethook_async
void WINAPI vpb_sethook_async(VPBPortHandle handle, HookState hookstate)
Signal a port to set its hook state. Returns immediately.
Definition: vpbapi.cpp:2062
CidDataType
CidDataType
Field type identifiers for CID data.
Definition: vpbapi.h:2165
vpb_c
Comm * vpb_c
Global Comm object.
Definition: vpbapi.cpp:160
vpb_set_tone_event_mask
int WINAPI vpb_set_tone_event_mask(VPBPortHandle handle, unsigned long mask)
Set the TONE event mask. The previous mask value will be overwritten.
Definition: vpbapi.cpp:1870
ToneGen::ONESHOT
@ ONESHOT
One-shot tone generation in progress.
Definition: tonegen.h:96
FACT
Definition: wave.cpp:81
vpb_get_port_type
VPB_PORT WINAPI vpb_get_port_type(VPBPortHandle handle)
Return the VPB_PORT type for handle.
Definition: vpbapi.cpp:2556
V4PCIToneGen::V4PCIToneGen
V4PCIToneGen(Comm *comm, unsigned int cardnum)
Constructor.
Definition: comm.cpp:140
OP_INFO
Definition: utilfuncs.h:121
VPBREG::toneg
ToneGen::List toneg
Pointers to ToneGen instances for each port.
Definition: vpbreg.h:173
vpb_set_flashtime
void WINAPI vpb_set_flashtime(VPBPortHandle handle, uint16_t min, uint16_t max)
Set the window for detecting flash events on OpenPCI cards.
Definition: vpbapi.cpp:2084
VPB_VLOG::term
char term[64]
Termination reason TEXT ascii.
Definition: vpbapi.h:1840
Country::code
int code
Country code.
Definition: vpbapi.h:1735
VPB_DEV::VPB_DEV
VPB_DEV()
Default constructor.
Definition: vpbapi.cpp:135
DevState
DevState
Device state flags.
Definition: vpbapi.cpp:97
V4PCIDspFifo::Read
Status Read(uint16_t *buf, size_t len)
Read a block of words from a DSP FIFO to the PC.
Definition: dspfifo.cpp:149
CON_THREAD_INFO
Definition: openpri.cpp:69
playrec_new_digit_record
void playrec_new_digit_record(int handle, char digit)
Called by the MMQ when the DSP detects a digit event.
Definition: playrec.cpp:895
VPBREG::listen_info
struct VPBREG::@0 listen_info[MAXCH]
Used to keep a track of the listens.
SECTION_HEADER
Definition: coff.cpp:127
playrec_open
void playrec_open(unsigned int numch)
Initialise the playrec module.
Definition: playrec.cpp:257
vpb_record_buf_async
int WINAPI vpb_record_buf_async(VPBPortHandle handle, char *buf, size_t len)
Record a buffer of audio samples from a port.
Definition: playrec.cpp:1496
VT_DEPRECATED
#define VT_DEPRECATED(x)
Macro wrapper for deprecated symbols.
Definition: vt_deprecated.h:57
VPB_CARD_INFO
Container type for data returned by vpb_get_card_info().
Definition: vpbapi.h:206
ScopedMutex::ScopedMutex
ScopedMutex(pthread_mutex_t *mutex)
Lock mutex for the lifetime of this object.
Definition: scopedmutex.h:44
VPB_MLOOP_FLASH
#define VPB_MLOOP_FLASH
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:526
llc_list
Definition: llconf.h:14
Comm::GetCountryCode
unsigned int GetCountryCode() const
Return the global country code from vpb.conf.
Definition: comm.h:142
vpb_get_port_type
VPB_PORT WINAPI vpb_get_port_type(VPBPortHandle handle)
Return the VPB_PORT type for handle.
Definition: vpbapi.cpp:2556
vpb_get_ports_per_card
int WINAPI vpb_get_ports_per_card(int board)
Return the number of ports on board.
Definition: vpbapi.cpp:2639
ToneGen::Exception::what
const char * what() const
Return the message associated with the exception.
Definition: tonegen.h:497
vpb_get_event_sync
int WINAPI vpb_get_event_sync(VPB_EVENT *e, unsigned int time_out)
Wait for an event on the global event queue.
Definition: vpbapi.cpp:2018
ToneGen::IDLE
@ IDLE
Tone generator is idle.
Definition: tonegen.h:93
VPB_CID_CT_UNKNOWN
@ VPB_CID_CT_UNKNOWN
Unknown call type.
Definition: vpbapi.h:2073
vpb_wave_set_vlog
int WINAPI vpb_wave_set_vlog(WFILE *wav, VPB_VLOG *buf)
Set VPB_VLOG information for inclusion in a wave file.
Definition: wave.cpp:539
vpb_flush_events
void WINAPI vpb_flush_events(VPBPortHandle handle)
Clear all unread events from the queue for handle.
Definition: vpbapi.cpp:1935
ToneGen::Stop
void Stop()
Stop tone generation.
Definition: tonegen.h:632
vpb_play_buf_async
int WINAPI vpb_play_buf_async(VPBPortHandle handle, const char *buf, size_t len)
Play a buffer of audio samples to a port.
Definition: playrec.cpp:931
vpb_get_num_cards
int WINAPI vpb_get_num_cards()
Return the number of cards in the system.
Definition: vpbapi.cpp:2628
HostDSP::~HostDSP
virtual ~HostDSP()
Destructor.
Definition: vpbreg.h:213
VPB_FASTOFFHOOK
@ VPB_FASTOFFHOOK
Port off-hook, no calibration.
Definition: vpbapi.h:303
VPB_MDIGIT
#define VPB_MDIGIT
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:510
ToneGen::GetConfig
Config & GetConfig() const
Return the ToneGen::Config data.
Definition: tonegen.h:806
AudioCompress
AudioCompress
Audio compression modes.
Definition: vpbapi.h:726
VPB_RECORD::term_digits
const char * term_digits
A string of DTMF digits that can terminate recording.
Definition: vpbapi.h:717
VPB_CID_MAX_DLP
#define VPB_CID_MAX_DLP
Maximum size of CID dlp data.
Definition: vpbapi.h:2162
VPB_OFF
@ VPB_OFF
The device is not open.
Definition: vpbapi.cpp:99
vpb_set_event_callback
int WINAPI vpb_set_event_callback(VPBPortHandle handle, vpb_event_callback callback, void *context=NULL)
Sets an event callback function to use instead of the APIQ.
Definition: vpbapi.cpp:1824
vpb_set_event_mask
int WINAPI vpb_set_event_mask(VPBPortHandle handle, unsigned long mask)
Set the event mask for handle.
Definition: vpbapi.cpp:1840
VPB_PLAY::term_digits
const char * term_digits
A string of DTMF digits that can terminate playback.
Definition: vpbapi.h:708
LogThread
Definition: callmonitor.cpp:39
vpb_record_voxfile_async
int WINAPI vpb_record_voxfile_async(int handle, const std::string &file_name, AudioCompress mode)
Utility function to record a wav file from a port.
Definition: playrec.cpp:1619
VPBHANDLE
Lookup table element for mapping vpb handles to a port on boardnum.
Definition: vpbreg.h:95
ScopedMutex::~ScopedMutex
~ScopedMutex()
Unlock the mutex again.
Definition: scopedmutex.h:51
vpb_enable_event
int WINAPI vpb_enable_event(VPBPortHandle handle, unsigned long mask)
Enable the events specified by mask for handle.
Definition: vpbapi.cpp:1854
VPB_TONE::level2
float level2
second tone level in dB, -inf to 0dB
Definition: vpbapi.h:1469
VPB_OPEN_DEFAULTS
const VPBOpenMode VPB_OPEN_DEFAULTS
The default flags for vpb_open().
Definition: vpbapi.h:133
vpb_play_voxfile_sync
int WINAPI vpb_play_voxfile_sync(int handle, const std::string &file_name, AudioCompress mode)
Utility function to play a wav file to a port.
Definition: playrec.cpp:1032
Record::rgaindown
float rgaindown
Record Gain Down control for DTMF.
Definition: playrec.cpp:131
soft_bridge_info
Definition: vpbapi.cpp:87
get_port_type
VPB_PORT get_port_type(int board, int port)
Return the type of a port on some board. VPB_FXO or VPB_FXS.
Definition: vpbapi.cpp:2539
vpb_wave_close_write
void WINAPI vpb_wave_close_write(WFILE *wav)
Close a RIFF wave file after writing.
Definition: wave.cpp:390
Country::drop_min
uint16_t drop_min
Min valid loop drop time in ms.
Definition: vpbapi.h:1747
VTCore::chan_state
int chan_state(int ch)
Get the current state of a port.
Definition: vtcore.cpp:1282
VPB_TONE
Tone definition structure.
Definition: vpbapi.h:1462
VPB_FAX
#define VPB_FAX
fax CNG tone/preamble
Definition: vpbapi.h:1638
VPB_VLOG::endtime
char endtime[16]
Record End Time yyyymmddHHMMSS.
Definition: vpbapi.h:1836
vpb_get_card_type
VPB_MODEL WINAPI vpb_get_card_type(VPBPortHandle handle)
Return the board model type for handle.
Definition: vpbapi.cpp:2497
ToneGen::Config::SetCompletionCallback
void SetCompletionCallback(CompletionCallback callback)
Request asynchronous notification of normal tone completion.
Definition: tonegen.h:389
Record::list
static List list
Container for a list of recording states.
Definition: playrec.cpp:127
Timer
Simple time tracking class.
Definition: timer.h:30
VPBHANDLE::board
int board
The board number for this handle.
Definition: vpbreg.h:100
VPBRegister::NewHandle
int NewHandle(int board, int port)
Return a new handle for a port on some board.
Definition: vpbreg.h:346
baseHipData
Definition: hip.cpp:64
vpb_get_tone_event_mask
unsigned long WINAPI vpb_get_tone_event_mask(VPBPortHandle handle)
Return the current TONE event mask for handle.
Definition: vpbapi.cpp:1878
VPBREG::country
Country::List country
Pointers to country specific data for each port.
Definition: vpbreg.h:172
VPB_AUDIO_PLAYING
@ VPB_AUDIO_PLAYING
Port audio play in progress.
Definition: vpbapi.h:743
ToneGen::Config::GetUserData
T & GetUserData(size_t slot) const
Retreive arbitrary, typed data from a user-data slot.
Definition: tonegen.h:427
VPB_CID::ra_cn
char ra_cn[2]
Reason for absence of cn, O or P.
Definition: vpbapi.h:2089
VPB_DEV::context
void * context
User defined context info for event_callback.
Definition: vpbapi.cpp:122
VPB_TONE_DIAL
@ VPB_TONE_DIAL
Normal dial tone.
Definition: vpbapi.h:1427
VPB_EVENT::handle
int handle
The handle of the port that generated the event.
Definition: vpbapi.h:496
vpb_c
Comm * vpb_c
Pointer to the global comm object.
Definition: vpbapi.cpp:160
vpb_get_event_ch_async
int WINAPI vpb_get_event_ch_async(VPBPortHandle h, VPB_EVENT *e)
Fetch the next event from a port specific event queue.
Definition: vpbapi.cpp:2052
VPB_CID_CT_RBWF
@ VPB_CID_CT_RBWF
Ring back When free.
Definition: vpbapi.h:2075
VPB_VLOG::inout
char inout[4]
Call Direction.
Definition: vpbapi.h:1834
Record::delay
char delay[REC_DLY]
delay line for rec with dtmf termination
Definition: playrec.cpp:133
vpb_echo_canc_get_sup_thresh
int WINAPI vpb_echo_canc_get_sup_thresh(int handle, short *thresh)
Get the current echo suppressor threshold.
Definition: vpbapi.cpp:2425
VPBPortHandle
int VPBPortHandle
Symbolic type for a handle to an open port on some card.
Definition: vpbapi.h:57
VOXCONFIG
Definition: vpbvox.cpp:73
VPB_CID::nmss
int nmss
Network message system status, (0-255 calls waiting)
Definition: vpbapi.h:2092
numboards
static unsigned short numboards
Total number of boards.
Definition: vpbapi.cpp:166
VPB_CID_RFA_CN
@ VPB_CID_RFA_CN
Reason for absence of caller name.
Definition: vpbapi.h:2174
vpb_set_mprintf
void WINAPI vpb_set_mprintf(void(*func)(const char *format,...))
Specify a function to handle mprintf() logging output.
Definition: vpbapi.cpp:3597
VPB_DETECT::minlevel2
int16_t minlevel2
min amp of 2nd tone ref 0dbm0
Definition: vpbapi.h:1617
vpb_record_set_gain
void WINAPI vpb_record_set_gain(VPBPortHandle handle, float gain)
Set the software record gain component for a port.
Definition: playrec.cpp:1541
wrapper_s
Definition: genericlinux.cpp:425
vpb_wave_write
int WINAPI vpb_wave_write(WFILE *wav, const char *buf, long n)
Write a block of audio samples to a RIFF wave file.
Definition: wave.cpp:412
CheckHandle
void CheckHandle(VPBPortHandle handle, const char *where)
Check for a valid device handle.
Definition: vpbapi.cpp:735
Comm::~Comm
~Comm()
Closes down the comm link to the VPBs.
Definition: comm.cpp:430
ToneGen::Config::SetCadence
void SetCadence(unsigned int onms, unsigned int offms=0, unsigned int tnum=0)
Set the on and off time in ms for a cadenced tone.
Definition: tonegen.h:302
OpenPri::SetCountry
void SetCountry(int port, const Country *country)
Configure the hardware for country on port of this board.
Definition: openpri.cpp:2583
VPB_AUDIO_RECORDING
@ VPB_AUDIO_RECORDING
Port audio record in progress.
Definition: vpbapi.h:744
VTCore::chan_type
VPB_PORT chan_type(int ch)
Get the type of a port.
Definition: vtcore.cpp:1289
VPB_DETECT::freq2
uint16_t freq2
freq of first tone (Hz)
Definition: vpbapi.h:1614
vpb_sleep
void WINAPI vpb_sleep(long time)
Put the current thread to sleep for some number of milliseconds.
Definition: vpbapi.cpp:2126
VPB_CID_CALLER_NAME
@ VPB_CID_CALLER_NAME
Caller name.
Definition: vpbapi.h:2173
CALL
Definition: call.cpp:79
VPB_CID_EMPTY
@ VPB_CID_EMPTY
Flag to clear CID data fields.
Definition: vpbapi.h:2168
vpb_record_set
void WINAPI vpb_record_set(VPBPortHandle handle, const VPB_RECORD &vpb_record)
Set recording parameters for a port.
Definition: playrec.cpp:1469
vpb_get_driver_version
const char *WINAPI vpb_get_driver_version()
Return the driver version as a string.
Definition: vpbapi.cpp:749
VPB_MRING
#define VPB_MRING
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:509
vpb_play_set
void WINAPI vpb_play_set(VPBPortHandle handle, const VPB_PLAY &vpb_play)
Set playback parameters for a port.
Definition: playrec.cpp:908
vpb_loopback_off
int WINAPI vpb_loopback_off(int h)
Turns off software loop-back of tx->rx in the kernel.
Definition: vpbapi.cpp:3175
VPB_V4LOG
@ VPB_V4LOG
V4LOG 4 port PCI logging card.
Definition: vpbapi.h:77
VPB_DETECT
Container for programmable tone detector parameters.
Definition: vpbapi.h:1606
VPBREG::cardinfo
void * cardinfo
Pointer to Conf Info section for this card.
Definition: vpbreg.h:183
HipDataPCI
Definition: hip.cpp:89
VPBREG::chan
int chan
listening port number
Definition: vpbreg.h:176
vpb_disable_tone_event
int WINAPI vpb_disable_tone_event(VPBPortHandle handle, unsigned long mask)
Disable the TONE events specified by mask for handle.
Definition: vpbapi.cpp:1892
Wobbly
Definition: wobbly.h:177
VPBREG::txdf
Fifo * txdf[MAXCH]
ptrs to TX DSP FIFO info in PC
Definition: vpbreg.h:147
VPB_MODEL
VPB_MODEL
VPB card model types.
Definition: vpbapi.h:72
VPB_TONE_MAP
Definition: vpbapi.h:1373
VPB_FXS
@ VPB_FXS
Station port.
Definition: vpbapi.h:93
Country::tone_gen
VPB_TONE * tone_gen
Pointer to an array of VPB_TONE_ID_MAX tones.
Definition: vpbapi.h:1753
VPBREG::toned
struct TD ** toned
Pointer to Tone detector state variables.
Definition: vpbreg.h:180
VPBREG::a_upmess
uint16_t a_upmess
addr of "up" message FIFO in DSP
Definition: vpbreg.h:130
Fifo
Abstract base type for Fifo implementations.
Definition: fifo.h:42
VPB_MSTATION_ONHOOK
#define VPB_MSTATION_ONHOOK
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:519
PRI_IFACE
Definition: utilfuncs.h:65
ToneGen::CompletionCallback
void(* CompletionCallback)(ToneGen &)
Call back type for tone completion notification.
Definition: tonegen.h:89
VPB_BUSY
#define VPB_BUSY
busy tone detected (US)
Definition: vpbapi.h:1634
vpb_set_global_apiq_size
void WINAPI vpb_set_global_apiq_size(int size)
Set the maximum number of events the global APIQ may hold.
Definition: vpbapi.cpp:785
VPB_MSTATION_OFFHOOK
#define VPB_MSTATION_OFFHOOK
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:518
VPB_TONE_UNOBTAINABLE
@ VPB_TONE_UNOBTAINABLE
Invalid number signal.
Definition: vpbapi.h:1431
ToneGen::~ToneGen
virtual ~ToneGen()
Virtual destructor.
Definition: tonegen.h:565
VpbException
VPB api runtime exception type.
Definition: vpbapi.h:1238
Comm::Comm
Comm()
Constructor. The InitBoards() method actually opens the comm links.
Definition: comm.h:124
VPBREG::a_rxdf
uint16_t a_rxdf[MAXCH]
addresses of RX FIFOs in DSP
Definition: vpbreg.h:132
vpb_play_terminate
int WINAPI vpb_play_terminate(int handle)
Stop audio playback.
Definition: playrec.cpp:1078
VPB_DIGIT_MAX
@ VPB_DIGIT_MAX
The specified maximum number of digits were collected.
Definition: vpbapi.h:1994
VpbException::~VpbException
~VpbException()
Destructor.
Definition: vpbapi.h:1251
VPBREG::defSPlayGain
float defSPlayGain
default play (Rx) gain for station
Definition: vpbreg.h:154
Timer::start
void start()
Initialise the timer's starting time.
Definition: timer.cpp:30
VPB_OSW
@ VPB_OSW
OpenSwitch card using vtcore driver.
Definition: vpbapi.h:82
VPB_STRAN::tmax
uint16_t tmax
maximum tone on/off time (non timer) in ms
Definition: vpbapi.h:1601
vpb_record_state
AudioState WINAPI vpb_record_state(int handle)
Return the current record state of a port.
Definition: playrec.cpp:1130
VPBREG::rxdf
Fifo * rxdf[MAXCH]
ptrs to RX DSP FIFO info in PC
Definition: vpbreg.h:146
vpb_playtone_state
int WINAPI vpb_playtone_state(int handle)
Returns state of play tone (1= playing, 0 = not playing)
Definition: vpbdial.cpp:451
DchannelData
Definition: openpri.cpp:1023
VPB_LINEAR
@ VPB_LINEAR
128 kbit/s 16 bit linear
Definition: vpbapi.h:729
vpb_model_desc
const char *WINAPI vpb_model_desc(VPB_MODEL model)
Return a descriptive string for a VPB_MODEL type.
Definition: vpbapi.cpp:3602
vpb_bridge
int WINAPI vpb_bridge(VPBPortHandle h1, VPBPortHandle h2, BridgeMode mode)
Create a full duplex bridge between ports h1 and h2.
Definition: vpbapi.cpp:2702
VPB_CARD_INFO::sn
char sn[10]
Serial Number.
Definition: vpbapi.h:211
AUDIO_THREAD_MULTI
Definition: openpri.h:62
OpenPri::SetHookState
void SetHookState(int port, HookState hookstate)
Set the hook state of port.
Definition: openpri.cpp:2589
VTCore
Support for cards using the vtcore driver.
Definition: vtcore.h:64
vpb_gettone
int WINAPI vpb_gettone(char ident, VPB_TONE *tone)
Get the parameters of the tone represented in dial strings by ident.
Definition: vpbdial.cpp:405
vpb_get_event_ch_sync
int WINAPI vpb_get_event_ch_sync(VPBPortHandle handle, VPB_EVENT *event, unsigned int time_out=0)
Wait for an event on a port specific event queue.
Definition: vpbapi.cpp:2036
vpb_disable_tone_event
int WINAPI vpb_disable_tone_event(VPBPortHandle handle, unsigned long mask)
Disable the TONE events specified by mask for handle.
Definition: vpbapi.cpp:1892
ToneGen::SEQUENCE
@ SEQUENCE
Tone generator is handling a sequence of tones.
Definition: tonegen.h:94
sleepms
static unsigned short sleepms
sleep period for threads
Definition: vpbapi.cpp:168
VPBREG::defSbal3
uint16_t defSbal3
default codec balance register 3 for station
Definition: vpbreg.h:161
VPBREG::lsf
uint16_t lsf
length of superframe in words
Definition: vpbreg.h:136
VPB_BRIDGE_OFF
@ VPB_BRIDGE_OFF
stop bridging
Definition: vpbapi.h:384
VPB_CALL_INFO
Definition: vpbapi.h:2404
vpb_enable_tone_event
int WINAPI vpb_enable_tone_event(VPBPortHandle handle, unsigned long mask)
Enable the TONE events specified by mask for handle.
Definition: vpbapi.cpp:1884
OpenPri::Reset
void Reset(unsigned int port)
Reset port to its default cold-start state.
Definition: openpri.h:110
VTCore::PadTxFrame
void PadTxFrame(int port)
Pad a partial transmit frame for forwarding to the hardware.
Definition: vtcore.cpp:941
RECORD_FILE_ASYNC_ARGS
Data for record_file_async_thread()
Definition: playrec.cpp:164
ToneGen::Config::Cadence
Data storage for a ToneGen cadence component.
Definition: tonegen.h:131
vpb_get_tone_event_mask
unsigned long WINAPI vpb_get_tone_event_mask(VPBPortHandle handle)
Return the current TONE event mask for handle.
Definition: vpbapi.cpp:1878
vpb_play_get_gain
float WINAPI vpb_play_get_gain(VPBPortHandle handle)
Return the software play gain for a port.
Definition: playrec.cpp:990
vpb_flush_digits
int WINAPI vpb_flush_digits(int handle)
Clears the internal digit buffer for handle.
Definition: digits.cpp:282
VPB_EVENT::type
VPB_EVT_TYPE type
The event type.
Definition: vpbapi.h:495
vpb_get_ports_per_card
int WINAPI vpb_get_ports_per_card(int board)
Return the number of ports on board.
Definition: vpbapi.cpp:2639
vpb_get_digits_sync
CollectEndReason WINAPI vpb_get_digits_sync(int handle, VPB_DIGITS *newdig, char *buf)
Get a buffer of DTMF digits.
Definition: digits.cpp:198
VPB_EXCEPTION
const int VPB_EXCEPTION
API function error throws a exception.
Definition: vpbapi.h:1282
vpb_cid_decode
int WINAPI vpb_cid_decode(char *number, const short *in, int n)
Attempt to extract a caller's number from a buffer of samples.
Definition: cid.cpp:585
vpb_record_set_hw_gain
void WINAPI vpb_record_set_hw_gain(VPBPortHandle handle, float gain)
Set the hardware record gain component for a port.
Definition: playrec.cpp:1558
vpb_model_desc
const char * vpb_model_desc(VPB_MODEL model)
Return a descriptive string for a VPB_MODEL type.
Definition: vpbapi.cpp:3602
vpb_sethook_sync
void WINAPI vpb_sethook_sync(VPBPortHandle handle, HookState hookstate)
Set the hook state of a port. Waits for it to change before returning.
Definition: vpbapi.cpp:2073
vpb_play_buf_finish
void WINAPI vpb_play_buf_finish(VPBPortHandle handle)
Signal completion of audio playback and release a port for other users.
Definition: playrec.cpp:940
vpb_play_buf_sync
int WINAPI vpb_play_buf_sync(VPBPortHandle handle, const char *buf, size_t len)
Play a buffer of audio samples to a port.
Definition: playrec.cpp:922
FILHEADER
Definition: coff.cpp:102
vpb_playtone_async
int WINAPI vpb_playtone_async(int handle, const VPB_TONE &vpb_tone)
Start a user defined tone playing and return immediately.
Definition: vpbdial.cpp:478
VT_REG_RW
Definition: vtcore_ioctl.h:23
ToneGen::Config::SetFreq
void SetFreq(unsigned int hz, float db=0.0, unsigned int fnum=0, unsigned int tnum=0)
Set one of the component frequencies for a tone.
Definition: tonegen.h:272
vpb_get_hookstate
HookState WINAPI vpb_get_hookstate(VPBPortHandle handle)
Return the hook state of a port.
Definition: vpbapi.cpp:2513
VPB_VLOG::cidn
char cidn[128]
CID number ascii.
Definition: vpbapi.h:1838
VPBREG::defSRecordGain
float defSRecordGain
default record (Tx) gain for station
Definition: vpbreg.h:153
VPBREG::List
std::vector< VPBREG > List
Container type for all registered boards.
Definition: vpbreg.h:119
VPBREG::serial_n
char serial_n[10]
Serial Number.
Definition: vpbreg.h:165
HostFifo
Host fifo implementation.
Definition: fifo.h:73
vpb_hostecho_off
int WINAPI vpb_hostecho_off(int handle)
Disable the host echo canceller for handle.
Definition: vpbapi.cpp:3209
VPBHANDLE::List
std::vector< VPBHANDLE > List
Container type for the lookup table.
Definition: vpbreg.h:98
VPB_DIAL
#define VPB_DIAL
dial tone detected (US/Aust/sudio308)
Definition: vpbapi.h:1632
ScopedMutex
Simple exception safe mutex sentinel.
Definition: scopedmutex.h:34
VPB_CID_MAX_BUF
#define VPB_CID_MAX_BUF
Maximum size of CID wav data.
Definition: vpbapi.h:2159
VPB_CARD_INFO::model
char model[10]
Model.
Definition: vpbapi.h:208
vpb_close
int WINAPI vpb_close(VPBPortHandle handle=VPB_PORTHANDLE_NULL)
Close a previously opened port using the handle returned by vpb_open().
Definition: vpbapi.cpp:1748
VPBREG::a_dnmess
uint16_t a_dnmess
addr of "down" message FIFO in DSP
Definition: vpbreg.h:129
TONE
Structure to map tones to an identifying character in a dial string.
Definition: vpbdial.cpp:56
HostDSP::SetVDAAImpedance
virtual void SetVDAAImpedance(int port, int impedance)
Override the default impedance for VDAA ports.
Definition: vpbreg.h:239
vpb_set_channel_apiq_size
void WINAPI vpb_set_channel_apiq_size(int size)
Set the maximum number of events per-channel APIQ's may hold.
Definition: vpbapi.cpp:791
vpb_echo_canc_set_sup_thresh
int WINAPI vpb_echo_canc_set_sup_thresh(int handle, short *thresh)
Set the echo suppressor threshold.
Definition: vpbapi.cpp:2463
VPB_MDROP
#define VPB_MDROP
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:521
VpbException::VpbException
VpbException(const char *format,...) __attribute__((format(printf
Construct an exception object with a printf format message string.
Definition: vpbapi.cpp:717
HostDSP::Reset
virtual void Reset(unsigned int port)=0
Reset port to its default cold-start state.
AU
Definition: wave.cpp:120
VPBREG::defRecordGain
float defRecordGain
default record (Tx) gain
Definition: vpbreg.h:151
vpb_play_get_hw_gain
float WINAPI vpb_play_get_hw_gain(VPBPortHandle handle)
Return the hardware play gain for a port.
Definition: playrec.cpp:1004
V4PCI_DSP::Reset
void Reset(unsigned int)
Reset port to its default cold-start state.
Definition: comm.h:87
vpb_set_channel_apiq_size
void WINAPI vpb_set_channel_apiq_size(int size)
Set the maximum number of events per-channel APIQ's may hold.
Definition: vpbapi.cpp:791
VPB_VLOG::filename
char filename[256]
Original Filename.
Definition: vpbapi.h:1837
Audio::hw_gain
float hw_gain
hardware gain parameter
Definition: playrec.cpp:77
Comm::GetMessageVPB
int GetMessageVPB(unsigned short board, uint16_t *mess)
Gets a message from the DSP message queue.
Definition: comm.cpp:511
Record
Audio recording state data
Definition: playrec.cpp:121
VPBREG::mdate
char mdate[12]
Manufacture Date.
Definition: vpbreg.h:163
vpb_set_mprintf
void WINAPI vpb_set_mprintf(void(*func)(const char *format,...))
Specify a function to handle mprintf() logging output.
Definition: vpbapi.cpp:3597
VPB_DIGIT_TERM
@ VPB_DIGIT_TERM
A termination digit was collected.
Definition: vpbapi.h:1991
Comm
Definition: comm.h:114
VPB_TONE_BUSY
@ VPB_TONE_BUSY
Called number busy tone.
Definition: vpbapi.h:1429
HostDSP
Base class for host processor based card types.
Definition: vpbreg.h:196
ToneGen::Config::Freq::hz
unsigned int hz
Frequency in Hz.
Definition: tonegen.h:122
VPB_TONE::level3
float level3
third tone level in dB, -inf to 0dB
Definition: vpbapi.h:1470
VPB_STRAN::tfire
uint16_t tfire
timer mode only
Definition: vpbapi.h:1599
vpb_play_state
AudioState WINAPI vpb_play_state(int handle)
Return the current play state of a port.
Definition: playrec.cpp:1076
VPBREG::dnmess
Fifo * dnmess
ptr to down message DSP FIFO in PC
Definition: vpbreg.h:144
VPB_OPCI
@ VPB_OPCI
OpenPCI card.
Definition: vpbapi.h:81
LinearCompression
Definition: comp.h:67
Comm::NewHandle
int NewHandle(int board, int port)
Return a new handle for a port on some board.
Definition: comm.h:191
vpb_wave_get_mode
AudioCompress WINAPI vpb_wave_get_mode(WFILE *wav)
Return the compression mode of wav.
Definition: wave.cpp:486
VPB_CID::date_time
char date_time[9]
Time of call.
Definition: vpbapi.h:2091
VPB_TONE_STUTTERDIAL
@ VPB_TONE_STUTTERDIAL
Voicemail pending signal.
Definition: vpbapi.h:1433
Audio::cond
pthread_cond_t cond
state change signalling
Definition: playrec.cpp:81
Country::fsk_mark
double fsk_mark
Coefficient for cid generation.
Definition: vpbapi.h:1750
HookState
HookState
Symbolic hook states.
Definition: vpbapi.h:298
VPB_TONE::freq2
unsigned short freq2
frequency of second tone in Hz
Definition: vpbapi.h:1466
VPB_RING_STATION_OFF
#define VPB_RING_STATION_OFF
Stop station port ringing.
Definition: vpbapi.h:344
pri_chan
Definition: openpri.h:40
VPBREG::defbal1
uint16_t defbal1
default codec balance register 1
Definition: vpbreg.h:156
Audio::~Audio
~Audio()
Default destructor.
Definition: playrec.cpp:99
VPB_DIGIT_INTER_DIGIT_TIME_OUT
@ VPB_DIGIT_INTER_DIGIT_TIME_OUT
The specified time for collecting further digits expired.
Definition: vpbapi.h:2000
apifunc.h
Common internal helper functions.
VPB_VLOG_CHUNK
#define VPB_VLOG_CHUNK
May be added to the Wave file mode to include a VPB_VLOG chunk when recording.
Definition: vpbapi.h:1828
vpb_dev
static VPB_DEV * vpb_dev
Global VPB_DEV array.
Definition: vpbapi.cpp:161
vpb_get_model
std::string WINAPI vpb_get_model(VPBPortHandle handle)
Return a string indicating the board model.
Definition: vpbapi.cpp:2597
ring_station_async
void ring_station_async(int board, int port, int cadence)
Internal function to control ringing on port of board.
Definition: vpbapi.cpp:2096
VTCore::SetFlashTime
void SetFlashTime(int port, uint16_t min, uint16_t max)
Configure the hook-flash detection window.
Definition: vtcore.cpp:981
vpb_record_buf_finish
void WINAPI vpb_record_buf_finish(VPBPortHandle handle)
Signal completion of audio recording and release a port for other users.
Definition: playrec.cpp:1505
vpb_get_port_country
const Country *WINAPI vpb_get_port_country(VPBPortHandle handle)
Get the current country data for port handle.
Definition: vpbapi.cpp:861
vpb_hostecho_on
int WINAPI vpb_hostecho_on(int handle)
Enable the host echo canceller for handle.
Definition: vpbapi.cpp:3192
VTCore::VTCore
VTCore(VPBREG &reg)
Constructor.
Definition: vtcore.cpp:810
ToneGen::ImplStart
virtual State ImplStart()=0
Called by Start() for implementation specific operations.
vpb_enable_tone_event
int WINAPI vpb_enable_tone_event(VPBPortHandle handle, unsigned long mask)
Enable the TONE events specified by mask for handle.
Definition: vpbapi.cpp:1884
vpb_dial_async
int WINAPI vpb_dial_async(int handle, const std::string &dialstr)
Dials a string of digits on the port for handle.
Definition: vpbdial.cpp:338
vpb_get_event_async
int WINAPI vpb_get_event_async(VPB_EVENT *e)
Fetch the next event from the global event queue.
Definition: vpbapi.cpp:2006
vpb_record_voxfile_sync
int WINAPI vpb_record_voxfile_sync(int handle, const std::string &file_name, AudioCompress mode)
Utility function to record a wav file from a port.
Definition: playrec.cpp:1591
HostDSP::m_reg
VPBREG & m_reg
Reference to the VPBREG structure for this HostDSP.
Definition: vpbreg.h:201
Comm::LookupHandle
const VPBHANDLE & LookupHandle(int handle) const
Look up the VPBHANDLE entry for handle.
Definition: comm.h:185
vpb_cid_set
int WINAPI vpb_cid_set(VPB_CID *cid, CidDataType field, void *value)
Set a field in the cid data structure.
Definition: cidg.cpp:45
VPB_VLOG
Additional data that may be included in a wav file.
Definition: vpbapi.h:1831
vpb_playtone_sync
int WINAPI vpb_playtone_sync(int handle, const VPB_TONE &vpb_tone)
Play a user defined tone, return when playback completes.
Definition: vpbdial.cpp:517
VPBREG::hostdsp
HostDSP * hostdsp
Pointer to the Host DSP object.
Definition: vpbreg.h:182
AudioState
AudioState
play/record state flags
Definition: vpbapi.h:739
VPBREG::defSbal2
uint16_t defSbal2
default codec balance register 2 for station
Definition: vpbreg.h:160
get_board_type
VPB_MODEL get_board_type(int board)
Return the symbolic VPB_MODEL type of a board.
Definition: vpbapi.cpp:2492
TONE::List
std::vector< TONE > List
Container type for a list of TONE's.
Definition: vpbdial.cpp:59
vpb_disable_event
int WINAPI vpb_disable_event(VPBPortHandle handle, unsigned long mask)
Disable the events specified by mask for handle.
Definition: vpbapi.cpp:1862
VPB_TONE_ID
VPB_TONE_ID
Symbolic identifiers for predefined, localised tones.
Definition: vpbapi.h:1425
ToneGen::Config::Freq::db
float db
Magnitude in dB, from -inf to 0dB.
Definition: tonegen.h:123
ToneGen::Config::SetUserData
void SetUserData(size_t slot, T data)
Store arbitrary, typed data into a user-data slot.
Definition: tonegen.h:405
VTCore::UNListen
void UNListen(unsigned int port)
Remove a half duplex bridge or full duplex tap from port.
Definition: vtcore.cpp:1041
playrec.h
Internal functions for audio playback and recording.
VPB_MTONEDETECT
#define VPB_MTONEDETECT
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:512
vpb_play_file_sync
int WINAPI vpb_play_file_sync(VPBPortHandle handle, const string &file_name)
Utility function to play a wav file to a port.
Definition: playrec.cpp:956
vpb_get_card_info
int WINAPI vpb_get_card_info(int board, VPB_CARD_INFO *detail)
Return detail of the card model and revision for board.
Definition: vpbapi.cpp:3141
MAXCH
#define MAXCH
max channels per VPB
Definition: vpbreg.h:74
vpb_settonedet
void WINAPI vpb_settonedet(VPBPortHandle handle, const VPB_DETECT &d)
Set or change the parameters for a tone to detect on some port.
Definition: vpbtoned.cpp:306
V4PCI_DSP::PadTxFrame
void PadTxFrame(int port)
Pad a partial transmit frame for forwarding to the hardware.
Definition: comm.cpp:349
vpb_set_tone_event_mask
int WINAPI vpb_set_tone_event_mask(VPBPortHandle handle, unsigned long mask)
Set the TONE event mask. The previous mask value will be overwritten.
Definition: vpbapi.cpp:1870
ToneGen::Config::SetRepeat
void SetRepeat(bool repeat=true)
Set this (sequence of) tone(s) to play once, or loop continuously.
Definition: tonegen.h:328
VPBHANDLE::channel
int channel
The port number for this handle.
Definition: vpbreg.h:101
get_driver_type
int get_driver_type(int board)
Return the symbolic type of the driver for board.
Definition: vpbapi.cpp:2486
vpb_cid_debug_on
void WINAPI vpb_cid_debug_on(const char *debug_file_name)
Enable debugging of the CID decoder.
Definition: cid.cpp:109
VPB_PRI
@ VPB_PRI
Sangoma PRI card.
Definition: vpbapi.h:80
TONE_INFO
Definition: utilfuncs.h:152
CidCallType
CidCallType
Symbolic CID call types.
Definition: vpbapi.h:2070
vpb_play_buf_start
void WINAPI vpb_play_buf_start(VPBPortHandle handle, AudioCompress mode)
Prepare and seize a port for playing audio from a buffer.
Definition: playrec.cpp:915
VPBREG::numch
uint16_t numch
number of channels
Definition: vpbreg.h:127
cref_info
Definition: openpri.cpp:74
Timer::check_timeout_ms
bool check_timeout_ms(unsigned long elapsedms)
Return true if some number of milliseconds have elapsed since timer_start().
Definition: timer.cpp:41
VTCORE_INFO
Definition: utilfuncs.h:136
Country::drop_max
uint16_t drop_max
Max valid loop drop time in ms.
Definition: vpbapi.h:1748
Audio::term_digits
string term_digits
digits which terminate collection
Definition: playrec.cpp:74
ANA_IFACE
Definition: utilfuncs.h:92
VPB_USER_EVT
@ VPB_USER_EVT
Definition: vpbapi.h:488
VPB_OKIADPCM24
@ VPB_OKIADPCM24
24 kbit/s OKI ADPCM
Definition: vpbapi.h:733
VPB_BUSY_AUST
#define VPB_BUSY_AUST
busy/disconnect tone detected (Australia)
Definition: vpbapi.h:1639
VPB_RECORD
Port recording parameters.
Definition: vpbapi.h:713
ToneGen::Config
ToneGen configuration data structure.
Definition: tonegen.h:106
VPB_DETECT::tone_id
uint16_t tone_id
unique ID number for this tone
Definition: vpbapi.h:1610
VPB_DIGIT_TIME_OUT
@ VPB_DIGIT_TIME_OUT
The specified time for collecting digits expired.
Definition: vpbapi.h:1997
VPB_DEV::tonemask
unsigned long tonemask
The current tone event mask.
Definition: vpbapi.cpp:116
ToneGen::Config::~Config
~Config()
Destructor.
Definition: tonegen.h:250
VPB_MSTATION_FLASH
#define VPB_MSTATION_FLASH
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:522
vpb_play_set_gain
void WINAPI vpb_play_set_gain(VPBPortHandle handle, float gain)
Set the software play gain component for a port.
Definition: playrec.cpp:980
VPB_MDTMF_DOWN
#define VPB_MDTMF_DOWN
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:527
VTCore::TapListen
void TapListen(unsigned int port, unsigned int srcboard, unsigned int srcport)
Create a full duplex tap to port of the audio from srcport on srcboard.
Definition: vtcore.cpp:1024
vpbreg.h
VPB hardware registry implementation.
soft_bridges
static soft_bridge_info * soft_bridges
Global soft bridge list head.
Definition: vpbapi.cpp:163
vpb_get_num_cards
int WINAPI vpb_get_num_cards()
Return the number of cards in the system.
Definition: vpbapi.cpp:2628
VPB_DETECT::bandwidth2
uint16_t bandwidth2
bandwidth of second tone (Hz)
Definition: vpbapi.h:1615
VTCore::SetHookState
void SetHookState(int port, HookState hookstate)
Set the hook state of port.
Definition: vtcore.cpp:915
VPB_CID::cdn
char cdn[19]
Called directory number.
Definition: vpbapi.h:2090
VPB_CID::clear
void clear()
Clear all data members their initialisation state.
Definition: vpbapi.h:2100
VPB_GRUNT
#define VPB_GRUNT
grunt detected
Definition: vpbapi.h:1635
VPB_EVT_TYPE
VPB_EVT_TYPE
VPB_EVENT type values
Definition: vpbapi.h:441
vpb_dial_sync
int WINAPI vpb_dial_sync(int handle, const std::string &dialstr)
Dials a string of digits on the port for handle.
Definition: vpbdial.cpp:350
VPB_BUSY_308
#define VPB_BUSY_308
busy tone detected (studio 308)
Definition: vpbapi.h:1637
CONF_INFO
Definition: utilfuncs.h:171
vpb_get_event_count_ch
int WINAPI vpb_get_event_count_ch(VPBPortHandle handle)
Returns the number of events on the port specific event queue for handle.
Definition: vpbapi.cpp:1922
VPBREG::useconf
bool useconf
Flag true if a config file was read.
Definition: vpbreg.h:185
play_reset_hw_gain
void play_reset_hw_gain(int handle)
Reset the hardware play gain to the configured default value.
Definition: playrec.cpp:217
VPB_TONE::toff
unsigned long toff
off time in ms
Definition: vpbapi.h:1472
VPB_TONE::freq3
unsigned short freq3
frequency of third tone in Hz
Definition: vpbapi.h:1467
VPB_ONHOOK
@ VPB_ONHOOK
Port on-hook.
Definition: vpbapi.h:301
VPB_EVENT
Container for VPB event data.
Definition: vpbapi.h:493
VPB_DEVELOPMENT
const int VPB_DEVELOPMENT
API function error causes program abort. DON'T USE THIS.
Definition: vpbapi.h:1276
vpb_play_file_async
int WINAPI vpb_play_file_async(VPBPortHandle handle, const string &file_name, int data)
Utility function to play a wav file to a port.
Definition: playrec.cpp:968
ToneGen::Config::Cadence::Cadence
Cadence()
Default constructor.
Definition: tonegen.h:141
vpb_wave_set_sample_rate
void WINAPI vpb_wave_set_sample_rate(WFILE *wav, unsigned short rate)
Change the sample rate of a wav file.
Definition: wave.cpp:479
Country::name
const char * name
Country name.
Definition: vpbapi.h:1734
Timer::check_timeout
bool check_timeout(unsigned int elapsed)
Return true if some number of seconds have elapsed since timer_start().
Definition: timer.cpp:35
VPB_DIGITS::inter_digit_time_out
unsigned long inter_digit_time_out
The maximum time in ms to wait for further digits once collection begins.
Definition: vpbapi.h:1981
VPB_DETECT::ntones
uint16_t ntones
number of tones (1 or 2)
Definition: vpbapi.h:1611
ERROR
Definition: wobbly.cpp:47
vpb_put_event
int WINAPI vpb_put_event(VPB_EVENT *e)
Places an event on the global and port specific event queues.
Definition: vpbapi.cpp:1900
VPBREG::defbal2
uint16_t defbal2
default codec balance register 2
Definition: vpbreg.h:157
VPB_DATA
Definition: vpb_ioctl.h:39
ToneGen::EndSequence
void EndSequence()
Signal the completion of an atomic sequence of tones.
Definition: tonegen.h:745
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)
Encode a data link packet into CP-FSK wav data for type 2 CID.
Definition: cidg.cpp:337
Record::time_start
unsigned long time_start
Starting time for measuring time_out.
Definition: playrec.cpp:130
vpb_get_model
std::string WINAPI vpb_get_model(VPBPortHandle handle)
Return a string indicating the board model.
Definition: vpbapi.cpp:2597
vpb_wave_get_vlog
int WINAPI vpb_wave_get_vlog(WFILE *wav, VPB_VLOG *buf)
Get VPB_VLOG information from a wave file.
Definition: wave.cpp:604
vpb_get_event_mask
unsigned long WINAPI vpb_get_event_mask(VPBPortHandle handle)
Return the current event mask for handle.
Definition: vpbapi.cpp:1848
vpb_close
int WINAPI vpb_close(VPBPortHandle handle)
Close a previously opened port using the handle returned by vpb_open().
Definition: vpbapi.cpp:1748
LOOPSENSE
Definition: loopmon.cpp:65
vpb_loopback_on
int WINAPI vpb_loopback_on(int h)
Turns on software loop-back of tx->rx in the kernel.
Definition: vpbapi.cpp:3158
vpbapi.h
Voicetronix voice processing board public API.
vpb_get_event_ch_async
int WINAPI vpb_get_event_ch_async(VPBPortHandle handle, VPB_EVENT *event)
Fetch the next event from a port specific event queue.
Definition: vpbapi.cpp:2052
vpb_log_to_file
void WINAPI vpb_log_to_file(VPBPortHandle h, const std::string &filename)
Log full duplex audio from handle h to filename.
Definition: callmonitor.cpp:134
VPB_MRING_OFF
#define VPB_MRING_OFF
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:520
ToneGen::Config::GetNextFreqs
const Freq::List & GetNextFreqs()
Return the next frequency component in the sequence.
Definition: tonegen.h:456
TMRS
Definition: vpbtimer.cpp:48
vpb_set_event_mask
int WINAPI vpb_set_event_mask(VPBPortHandle handle, unsigned long mask)
Set the event mask for handle.
Definition: vpbapi.cpp:1840
VPBREG::cardnum
int cardnum
The number of the card as opened by the driver.
Definition: vpbreg.h:170
get_board_model
void get_board_model(int board, char *s)
Return a descriptive model name for board in s.
Definition: vpbapi.cpp:2568
VLOG
Definition: wave.cpp:97
VPBREG::szrxdf
uint16_t szrxdf[MAXCH]
size of RX FIFOs in DSP
Definition: vpbreg.h:134
CARD_LIST
Definition: utilfuncs.h:165
HostDSP::SetFlashTime
virtual void SetFlashTime(int port, uint16_t min, uint16_t max)
Configure the hook-flash detection window.
Definition: vpbreg.h:246
OpenPri::UNListen
void UNListen(unsigned int port)
Remove a half duplex bridge or full duplex tap from port.
Definition: openpri.cpp:2648
WFILE
Definition: wave.cpp:135
vpb_get_event_sync
int WINAPI vpb_get_event_sync(VPB_EVENT *event, unsigned int time_out=0)
Wait for an event on the global event queue.
Definition: vpbapi.cpp:2018
HostDSP::WaitForTxEmpty
virtual void WaitForTxEmpty(int port)=0
Block until the transmit buffers for port are empty.
VPB_DIGITS::digit_time_out
unsigned long digit_time_out
The maximum time in ms to wait for digits.
Definition: vpbapi.h:1978
Comm::InitBoards
void InitBoards()
Second stage initialisation.
Definition: comm.cpp:449
Comm::vpbreg
VPBREG * vpbreg(unsigned short board)
Return a pointer to the VPBREG structure for some board.
Definition: comm.cpp:571
VPBREG::handles
std::vector< int > handles
lookup table of the handles for each port.
Definition: vpbreg.h:169
VPB_TONE_RINGING
@ VPB_TONE_RINGING
Normal ringing tone.
Definition: vpbapi.h:1428
ToneGen::Config::Cadence::onms
unsigned int onms
On time is ms.
Definition: tonegen.h:137
VPB_PORT_UNKNOWN
@ VPB_PORT_UNKNOWN
Placeholder for an unknown port type.
Definition: vpbapi.h:91
vpb_play_voxfile_async
int WINAPI vpb_play_voxfile_async(int handle, const std::string &file_name, AudioCompress mode, int data)
Utility function to play a wav file to a port.
Definition: playrec.cpp:1061
VPBRegister::GetBoardCount
unsigned int GetBoardCount() const
Return the number of boards registered.
Definition: vpbreg.h:330
VPB_VLOG::statime
char statime[16]
Record Start Time yyyymmddHHMMSS.
Definition: vpbapi.h:1835
vpb_record_buf_sync
int WINAPI vpb_record_buf_sync(VPBPortHandle handle, char *buf, size_t len)
Record a buffer of audio samples from a port.
Definition: playrec.cpp:1487
vpb_record_file_async
int WINAPI vpb_record_file_async(VPBPortHandle handle, const string &file_name, AudioCompress mode)
Utility function to record a wav file from a port.
Definition: playrec.cpp:1527
vpb_get_country_data
const Country *WINAPI vpb_get_country_data(const std::string &name)
Get country specific data by name.
Definition: vpbapi.cpp:867
HostToneGen::ImplStart
State ImplStart()
Called by Start() for implementation specific operations.
llc_var
Definition: llconf.h:4
V4PCI_DSP::SetCountry
void SetCountry(int, const Country *)
Configure the hardware for country on port of this board.
Definition: comm.h:88
set_codec_reg
void set_codec_reg(int handle, unsigned short addr, unsigned short data, Comm *c)
Write directly to a V4PCI codec register.
Definition: vpbapi.cpp:2657
vpb_hostecho_on
int WINAPI vpb_hostecho_on(int h)
Enable the host echo canceller for handle.
Definition: vpbapi.cpp:3192
vtcore.h
VTCore HostDSP implementation
VPB_DETECT::stran
VPB_STRAN stran[VPB_MS]
cadence state transition table
Definition: vpbapi.h:1625
Compression
Definition: comp.h:50
Country::flash_min
uint16_t flash_min
Min valid hook flash time in ms.
Definition: vpbapi.h:1740
set_country
void set_country(int board, int port, const Country *country)
Set the country data for port on board.
Definition: vpbapi.cpp:799
record_reset_hw_gain
void record_reset_hw_gain(int handle)
Reset the hardware record gain to the configured default value.
Definition: playrec.cpp:251
get_country
const Country * get_country(int board, int port)
Return the country data for port on board.
Definition: vpbapi.cpp:818
vpb_bridge
int WINAPI vpb_bridge(VPBPortHandle h1, VPBPortHandle h2, BridgeMode mode)
Create a full duplex bridge between ports h1 and h2.
Definition: vpbapi.cpp:2702
vpb_reset
void WINAPI vpb_reset(VPBPortHandle handle=VPB_PORTHANDLE_NULL)
Reset a port back to its idle state (on-hook, not ringing etc.)
Definition: vpbapi.cpp:1652
vpb_set_event_callback
int WINAPI vpb_set_event_callback(VPBPortHandle handle, vpb_event_callback callback, void *context)
Sets an event callback function to use instead of the APIQ.
Definition: vpbapi.cpp:1824
VPB_CID::call_type
CidCallType call_type
Call type designator.
Definition: vpbapi.h:2084
VT_DEPRECATED
VT_DEPRECATED(int WINAPI vpb_get_type(int h))
Audio::Audio
Audio()
Default constructor.
Definition: playrec.cpp:87
VPB_CID_NMSS
@ VPB_CID_NMSS
Network message system status.
Definition: vpbapi.h:2176
playrec_new_digit_play
void playrec_new_digit_play(int handle, char digit)
Called by the MMQ when the DSP detects a digit event.
Definition: playrec.cpp:882
Audio::mode
AudioCompress mode
current play mode
Definition: playrec.cpp:75
vpb_reset
void WINAPI vpb_reset(VPBPortHandle handle)
Reset a port back to its idle state (on-hook, not ringing etc.)
Definition: vpbapi.cpp:1652
Country::ring_cadence
int ring_cadence
Default ring cadence.
Definition: vpbapi.h:1737
VPB_CID_CALLING_LINE_DN
@ VPB_CID_CALLING_LINE_DN
Caller directory number.
Definition: vpbapi.h:2170
VTCore::SetPSImpedance
void SetPSImpedance(int port, int impedance)
Override the default impedance for ProSLIC ports.
Definition: vtcore.cpp:967
vpb_get_country_data
const Country *WINAPI vpb_get_country_data(const std::string &name)
Get country specific data by name.
Definition: vpbapi.cpp:867
vpb_send_cid_t2_sync
void WINAPI vpb_send_cid_t2_sync(int handle, const VPB_CID &cid)
Send type 2 caller id information to handle.
Definition: cidg.cpp:399
vpb_loopback_off
int WINAPI vpb_loopback_off(int handle)
Turns off software loop-back of tx->rx in the kernel.
Definition: vpbapi.cpp:3175
vpb_debug_tonedet
int WINAPI vpb_debug_tonedet(VPBPortHandle handle, int id, char file_name[], int sec)
Set or change the parameters for a tone to detect on some port.
Definition: vpbtoned.cpp:451
OP_CARD
Definition: utilfuncs.h:73
VPB_DIGITS::max_digits
unsigned short max_digits
The maximum number of digits to collect.
Definition: vpbapi.h:1975
vpb_set_country
void WINAPI vpb_set_country(const Country *country)
Set the global default country specific information.
Definition: vpbapi.cpp:836
VPB_ALAW
@ VPB_ALAW
64 kbit/s A-law companded
Definition: vpbapi.h:730
vpb_monitor_audio
void WINAPI vpb_monitor_audio(VPBPortHandle dest, VPBPortHandle src)
Tap full duplex audio from src to dest.
Definition: callmonitor.cpp:169
VPB_DEV
Container type for device information.
Definition: vpbapi.cpp:107
VPB_MDTMF
#define VPB_MDTMF
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:511
VPB_V4PCI
@ VPB_V4PCI
V4PCI 4 port PCI CT card.
Definition: vpbapi.h:76
VPB_TONE::ton
unsigned long ton
on time in ms, if 0 tone is continuous
Definition: vpbapi.h:1471
VPB_DEV::callback_mutex
pthread_mutex_t callback_mutex
Mutex for atomic access to event_callback and context.
Definition: vpbapi.cpp:128
VPB_DETECT::bandwidth1
uint16_t bandwidth1
bandwidth of first tone (Hz)
Definition: vpbapi.h:1613
APIQ
static HostFifo * APIQ
Global API event Q object.
Definition: vpbapi.cpp:164
vpb_sleep
void WINAPI vpb_sleep(long time_ms)
Put the current thread to sleep for some number of milliseconds.
Definition: vpbapi.cpp:2126
vpb_get_event_count
int WINAPI vpb_get_event_count(void)
Returns the number of events on the global event queue.
Definition: vpbapi.cpp:1927
V4PCIToneGen::ImplStart
State ImplStart()
Called by Start() for implementation specific operations.
Definition: comm.cpp:71
PCMCompression
Definition: comp.h:59
V4PCIToneGen
V4PCI tone generator specialisation
Definition: comm.cpp:57
DATA
Definition: wave.cpp:89
VPBREG::upmess
Fifo * upmess
ptr to down message DSP FIFO in PC
Definition: vpbreg.h:145
VPB_ERROR_CODE
const int VPB_ERROR_CODE
API function error returns error code. DON'T USE THIS.
Definition: vpbapi.h:1279
VPB_DETECT::minlevel1
int16_t minlevel1
min amp of 1st tone ref 0dBm0
Definition: vpbapi.h:1616
VPB_DIGITS
Digit collection parameters.
Definition: vpbapi.h:1968
putevt
int putevt(VPB_EVENT *e, unsigned long mask)
Internal function to place an event on the API event queue.
Definition: vpbapi.cpp:1949
ToneGen::ContinueSequence
void ContinueSequence()
Begin the next discrete tone in an atomic sequence.
Definition: tonegen.h:729
ToneGen::Exception
ToneGen runtime exception type
Definition: tonegen.h:478
VPB_RECORD::time_out
unsigned int time_out
Max ms to record for. If 0, recording will not time out.
Definition: vpbapi.h:720
VPB_CID_DATE_TIME
@ VPB_CID_DATE_TIME
Timestamp.
Definition: vpbapi.h:2169
VPBREG::defPlayGain
float defPlayGain
default play (Rx) gain
Definition: vpbreg.h:152
VPB_ON
@ VPB_ON
The device is open.
Definition: vpbapi.cpp:100
V4PCI_DSP::WaitForTxEmpty
void WaitForTxEmpty(int port)
Block until the transmit buffers for port are empty.
Definition: comm.cpp:357
vpb_get_digits_async
int WINAPI vpb_get_digits_async(int handle, VPB_DIGITS *newdig, char *buf)
Get a buffer of DTMF digits.
Definition: digits.cpp:166
VPB_OKIADPCM
@ VPB_OKIADPCM
32 kbit/s OKI ADPCM
Definition: vpbapi.h:732
VPB_RINGBACK_308
#define VPB_RINGBACK_308
ringback detected (studio 308)
Definition: vpbapi.h:1636
DD_PCI
#define DD_PCI
PCI driver.
Definition: vpbreg.h:85
vpb_sethook_async
void WINAPI vpb_sethook_async(VPBPortHandle handle, HookState hookstate)
Signal a port to set its hook state. Returns immediately.
Definition: vpbapi.cpp:2062
VPBREG::a_txdf
uint16_t a_txdf[MAXCH]
addresses of TX FIFOs in DSP
Definition: vpbreg.h:133
llc_cat
Definition: llconf.h:9
ADPCM
Definition: adpcm.cpp:46
vpb_cid_compose_dlp
int WINAPI vpb_cid_compose_dlp(const VPB_CID &cid, char *dlp)
Create a data link packet from a VPB_CID structure.
Definition: cidg.cpp:183
ToneGen::Config::Freq::List
std::vector< Freq > List
Container type for a list of Freq structures.
Definition: tonegen.h:117
OL_CARD
Definition: utilfuncs.h:105
vpb_monitor_terminate
void WINAPI vpb_monitor_terminate(VPBPortHandle h)
Cancel a tap to handle h created with vpb_monitor_audio().
Definition: callmonitor.cpp:182
vpb_record_terminate_sync
int WINAPI vpb_record_terminate_sync(int handle)
Stop audio recording.
Definition: playrec.cpp:1648
set_codec_reg
void set_codec_reg(int handle, unsigned short addr, unsigned short data, Comm *comm)
Write directly to a V4PCI codec register.
Definition: vpbapi.cpp:2657
get_country
const Country * get_country(int board, int port)
Return the country data for port on board.
Definition: vpbapi.cpp:818
vpb_record_get_gain
float WINAPI vpb_record_get_gain(VPBPortHandle handle)
Return the software record gain for a port.
Definition: playrec.cpp:1551
VPBREG::sztxdf
uint16_t sztxdf[MAXCH]
size of TX FIFOs in DSP
Definition: vpbreg.h:135
vpb_wave_seek
int WINAPI vpb_wave_seek(WFILE *wav, long offset)
Move the wave pointer to a specified location in the samples.
Definition: wave.cpp:459
CheckHandle
void CheckHandle(VPBPortHandle handle, const char *where)
Check for a valid device handle.
Definition: vpbapi.cpp:735
Comm::PutMessageVPB
void PutMessageVPB(unsigned short board, uint16_t *mess)
Send a message to the DSP message queue.
Definition: comm.cpp:485
VPB_OFFHOOK
@ VPB_OFFHOOK
Port off-hook.
Definition: vpbapi.h:302
ToneGen::Exception::~Exception
~Exception()
Destructor.
Definition: tonegen.h:490
vpb_play_terminate_sync
int WINAPI vpb_play_terminate_sync(int handle)
Stop audio playback.
Definition: playrec.cpp:1095
vt_deprecated.h
Deprecated symbol handling.
VPBREG::revision
char revision[8]
Revision number.
Definition: vpbreg.h:164
OpenPri::WaitForTxEmpty
void WaitForTxEmpty(int port)
Block until the transmit buffers for port are empty.
Definition: openpri.cpp:2631
ring_station_async
void ring_station_async(int board, int port, int cadence)
Internal function to control ringing on port of board.
Definition: vpbapi.cpp:2096
FMT
Definition: wave.cpp:68
playrec_close
void playrec_close()
Closes the playrec module.
Definition: playrec.cpp:505
V4PCIDspFifo::HowEmpty
size_t HowEmpty()
Returns the number of words free in the DSP FIFO.
Definition: dspfifo.cpp:201
VPB_MVOXON
#define VPB_MVOXON
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:514
vpb_settone
int WINAPI vpb_settone(char ident, const VPB_TONE *tone)
Enables user to (re)define the tone associated with a dial string character.
Definition: vpbdial.cpp:374
vpb_echo_canc_set_sup_thresh
int WINAPI vpb_echo_canc_set_sup_thresh(int handle, short *thresh)
Set the echo suppressor threshold.
Definition: vpbapi.cpp:2463
vpb_set_flashtime
void WINAPI vpb_set_flashtime(VPBPortHandle handle, uint16_t min, uint16_t max)
Set the window for detecting flash events on OpenPCI cards.
Definition: vpbapi.cpp:2084
BridgeMode
BridgeMode
Port bridging control flags.
Definition: vpbapi.h:381
VPB_VLOG::cidt
char cidt[128]
CID TEXT ascii.
Definition: vpbapi.h:1839
Comm::GetBoardCount
unsigned int GetBoardCount() const
Return the total number of VPB boards currently registered.
Definition: comm.h:137
vpb_ring_station_async
void WINAPI vpb_ring_station_async(VPBPortHandle handle, int cadence=-1)
Start or stop a station port ringing.
Definition: vpbapi.cpp:2116
VPBREG::model
VPB_MODEL model
VPB model.
Definition: vpbreg.h:148
vpb_translate_event
void WINAPI vpb_translate_event(VPB_EVENT *event, char *str)
Converts a given event into a string describing it.
VT_DATA
Definition: vtcore_ioctl.h:16
VPBREG::chans
void * chans
Pointer to Channel state variables.
Definition: vpbreg.h:181
vpb_flush_events
void WINAPI vpb_flush_events(VPBPortHandle handle)
Clear all unread events from the queue for handle.
Definition: vpbapi.cpp:1935
VPBREG::data
uint16_t data
data reg for PC-DSP comms
Definition: vpbreg.h:126
GENERIC_CRITICAL_SECTION
Definition: generic.h:47
VPB_TONE_ID_MAX
@ VPB_TONE_ID_MAX
Indicates the number of defined tone id's.
Definition: vpbapi.h:1435
ToneGen::CONTINUOUS
@ CONTINUOUS
Continuous tone generation in progress.
Definition: tonegen.h:95
VPB_EVENT::data1
unsigned long data1
Optional long data.
Definition: vpbapi.h:499
ToneGen::SignalCompletion
void SignalCompletion()
Notify the tone generator of an external completion event.
Definition: tonegen.h:764
COFF_FILE
Definition: coff.cpp:156
VPB_EVENT::lenextra
int lenextra
Support for user defined event data.
Definition: vpbapi.h:501
Country::drop_time
uint16_t drop_time
Generated loop drop time in ms.
Definition: vpbapi.h:1746
vpb_deltonedet
void WINAPI vpb_deltonedet(VPBPortHandle handle, const VPB_DETECT &d)
Revove a tone detector from some port.
Definition: vpbtoned.cpp:364
ToneGen::ToneGen
ToneGen()
Default constructor.
Definition: tonegen.h:554
Totalchans
static unsigned short Totalchans
Total number of ports on all boards.
Definition: vpbapi.cpp:167
VPBREG::defbal3
uint16_t defbal3
default codec balance register 3
Definition: vpbreg.h:158
vpb_listen
int WINAPI vpb_listen(VPBPortHandle dest, VPBPortHandle src, BridgeMode mode)
Create a half duplex bridge routing audio from src to dest.
Definition: vpbapi.cpp:2982
vpb_get_hookstate
HookState WINAPI vpb_get_hookstate(VPBPortHandle handle)
Return the hook state of a port.
Definition: vpbapi.cpp:2513
VPBRegister::LookupHandle
const VPBHANDLE & LookupHandle(int handle) const
Look up the VPBHANDLE entry for handle.
Definition: vpbreg.h:340
vpb_record_buf_start
void WINAPI vpb_record_buf_start(VPBPortHandle handle, AudioCompress mode)
Prepare and seize a port for recording audio from a buffer.
Definition: playrec.cpp:1480
VPB_MALL_TONES
#define VPB_MALL_TONES
Set or change the parameters for a tone to detect on some port.
Definition: vpbapi.h:1658
vpb_ring_with_cid
void WINAPI vpb_ring_with_cid(int handle, const VPB_CID &cid, int cadence)
Start handle ringing and send type 1 caller id information.
Definition: cidg.cpp:369
Timer::stop
void stop()
Disable the the timer reporting a time out.
Definition: timer.h:45
CollectEndReason
CollectEndReason
The termination reason passed in the VPB_EVENT::data field of a VPB_DIGIT event.
Definition: vpbapi.h:1987
ToneGen::Exception::Exception
Exception(const std::string &message)
Construct an exception object with a simple message string.
Definition: tonegen.h:487
ToneGen::Start
void Start(Config *tone, bool sync=false)
Begin generation of a single tone.
Definition: tonegen.h:600
VPB_OPEN_NONE
const VPBOpenMode VPB_OPEN_NONE
Just open the port.
Definition: vpbapi.h:129
get_port_type
VPB_PORT get_port_type(int board, int port)
Return the type of a port on some board. VPB_FXO or VPB_FXS.
Definition: vpbapi.cpp:2539
VPB_MULAW
@ VPB_MULAW
64 kbit/s mu-law companded
Definition: vpbapi.h:731
VPB_MS
#define VPB_MS
The maximum number of cadence states to match.
Definition: vpbapi.h:1574
V4PCI_DSP::CheckForAssert
void CheckForAssert(unsigned short board)
Definition: comm.cpp:377
VPB_DETECT::freq1
uint16_t freq1
freq of first tone (Hz)
Definition: vpbapi.h:1612
VPB_EVENT::data
int data
Optional data.
Definition: vpbapi.h:498
VPB_MALL_EVENTS
#define VPB_MALL_EVENTS
The callback function type for vpb_set_event_callback().
Definition: vpbapi.h:528
VPB_PLAY
Port playback parameters.
Definition: vpbapi.h:704
Country
Container type for country specific data.
Definition: vpbapi.h:1729
Country::flash_max
uint16_t flash_max
Max valid hook flash time in ms.
Definition: vpbapi.h:1741
V4PCIDspFifo
Definition: dspfifo.h:44