libvpb
4.2.61
|
Modules | |
Event handling | |
Macros | |
#define | VPB_RING_STATION_ON -1 |
Ring station port with default cadence. | |
#define | VPB_RING_STATION_OFF 0 |
Stop station port ringing. | |
#define | VPB_CONF_JOIN 1 |
#define | VPB_CONF_LEAVE 0 |
Enumerations | |
enum | HookState { VPB_ONHOOK = 0 , VPB_OFFHOOK = 1 , VPB_FASTOFFHOOK = 2 } |
Symbolic hook states. More... | |
enum | BridgeMode { VPB_BRIDGE_OFF = 0 , VPB_BRIDGE_ON = 1 } |
Port bridging control flags. More... | |
Functions | |
HookState WINAPI | vpb_get_hookstate (VPBPortHandle handle) |
Return the hook state of a port. More... | |
void WINAPI | vpb_sethook_async (VPBPortHandle handle, HookState hookstate) |
Signal a port to set its hook state. Returns immediately. | |
void WINAPI | vpb_sethook_sync (VPBPortHandle handle, HookState hookstate) |
Set the hook state of a port. Waits for it to change before returning. | |
void WINAPI | vpb_set_flashtime (VPBPortHandle handle, uint16_t min, uint16_t max) |
Set the window for detecting flash events on OpenPCI cards. More... | |
void WINAPI | vpb_ring_station_async (VPBPortHandle handle, int cadence=-1) |
Start or stop a station port ringing. More... | |
int WINAPI | vpb_bridge (VPBPortHandle h1, VPBPortHandle h2, BridgeMode mode) |
Create a full duplex bridge between ports h1 and h2. | |
int WINAPI | vpb_listen (VPBPortHandle dest, VPBPortHandle src, BridgeMode mode) |
Create a half duplex bridge routing audio from src to dest. | |
int WINAPI | vpb_soft_bridge (int h1, int h2, int mode) |
void WINAPI | vpb_set_codec_reg (VPBPortHandle handle, uint16_t addr, uint16_t value) |
VT_DEPRECATED (int WINAPI vpb_conf(int h1, int resource, int mode)) | |
Deprecated functions | |
VT_DEPRECATED (int WINAPI vpb_bridge(int h1, int h2, BridgeMode mode, int resource)) | |
enum BridgeMode |
enum HookState |
HookState WINAPI vpb_get_hookstate | ( | VPBPortHandle | handle | ) |
Return the hook state of a port.
handle | The handle of the port to query. |
VPB_ONHOOK
or VPB_OFFHOOK
if the query succeeds. VpbException | will be thrown in the event of an error. |
void WINAPI vpb_ring_station_async | ( | VPBPortHandle | handle, |
int | cadence = -1 |
||
) |
Start or stop a station port ringing.
handle | The handle of the port to control. |
cadence | The ring cadence value. |
If the cadence parameter is not specified, the default cadence for a normal ring according to the port's country setting will be used. The valid cadence values are defined as follows:
0
- Stop ringing.1
- Ring a guard tone cadence. Often used before sending caller id.2
- Normal ring for Australian phone networks. (DR0
)3-9
- DR1
to DR7
of the AS/ACIF
S002:2001 distinctive ring series.10
- US ring cadence.There is an additional special ring cadence 255
, which like 0
, stops the station ringing, but in addition will signal an OpenPCI FXS
port to enter a mode where caller id information can be transmitted to a handset that is still on hook. ie. for US style caller id, you would generate one second of cadence 1
tone, stopped by a cadence 255
signal. The caller id tones can then be sent, and normal ringing commenced using cadence 2
- 10
. Convenience functions to do this are provided with the CTPort interface to ctserver.
1
- 10
will all cause its normal ring cadence to be generated.void WINAPI vpb_set_flashtime | ( | VPBPortHandle | handle, |
uint16_t | min, | ||
uint16_t | max | ||
) |
Set the window for detecting flash events on OpenPCI cards.
For FXS ports, this is automatically configured according to the locale specific values in the Country
structure. For FXO ports, flash events are only generated if this function has been explicitly called (this is to maintain compatibility with older applications which manually processed the raw on/off hook events themselves).
handle | The handle of the port to configure. |
min | The minimum on-hook time for a valid flash signal in ms . |
max | The maximum on-hook time for a valid flash signal in ms . |
VT_DEPRECATED | ( | int WINAPI | vpb_bridgeint h1, int h2, BridgeMode mode, int resource | ) |
This function is deprecated. Use the more descriptively named and type-safe vpb_get_card_type()
function instead.