|
libsangoma
1
|
Wanpipe API Code Library for Sangoma AFT T1/E1/Analog/BRI/Serial hardware. More...
#include "libsangoma-pvt.h"
Go to the source code of this file.
Functions | |
| sangoma_status_t _LIBSNG_CALL | sangoma_wait_obj_create (sangoma_wait_obj_t **sangoma_wait_object, sng_fd_t fd, sangoma_wait_obj_type_t object_type) |
| Create a wait object that will be used with sangoma_waitfor_many() API. More... | |
| sangoma_status_t _LIBSNG_CALL | sangoma_wait_obj_delete (sangoma_wait_obj_t **sangoma_wait_object) |
| De-allocate all resources in a wait object. More... | |
| int _LIBSNG_CALL | sangoma_wait_obj_signal (sangoma_wait_obj_t *sng_wait_obj) |
| Set wait object to a signaled state. More... | |
| sng_fd_t _LIBSNG_CALL | sangoma_wait_obj_get_fd (sangoma_wait_obj_t *sng_wait_obj) |
| Get fd device file descriptor which was the 'fd' parameter for sangoma_wait_obj_create(), not useful for generic objects. More... | |
| void _LIBSNG_CALL | sangoma_wait_obj_set_context (sangoma_wait_obj_t *sng_wait_obj, void *context) |
| PVOID _LIBSNG_CALL | sangoma_wait_obj_get_context (sangoma_wait_obj_t *sng_wait_obj) |
| Retrieve the user context (if any) that was set via sangoma_wait_obj_set_context. More... | |
| sangoma_status_t _LIBSNG_CALL | sangoma_waitfor_many (sangoma_wait_obj_t *sng_wait_objects[], uint32_t in_flags[], uint32_t out_flags[], uint32_t number_of_sangoma_wait_objects, int32_t system_wait_timeout) |
| sangoma_status_t _LIBSNG_CALL | sangoma_waitfor (sangoma_wait_obj_t *sangoma_wait_obj, uint32_t inflags, uint32_t *outflags, int32_t timeout) |
| int _LIBSNG_CALL | sangoma_span_chan_toif (int span, int chan, char *interface_name) |
| Convert Span & Chan to interface name. More... | |
| int _LIBSNG_CALL | sangoma_interface_toi (char *interface_name, int *span, int *chan) |
| Convert Span & Chan to interface name. More... | |
| int _LIBSNG_CALL | sangoma_interface_wait_up (int span, int chan, int sectimeout) |
| Wait for a sangoma device to come up (ie: Linux wait for /dev/wanpipex_1 to come up) More... | |
| int _LIBSNG_CALL | sangoma_span_chan_fromif (char *interface_name, int *span, int *chan) |
| Convert Interace Name to Span & Chan. More... | |
| sng_fd_t _LIBSNG_CALL | sangoma_open_api_span_chan (int span, int chan) |
| Open a Device based on Span/Chan values. More... | |
| sng_fd_t _LIBSNG_CALL | sangoma_open_dev_by_name (const char *dev_name) |
| Open API device using it's name. For example: Linux: w1g1, Windows wanpipe1_if1. More... | |
| sng_fd_t _LIBSNG_CALL | __sangoma_open_api_span_chan (int span, int chan) |
| Open a Device based on Span/Chan values. More... | |
| sng_fd_t _LIBSNG_CALL | sangoma_open_api_ctrl (void) |
| Open a Global Control Device. More... | |
| sng_fd_t _LIBSNG_CALL | sangoma_logger_open (void) |
| Open a Global Logger Device. More... | |
| int _LIBSNG_CALL | sangoma_get_open_cnt (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Get device open count. More... | |
| sng_fd_t _LIBSNG_CALL | sangoma_create_socket_by_name (char *device, char *card) |
| Open a device based on a interface and card name. More... | |
| sng_fd_t _LIBSNG_CALL | sangoma_open_api_span (int span) |
| void _LIBSNG_CALL | sangoma_close (sng_fd_t *fd) |
| Close device file descriptor. More... | |
| int _LIBSNG_CALL | sangoma_readmsg (sng_fd_t fd, void *hdrbuf, int hdrlen, void *databuf, int datalen, int flag) |
| Read Data from device. More... | |
| int _LIBSNG_CALL | sangoma_writemsg (sng_fd_t fd, void *hdrbuf, int hdrlen, void *databuf, unsigned short datalen, int flag) |
| Write Data to device. More... | |
| int _LIBSNG_CALL | sangoma_cmd_exec (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Execute Sangoma API Command. More... | |
| int _LIBSNG_CALL | sangoma_get_full_cfg (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Read tdm api device configuration. More... | |
| int _LIBSNG_CALL | sangoma_tdm_set_codec (sng_fd_t fd, wanpipe_api_t *tdm_api, int codec) |
| Set TDM Codec per chan. More... | |
| int _LIBSNG_CALL | sangoma_tdm_get_codec (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Get Configured TDM Codec per chan. More... | |
| int _LIBSNG_CALL | sangoma_tdm_set_usr_period (sng_fd_t fd, wanpipe_api_t *tdm_api, int period) |
| Set Tx/Rx Period in Milliseconds. More... | |
| int _LIBSNG_CALL | sangoma_tdm_get_usr_period (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Get Tx/Rx Period in Milliseconds. More... | |
| int _LIBSNG_CALL | sangoma_get_hw_coding (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Get HW Voice Coding (ulaw/alaw) More... | |
| int _LIBSNG_CALL | sangoma_tdm_get_hw_dtmf (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Check if hwdtmf support is available. More... | |
| int _LIBSNG_CALL | sangoma_tdm_get_hw_ec (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Check if hw echo cancelation support is available. More... | |
| int _LIBSNG_CALL | sangoma_tdm_get_hwec_chan_status (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Check if hw echo cancelation is enabled on current timeslot. More... | |
| int _LIBSNG_CALL | sangoma_tdm_get_hwec_persist_status (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Check if hwec persis mode is on: On persist mode hwec is always enabled. More... | |
| int _LIBSNG_CALL | sangoma_tdm_get_usr_mtu_mru (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Get Tx/Rx MTU/MRU in bytes. More... | |
| int _LIBSNG_CALL | sangoma_tdm_set_power_level (sng_fd_t fd, wanpipe_api_t *tdm_api, int power) |
| Set Power Level - so only data matching the power level would be passed up. More... | |
| int _LIBSNG_CALL | sangoma_tdm_get_power_level (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Get Configured Power Level. More... | |
| int _LIBSNG_CALL | sangoma_flush_bufs (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Flush all (tx/rx/event) buffers from current channel. More... | |
| int _LIBSNG_CALL | sangoma_flush_rx_bufs (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Flush only rx buffers from current channel. More... | |
| int _LIBSNG_CALL | sangoma_flush_tx_bufs (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Flush only tx buffers from current channel. More... | |
| int _LIBSNG_CALL | sangoma_flush_event_bufs (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Flush only event buffers from current channel. More... | |
| int _LIBSNG_CALL | sangoma_tdm_enable_rbs_events (sng_fd_t fd, wanpipe_api_t *tdm_api, int poll_in_sec) |
| Enable RBS Events on a device. More... | |
| int _LIBSNG_CALL | sangoma_tdm_disable_rbs_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Disable RBS Events for a device. More... | |
| int _LIBSNG_CALL | sangoma_tdm_write_rbs (sng_fd_t fd, wanpipe_api_t *tdm_api, int channel, unsigned char rbs) |
| Write RBS Bits on a device. More... | |
| int _LIBSNG_CALL | sangoma_tdm_read_rbs (sng_fd_t fd, wanpipe_api_t *tdm_api, int channel, unsigned char *rbs) |
| Read RBS Bits on a device. More... | |
| int _LIBSNG_CALL | sangoma_tdm_set_buffer_multiplier (sng_fd_t fd, wanpipe_api_t *tdm_api, unsigned int multiplier) |
| Set voice tx/rx buffer multiplier. More... | |
| int _LIBSNG_CALL | sangoma_read_event (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Read API Events. More... | |
| sangoma_status_t _LIBSNG_CALL | sangoma_logger_cmd_exec (sng_fd_t fd, wp_logger_cmd_t *logger_cmd) |
| sangoma_status_t _LIBSNG_CALL | sangoma_logger_read_event (sng_fd_t fd, wp_logger_cmd_t *logger_cmd) |
| Read Wanpipe Logger Events. More... | |
| sangoma_status_t _LIBSNG_CALL | sangoma_logger_flush_buffers (sng_fd_t fd, wp_logger_cmd_t *logger_cmd) |
| Flush Wanpipe Logger internal buffers. More... | |
| sangoma_status_t _LIBSNG_CALL | sangoma_logger_get_statistics (sng_fd_t fd, wp_logger_cmd_t *logger_cmd) |
| Get Wanpipe Logger statistics. More... | |
| sangoma_status_t _LIBSNG_CALL | sangoma_logger_reset_statistics (sng_fd_t fd, wp_logger_cmd_t *logger_cmd) |
| Reset Wanpipe Logger statistics. More... | |
| sangoma_status_t _LIBSNG_CALL | sangoma_logger_get_open_handle_counter (sng_fd_t fd, wp_logger_cmd_t *logger_cmd) |
| Get Counter of open Handles/File Descriptors of Wanpipe Logger. More... | |
| sangoma_status_t _LIBSNG_CALL | sangoma_logger_get_logger_level (sng_fd_t fd, wp_logger_cmd_t *logger_cmd) |
| Get current level (types of events) of Wanpipe Logger. More... | |
| sangoma_status_t _LIBSNG_CALL | sangoma_logger_set_logger_level (sng_fd_t fd, wp_logger_cmd_t *logger_cmd) |
| Set current level (types of events) of Wanpipe Logger. More... | |
| int _LIBSNG_CALL | sangoma_tdm_enable_fax_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Enable FAX Detection on Octasic chip (if hw supports it) More... | |
| int _LIBSNG_CALL | sangoma_tdm_disable_fax_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Disable FAX Detection on Octasic chip (if hw supports it) More... | |
| int _LIBSNG_CALL | sangoma_tdm_get_hw_fax (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Get HW FAX Detection State (Enable or Disabled) on Octasic chip (if hw supports it) More... | |
| int _LIBSNG_CALL | sangoma_tdm_enable_dtmf_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Enable DTMF Detection on Octasic chip (if hw supports it) More... | |
| int _LIBSNG_CALL | sangoma_tdm_disable_dtmf_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Disable DTMF Detection on Octasic chip (if hw supports it) More... | |
| int _LIBSNG_CALL | sangoma_tdm_enable_rm_dtmf_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Enable DTMF Detection on Analog/Remora SLIC Chip. More... | |
| int _LIBSNG_CALL | sangoma_tdm_disable_rm_dtmf_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Disable DTMF Detection on Analog/Remora SLIC Chip. More... | |
| int _LIBSNG_CALL | sangoma_tdm_enable_rxhook_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Enable RX HOOK Events (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_disable_rxhook_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Disable RX HOOK Events (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_enable_ring_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Enable RING Events (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_disable_ring_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Disable RING Events (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_enable_ring_detect_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Enable RING DETECT Events (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_disable_ring_detect_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Disable RING DETECT Events (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_enable_ring_trip_detect_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Enable RING TRIP Events (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_disable_ring_trip_detect_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Disable RING TRIP Events (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_txsig_kewl (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Tranmsmit TX SIG KEWL START (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_txsig_start (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Tranmsmit TX SIG START (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_txsig_onhook (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Tranmsmit TX SIG ON HOOK (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_txsig_offhook (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Tranmsmit TX SIG OFF HOOK (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_enable_tone_events (sng_fd_t fd, wanpipe_api_t *tdm_api, uint16_t tone_id) |
| Transmit a TONE on this device (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_disable_tone_events (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Enable TONE Events (Analog Only) More... | |
| int _LIBSNG_CALL | sangoma_tdm_enable_hwec (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Enable HWEC on this channel. More... | |
| int _LIBSNG_CALL | sangoma_tdm_disable_hwec (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Disable HWEC on this channel. More... | |
| int _LIBSNG_CALL | sangoma_tdm_get_fe_alarms (sng_fd_t fd, wanpipe_api_t *tdm_api, unsigned int *alarms) |
| Get Front End Alarms (T1/E1 Only) More... | |
| int _LIBSNG_CALL | sangoma_get_fe_status (sng_fd_t fd, wanpipe_api_t *tdm_api, unsigned char *current_status) |
| Get Device Link Status (Connected/Disconnected) More... | |
| int _LIBSNG_CALL | sangoma_get_link_status (sng_fd_t fd, wanpipe_api_t *tdm_api, unsigned char *current_status) |
| Get Device Link Status (Connected/Disconnected) More... | |
| int _LIBSNG_CALL | sangoma_set_fe_status (sng_fd_t fd, wanpipe_api_t *tdm_api, unsigned char new_status) |
| Set Device Link Status (Connected/Disconnected) More... | |
| int _LIBSNG_CALL | sangoma_disable_bri_bchan_loopback (sng_fd_t fd, wanpipe_api_t *tdm_api, int channel) |
| Disable BRI Bchannel loopback - used when debugging bri device. More... | |
| int _LIBSNG_CALL | sangoma_enable_bri_bchan_loopback (sng_fd_t fd, wanpipe_api_t *tdm_api, int channel) |
| Enable BRI Bchannel loopback - used when debugging bri device. More... | |
| int _LIBSNG_CALL | sangoma_get_tx_queue_sz (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Get Tx Queue Size for this channel. More... | |
| int _LIBSNG_CALL | sangoma_set_tx_queue_sz (sng_fd_t fd, wanpipe_api_t *tdm_api, int size) |
| Get Tx Queue Size for this channel. More... | |
| int _LIBSNG_CALL | sangoma_get_rx_queue_sz (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Get Rx Queue Size for this channel. More... | |
| int _LIBSNG_CALL | sangoma_set_rx_queue_sz (sng_fd_t fd, wanpipe_api_t *tdm_api, int size) |
| Get Tx Queue Size for this channel. More... | |
| int _LIBSNG_CALL | sangoma_get_driver_version (sng_fd_t fd, wanpipe_api_t *tdm_api, wan_driver_version_t *drv_ver) |
| Get Device Driver Version Number. More... | |
| int _LIBSNG_CALL | sangoma_get_firmware_version (sng_fd_t fd, wanpipe_api_t *tdm_api, unsigned char *ver) |
| Get Hardware/Firmware Version. More... | |
| int _LIBSNG_CALL | sangoma_get_cpld_version (sng_fd_t fd, wanpipe_api_t *tdm_api, unsigned char *ver) |
| Get AFT CPLD Version. More... | |
| int _LIBSNG_CALL | sangoma_get_aft_customer_id (sng_fd_t fd, unsigned char *out_customer_id) |
| Get Customer-specific ID from AFT hardware, the default value is 0xFF, any change requires special arrangement with Sangoma Technologies. More... | |
| int _LIBSNG_CALL | sangoma_port_led_ctrl (sng_fd_t fd, unsigned char led_ctrl) |
| Control the LED ligths of the TDM port. On (led set based on link status) Off (turn off all led). Used to visually identify a phisical port from software. More... | |
| int _LIBSNG_CALL | sangoma_fe_reg_write (sng_fd_t fd, uint32_t offset, uint8_t data) |
| Write to a front end register. More... | |
| int _LIBSNG_CALL | sangoma_fe_reg_read (sng_fd_t fd, uint32_t offset, uint8_t *data) |
| Read front end register. More... | |
| int _LIBSNG_CALL | sangoma_analog_fxo_stats (sng_fd_t fd, uint8_t *data) |
| int _LIBSNG_CALL | sangoma_analog_fxs_stats (sng_fd_t fd, float *tip, float *ring, float *bat) |
| int _LIBSNG_CALL | sangoma_get_stats (sng_fd_t fd, wanpipe_api_t *tdm_api, wanpipe_chan_stats_t *stats) |
| Get Device Statistics. Statistics will be available in tdm_api->wp_cmd.stats structure. More... | |
| int _LIBSNG_CALL | sangoma_flush_stats (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Flush/Reset device statistics. More... | |
| int _LIBSNG_CALL | sangoma_set_rm_rxflashtime (sng_fd_t fd, wanpipe_api_t *tdm_api, int rxflashtime) |
| Set rxflashtime for FXS module Wink-Flash Event. More... | |
| int _LIBSNG_CALL | sangoma_set_rm_tx_gain (sng_fd_t fd, wanpipe_api_t *tdm_api, int value) |
| set tx gain for FXO/FXS module More... | |
| int _LIBSNG_CALL | sangoma_set_rm_rx_gain (sng_fd_t fd, wanpipe_api_t *tdm_api, int value) |
| set rx gain for FXO/FXS module More... | |
| int _LIBSNG_CALL | sangoma_tdm_set_polarity (sng_fd_t fd, wanpipe_api_t *tdm_api, int polarity) |
| int _LIBSNG_CALL | sangoma_tdm_txsig_onhooktransfer (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| int _LIBSNG_CALL | sangoma_tdm_enable_loop (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Enable channel loop: All rx data will be transmitted back out. More... | |
| int _LIBSNG_CALL | sangoma_tdm_disable_loop (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Disable channel loop. More... | |
| int _LIBSNG_CALL | sangoma_ss7_force_rx (sng_fd_t fd, wanpipe_api_t *tdm_api) |
| Force the firmware to pass up a repeating frame. More... | |
| int _LIBSNG_CALL | sangoma_ss7_get_cfg_status (sng_fd_t fd, wanpipe_api_t *tdm_api, wan_api_ss7_cfg_status_t *ss7_cfg_status) |
| Get current ss7 hw configuration. More... | |
Variables | |
| int | libsng_dbg_level = 0 |
Wanpipe API Code Library for Sangoma AFT T1/E1/Analog/BRI/Serial hardware.
Author(s): Nenad Corbic ncorbic@sangoma.com David Rokhvarg davidr@sangoma.com Michael Jerris mike@jerris.com Anthony Minessale II anthmct@yahoo.com
Copyright: (c) 2005-2008 Nenad Corbic ncorbic@sangoma.com
THIS SOFTWARE IS PROVIDED BY Sangoma Technologies ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Sangoma Technologies BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
Definition in file libsangoma.c.
| sangoma_status_t sangoma_wait_obj_create | ( | sangoma_wait_obj_t ** | sangoma_wait_object, |
| sng_fd_t | fd, | ||
| sangoma_wait_obj_type_t | object_type | ||
| ) |
Create a wait object that will be used with sangoma_waitfor_many() API.
Device POLL Functions
| sangoma_wait_object | pointer a single device object |
| fd | device file descriptor |
| object_type | type of the wait object. see sangoma_wait_obj_type_t for types |
| sangoma_wait_object | pointer a single device object |
| fd | device file descriptor |
| object_type | type of the wait object. see sangoma_wait_obj_type_t for types |
Definition at line 1239 of file libsangoma.c.
References FALSE, INVALID_HANDLE_VALUE, SANG_STATUS_FAILED_ALLOCATE_MEMORY, SANG_STATUS_GENERAL_ERROR, SANG_STATUS_INVALID_PARAMETER, SANG_STATUS_SUCCESS, and sangoma_wait_obj_delete().
Referenced by open_sangoma_device().


| sangoma_status_t sangoma_wait_obj_delete | ( | sangoma_wait_obj_t ** | sangoma_wait_object | ) |
De-allocate all resources in a wait object.
De-allocate all resources inside a wait object which were allocated by sangoma_wait_obj_init().
| sangoma_wait_object | pointer to a pointer to a single device object |
Definition at line 1320 of file libsangoma.c.
References INVALID_HANDLE_VALUE, SANG_STATUS_INVALID_DEVICE, SANG_STATUS_SUCCESS, sangoma_close(), and UNKNOWN_WAIT_OBJ.
Referenced by cleanup(), and sangoma_wait_obj_create().


| void sangoma_wait_obj_signal | ( | sangoma_wait_obj_t * | sangoma_wait_object | ) |
Set wait object to a signaled state.
| sangoma_wait_object | pointer a single device object that can be signaled |
Definition at line 1353 of file libsangoma.c.
References SANG_STATUS_GENERAL_ERROR, SANG_STATUS_INVALID_DEVICE, and SANG_STATUS_SUCCESS.
| sng_fd_t sangoma_wait_obj_get_fd | ( | sangoma_wait_obj_t * | sangoma_wait_object | ) |
Get fd device file descriptor which was the 'fd' parameter for sangoma_wait_obj_create(), not useful for generic objects.
| sangoma_wait_object | pointer a single device object |
Definition at line 1382 of file libsangoma.c.
Referenced by cleanup(), handle_span_chan(), handle_tdm_event(), and write_data().

| PVOID sangoma_wait_obj_get_context | ( | sangoma_wait_obj_t * | sangoma_wait_object | ) |
Retrieve the user context (if any) that was set via sangoma_wait_obj_set_context.
| sangoma_wait_object | pointer a single device object |
Windows note: must use return type PVOID instead of void* to satisfy WDK compiler.
| sangoma_wait_object | pointer a single device object |
Definition at line 1406 of file libsangoma.c.
Referenced by cleanup(), and write_data().

| int sangoma_span_chan_toif | ( | int | span, |
| int | chan, | ||
| char * | interface_name | ||
| ) |
Convert Span & Chan to interface name.
Device OPEN / CLOSE Functions
| span | span number starting from 1 to 255 |
| chan | chan number starting from 1 to 32 |
| interface_name | pointer to string where interface name will be written |
Definition at line 1566 of file libsangoma.c.
References WP_INTERFACE_NAME_FORM.
| int sangoma_interface_toi | ( | char * | interface_name, |
| int * | span, | ||
| int * | chan | ||
| ) |
Convert Span & Chan to interface name.
| interface_name | pointer to string where interface name will be written |
| span | span number starting from 1 to 255 |
| chan | chan number starting from 1 to 32 |
Definition at line 1577 of file libsangoma.c.
References FNAME_LEN.
Referenced by sangoma_create_socket_by_name().

| int sangoma_interface_wait_up | ( | int | span, |
| int | chan, | ||
| int | sectimeout | ||
| ) |
Wait for a sangoma device to come up (ie: Linux wait for /dev/wanpipex_1 to come up)
| span | span number of the device to wait |
| chan | chan number of the device to wait |
| sectimeout | how many seconds to wait for the device to come up, -1 to wait forever |
Definition at line 1608 of file libsangoma.c.
References FNAME_LEN, and WP_INTERFACE_NAME_FORM.
| int sangoma_span_chan_fromif | ( | char * | interface_name, |
| int * | span, | ||
| int * | chan | ||
| ) |
Convert Interace Name to Span & Chan.
| interface_name | pointer to string containing interface name |
| span | integer pointer where to write span value |
| chan | integer pointer where to write chan value |
Definition at line 1640 of file libsangoma.c.
References FNAME_LEN.
| sng_fd_t sangoma_open_api_span_chan | ( | int | span, |
| int | chan | ||
| ) |
Open a Device based on Span/Chan values.
Device OPEN / CLOSE Functions
| span | span number starting from 1 to 255 |
| chan | chan number starting from 1 to 32 |
Restriced open, device will allowed to be open only once.
Definition at line 1682 of file libsangoma.c.
References __sangoma_open_api_span_chan(), wanpipe_api_cmd::cmd, INVALID_HANDLE_VALUE, wanpipe_api_cmd::open_cnt, sangoma_close(), sangoma_cmd_exec(), WP_API_CMD_OPEN_CNT, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device(), and sangoma_create_socket_by_name().


| sng_fd_t sangoma_open_dev_by_name | ( | const char * | dev_name | ) |
Open API device using it's name. For example: Linux: w1g1, Windows wanpipe1_if1.
| dev_name | API device name |
Definition at line 1717 of file libsangoma.c.
References _snprintf, and FNAME_LEN.
Referenced by __sangoma_open_api_span_chan(), sangoma_logger_open(), sangoma_open_api_ctrl(), and sangoma_open_driver_ctrl().

| sng_fd_t __sangoma_open_api_span_chan | ( | int | span, |
| int | chan | ||
| ) |
Open a Device based on Span/Chan values.
| span | span number starting from 1 to 255 |
| chan | chan number starting from 1 to 32 |
Unrestriced open, allows mutiple open calls on a single device
Definition at line 1740 of file libsangoma.c.
References _snprintf, FNAME_LEN, sangoma_open_dev_by_name(), and WP_INTERFACE_NAME_FORM.
Referenced by open_sangoma_device(), and sangoma_open_api_span_chan().


| sng_fd_t sangoma_open_api_ctrl | ( | void | ) |
Open a Global Control Device.
The global control device receives events for all devices configured.
Definition at line 1750 of file libsangoma.c.
References sangoma_open_dev_by_name().

| sng_fd_t sangoma_logger_open | ( | void | ) |
Open a Global Logger Device.
The global Logger device receives Logger Events for all devices configured.
Definition at line 1756 of file libsangoma.c.
References sangoma_open_dev_by_name().

| int sangoma_get_open_cnt | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Get device open count.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 1762 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::open_cnt, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_OPEN_CNT, and wanpipe_api::wp_cmd.

| sng_fd_t sangoma_create_socket_by_name | ( | char * | device, |
| char * | card | ||
| ) |
Open a device based on a interface and card name.
| device | interface name |
| card | card name |
Deprecated - here for backward compatibility
Definition at line 1778 of file libsangoma.c.
References sangoma_interface_toi(), and sangoma_open_api_span_chan().

| void sangoma_close | ( | sng_fd_t * | fd | ) |
Close device file descriptor.
| fd | device file descriptor |
Definition at line 1818 of file libsangoma.c.
References INVALID_HANDLE_VALUE.
Referenced by cleanup(), sangoma_open_api_span_chan(), and sangoma_wait_obj_delete().

| int sangoma_readmsg | ( | sng_fd_t | fd, |
| void * | hdrbuf, | ||
| int | hdrlen, | ||
| void * | databuf, | ||
| int | datalen, | ||
| int | flag | ||
| ) |
Read Data from device.
Device READ / WRITE Functions
| fd | device file descriptor |
| hdrbuf | pointer to header structure wp_api_hdr_t |
| hdrlen | size of wp_api_hdr_t |
| databuf | pointer to data buffer to be received |
| datalen | length of data buffer |
| flag | currently not used, set to 0 |
In case of error return code, one must check the header operation_status variable to identify the reason of error. Please refer to the error codes.
Definition at line 1842 of file libsangoma.c.
References wp_api_hdr::data_length, wan_iovec_list::iovec_list, wan_msghdr::msg_iov, wan_msghdr::msg_iovlen, wp_api_hdr::operation_status, SANG_STATUS_NO_DATA_AVAILABLE, SANG_STATUS_RX_DATA_AVAILABLE, and SDLA_DECODE_SANG_STATUS.
| int sangoma_writemsg | ( | sng_fd_t | fd, |
| void * | hdrbuf, | ||
| int | hdrlen, | ||
| void * | databuf, | ||
| unsigned short | datalen, | ||
| int | flag | ||
| ) |
Write Data to device.
Device READ / WRITE Functions
| fd | device file descriptor |
| hdrbuf | pointer to header structure wp_api_hdr_t |
| hdrlen | size of wp_api_hdr_t |
| databuf | pointer to data buffer to be transmitted |
| datalen | length of data buffer |
| flag | currently not used, set to 0 |
In case of error return code, one must check the header operation_status variable to identify the reason of an error. Please refer to the error codes.
Definition at line 1913 of file libsangoma.c.
References wp_api_hdr::data_length, wan_iovec_list::iovec_list, wan_msghdr::msg_iov, wan_msghdr::msg_iovlen, wp_api_hdr::operation_status, SANG_STATUS_DEVICE_BUSY, SANG_STATUS_IO_ERROR, SANG_STATUS_SUCCESS, and SDLA_DECODE_SANG_STATUS.
Referenced by write_data().

| int sangoma_cmd_exec | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Execute Sangoma API Command.
Device API COMMAND Functions
Device API COMMAND Functions
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 2004 of file libsangoma.c.
References wanpipe_api_cmd::cmd, WANPIPE_IOCTL_API_CMD, and wanpipe_api::wp_cmd.
Referenced by sangoma_disable_bri_bchan_loopback(), sangoma_enable_bri_bchan_loopback(), sangoma_flush_bufs(), sangoma_flush_event_bufs(), sangoma_flush_rx_bufs(), sangoma_flush_stats(), sangoma_flush_tx_bufs(), sangoma_get_cpld_version(), sangoma_get_driver_version(), sangoma_get_fe_status(), sangoma_get_firmware_version(), sangoma_get_full_cfg(), sangoma_get_hw_coding(), sangoma_get_link_status(), sangoma_get_open_cnt(), sangoma_get_rx_queue_sz(), sangoma_get_stats(), sangoma_get_tx_queue_sz(), sangoma_open_api_span_chan(), sangoma_read_event(), sangoma_set_fe_status(), sangoma_set_rm_rx_gain(), sangoma_set_rm_rxflashtime(), sangoma_set_rm_tx_gain(), sangoma_set_rx_queue_sz(), sangoma_set_tx_queue_sz(), sangoma_ss7_force_rx(), sangoma_ss7_get_cfg_status(), sangoma_tdm_disable_dtmf_events(), sangoma_tdm_disable_fax_events(), sangoma_tdm_disable_hwec(), sangoma_tdm_disable_loop(), sangoma_tdm_disable_rbs_events(), sangoma_tdm_disable_ring_detect_events(), sangoma_tdm_disable_ring_events(), sangoma_tdm_disable_ring_trip_detect_events(), sangoma_tdm_disable_rm_dtmf_events(), sangoma_tdm_disable_rxhook_events(), sangoma_tdm_disable_tone_events(), sangoma_tdm_enable_dtmf_events(), sangoma_tdm_enable_fax_events(), sangoma_tdm_enable_hwec(), sangoma_tdm_enable_loop(), sangoma_tdm_enable_rbs_events(), sangoma_tdm_enable_ring_detect_events(), sangoma_tdm_enable_ring_events(), sangoma_tdm_enable_ring_trip_detect_events(), sangoma_tdm_enable_rm_dtmf_events(), sangoma_tdm_enable_rxhook_events(), sangoma_tdm_enable_tone_events(), sangoma_tdm_get_codec(), sangoma_tdm_get_fe_alarms(), sangoma_tdm_get_hw_dtmf(), sangoma_tdm_get_hw_ec(), sangoma_tdm_get_hw_fax(), sangoma_tdm_get_hwec_chan_status(), sangoma_tdm_get_hwec_persist_status(), sangoma_tdm_get_power_level(), sangoma_tdm_get_usr_mtu_mru(), sangoma_tdm_get_usr_period(), sangoma_tdm_read_rbs(), sangoma_tdm_set_buffer_multiplier(), sangoma_tdm_set_codec(), sangoma_tdm_set_power_level(), sangoma_tdm_set_usr_period(), sangoma_tdm_txsig_kewl(), sangoma_tdm_txsig_offhook(), sangoma_tdm_txsig_onhook(), sangoma_tdm_txsig_start(), and sangoma_tdm_write_rbs().
| int sangoma_get_full_cfg | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Read tdm api device configuration.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 2026 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::fe_alarms, wanpipe_api_cmd::hw_mtu_mru, wanpipe_api_cmd::hw_tdm_coding, wanpipe_api_cmd::idle_flag, wanpipe_api_cmd::power_level, wanpipe_api_cmd::rx_disable, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, wanpipe_api_cmd::stats, wanpipe_api_cmd::tdm_codec, wanpipe_api_cmd::tx_disable, wanpipe_api_cmd::usr_mtu_mru, wanpipe_api_cmd::usr_period, WP_API_CMD_GET_FULL_CFG, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device(), sangoma_fe_reg_read(), and sangoma_fe_reg_write().


| int sangoma_tdm_set_codec | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| int | codec | ||
| ) |
Set TDM Codec per chan.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| codec | codec to set (ulaw/alaw/slinear) |
Deprecated Function - Here for backward compatibility Only valid in CHAN Operation Mode
Definition at line 2082 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, wanpipe_api_cmd::tdm_codec, WP_API_CMD_SET_CODEC, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_tdm_get_codec | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Get Configured TDM Codec per chan.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Deprecated Function - Here for backward compatibility Only valid in CHAN Operation Mode
Definition at line 2103 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, wanpipe_api_cmd::tdm_codec, WP_API_CMD_GET_CODEC, and wanpipe_api::wp_cmd.

| int sangoma_tdm_set_usr_period | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| int | period | ||
| ) |
Set Tx/Rx Period in Milliseconds.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| period | value in miliseconds (1,2,5,10) |
Only valid in CHAN Operation Mode
Definition at line 2126 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, wanpipe_api_cmd::usr_period, WP_API_CMD_SET_USR_PERIOD, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_tdm_get_usr_period | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Get Tx/Rx Period in Milliseconds.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 2142 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, wanpipe_api_cmd::usr_period, WP_API_CMD_GET_USR_PERIOD, and wanpipe_api::wp_cmd.

| int sangoma_get_hw_coding | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Get HW Voice Coding (ulaw/alaw)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 2164 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::hw_tdm_coding, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_GET_HW_CODING, and wanpipe_api::wp_cmd.

| int sangoma_tdm_get_hw_dtmf | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Check if hwdtmf support is available.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
This function will check if hw supports HW DTMF.
Definition at line 2185 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::hw_dtmf, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_GET_HW_DTMF, and wanpipe_api::wp_cmd.

| int sangoma_tdm_get_hw_ec | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Check if hw echo cancelation support is available.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
This function will check if hw supports HW EC.
Definition at line 2205 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_GET_HW_EC, and wanpipe_api::wp_cmd.

| int sangoma_tdm_get_hwec_chan_status | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Check if hw echo cancelation is enabled on current timeslot.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
This function will check if hw echo cancelation is enable on current timeslot.
Definition at line 2228 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_GET_HW_EC_CHAN, and wanpipe_api::wp_cmd.

| int sangoma_tdm_get_hwec_persist_status | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Check if hwec persis mode is on: On persist mode hwec is always enabled.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
This function will check if hw persist mode is enabled.
Definition at line 2254 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_GET_HW_EC_PERSIST, and wanpipe_api::wp_cmd.

| int sangoma_tdm_get_usr_mtu_mru | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Get Tx/Rx MTU/MRU in bytes.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 2276 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, wanpipe_api_cmd::usr_mtu_mru, WP_API_CMD_GET_USR_MTU_MRU, and wanpipe_api::wp_cmd.

| int sangoma_tdm_set_power_level | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| int | power | ||
| ) |
Set Power Level - so only data matching the power level would be passed up.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| power | value of power |
Deprecated - not used/implemented
Definition at line 2298 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::power_level, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_SET_POWER_LEVEL, and wanpipe_api::wp_cmd.

| int sangoma_tdm_get_power_level | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Get Configured Power Level.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Deprecated - not used/implemented
Definition at line 2313 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::power_level, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_GET_POWER_LEVEL, and wanpipe_api::wp_cmd.

| int sangoma_flush_bufs | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Flush all (tx/rx/event) buffers from current channel.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 2329 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_FLUSH_BUFFERS, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_flush_rx_bufs | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Flush only rx buffers from current channel.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 2337 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_FLUSH_RX_BUFFERS, and wanpipe_api::wp_cmd.

| int sangoma_flush_tx_bufs | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Flush only tx buffers from current channel.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 2345 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_FLUSH_TX_BUFFERS, and wanpipe_api::wp_cmd.

| int sangoma_flush_event_bufs | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Flush only event buffers from current channel.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 2353 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_FLUSH_EVENT_BUFFERS, and wanpipe_api::wp_cmd.

| int sangoma_tdm_enable_rbs_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| int | poll_in_sec | ||
| ) |
Enable RBS Events on a device.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| poll_in_sec | driver poll period for rbs events |
Definition at line 2361 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::rbs_poll, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_ENABLE_RBS_EVENTS, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_tdm_disable_rbs_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Disable RBS Events for a device.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 2370 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_DISABLE_RBS_EVENTS, and wanpipe_api::wp_cmd.
Referenced by cleanup().


| int sangoma_tdm_write_rbs | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| int | channel, | ||
| unsigned char | rbs | ||
| ) |
Write RBS Bits on a device.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| channel | t1/e1 timeslot |
| rbs | rbs bits (ABCD) |
Definition at line 2378 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::rbs_tx_bits, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_WRITE_RBS_BITS, and wanpipe_api::wp_cmd.

| int sangoma_tdm_read_rbs | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| int | channel, | ||
| unsigned char * | rbs | ||
| ) |
Read RBS Bits on a device.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| channel | t1/e1 timeslot |
| rbs | pointer to rbs bits (ABCD) |
Definition at line 2387 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::rbs_rx_bits, wanpipe_api_cmd::rbs_tx_bits, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_READ_RBS_BITS, and wanpipe_api::wp_cmd.

| int sangoma_tdm_set_buffer_multiplier | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| unsigned int | multiplier | ||
| ) |
Set voice tx/rx buffer multiplier.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| multiplier | buffer multiplier value 0-disable or 1 to TDMAPI_MAX_BUFFER_MULTIPLIER |
Definition at line 2406 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_BUFFER_MULTIPLIER, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_read_event | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Read API Events.
Device EVENT Function
| fd | device file descriptor |
| tdm_api | tdm api command structure |
The TDM API structure will be populated with a TDM API or WAN Event. This function usually used after wait() function indicated that event has occured.
Definition at line 2426 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_DTMF, WP_API_EVENT_RBS, wanpipe_api::wp_callback, and wanpipe_api::wp_cmd.
Referenced by handle_tdm_event().


| sangoma_status_t sangoma_logger_read_event | ( | sng_fd_t | fd, |
| wp_logger_cmd_t * | logger_cmd | ||
| ) |
Read Wanpipe Logger Events.
| fd | device file descriptor |
| logger_cmd | Logger API command structure |
The Logger API structure will be populated with a Logger Event. This function usually used after wait() function indicated that an event has occured.
Definition at line 2556 of file libsangoma.c.
| sangoma_status_t sangoma_logger_flush_buffers | ( | sng_fd_t | fd, |
| wp_logger_cmd_t * | logger_cmd | ||
| ) |
Flush Wanpipe Logger internal buffers.
| fd | device file descriptor |
| logger_cmd | Logger API command structure |
Definition at line 2562 of file libsangoma.c.
| sangoma_status_t sangoma_logger_get_statistics | ( | sng_fd_t | fd, |
| wp_logger_cmd_t * | logger_cmd | ||
| ) |
Get Wanpipe Logger statistics.
| fd | device file descriptor |
| logger_cmd | Logger API command structure |
Definition at line 2568 of file libsangoma.c.
| sangoma_status_t sangoma_logger_reset_statistics | ( | sng_fd_t | fd, |
| wp_logger_cmd_t * | logger_cmd | ||
| ) |
Reset Wanpipe Logger statistics.
| fd | device file descriptor |
| logger_cmd | Logger API command structure |
Definition at line 2574 of file libsangoma.c.
| sangoma_status_t sangoma_logger_get_open_handle_counter | ( | sng_fd_t | fd, |
| wp_logger_cmd_t * | logger_cmd | ||
| ) |
Get Counter of open Handles/File Descriptors of Wanpipe Logger.
| fd | device file descriptor |
| logger_cmd | Logger API command structure |
Definition at line 2580 of file libsangoma.c.
| sangoma_status_t sangoma_logger_get_logger_level | ( | sng_fd_t | fd, |
| wp_logger_cmd_t * | logger_cmd | ||
| ) |
Get current level (types of events) of Wanpipe Logger.
| fd | device file descriptor |
| logger_cmd | Logger API command structure |
Definition at line 2586 of file libsangoma.c.
| sangoma_status_t sangoma_logger_set_logger_level | ( | sng_fd_t | fd, |
| wp_logger_cmd_t * | logger_cmd | ||
| ) |
Set current level (types of events) of Wanpipe Logger.
| fd | device file descriptor |
| logger_cmd | Logger API command structure |
Definition at line 2592 of file libsangoma.c.
| int sangoma_tdm_enable_fax_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Enable FAX Detection on Octasic chip (if hw supports it)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on cards that have HWEC
Definition at line 2601 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, WP_API_EVENT_FAX_DETECT, and wanpipe_api::wp_cmd.

| int sangoma_tdm_disable_fax_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Disable FAX Detection on Octasic chip (if hw supports it)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on cards that have HWEC
Definition at line 2611 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_DISABLE, WP_API_EVENT_FAX_DETECT, and wanpipe_api::wp_cmd.

| int sangoma_tdm_get_hw_fax | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Get HW FAX Detection State (Enable or Disabled) on Octasic chip (if hw supports it)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on cards that have HWEC
Definition at line 2621 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_GET_HW_FAX_DETECT, and wanpipe_api::wp_cmd.

| int sangoma_tdm_enable_dtmf_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Enable DTMF Detection on Octasic chip (if hw supports it)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on cards that have HWEC
Definition at line 2636 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_DTMF, WP_API_EVENT_ENABLE, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_tdm_disable_dtmf_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Disable DTMF Detection on Octasic chip (if hw supports it)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on cards that have HWEC
Definition at line 2646 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_DISABLE, WP_API_EVENT_DTMF, and wanpipe_api::wp_cmd.
Referenced by cleanup().


| int sangoma_tdm_enable_rm_dtmf_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Enable DTMF Detection on Analog/Remora SLIC Chip.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2656 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_tdm_disable_rm_dtmf_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Disable DTMF Detection on Analog/Remora SLIC Chip.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2666 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_DISABLE, and wanpipe_api::wp_cmd.
Referenced by cleanup().


| int sangoma_tdm_enable_rxhook_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Enable RX HOOK Events (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2676 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_tdm_disable_rxhook_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Disable RX HOOK Events (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2686 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_DISABLE, and wanpipe_api::wp_cmd.
Referenced by cleanup().


| int sangoma_tdm_enable_ring_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Enable RING Events (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2696 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, and wanpipe_api::wp_cmd.

| int sangoma_tdm_disable_ring_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Disable RING Events (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2706 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_DISABLE, and wanpipe_api::wp_cmd.

| int sangoma_tdm_enable_ring_detect_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Enable RING DETECT Events (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2716 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, and wanpipe_api::wp_cmd.

| int sangoma_tdm_disable_ring_detect_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Disable RING DETECT Events (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2726 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_DISABLE, and wanpipe_api::wp_cmd.

| int sangoma_tdm_enable_ring_trip_detect_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Enable RING TRIP Events (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2736 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, and wanpipe_api::wp_cmd.

| int sangoma_tdm_disable_ring_trip_detect_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Disable RING TRIP Events (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2746 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_DISABLE, and wanpipe_api::wp_cmd.

| int sangoma_tdm_txsig_kewl | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Tranmsmit TX SIG KEWL START (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2756 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, and wanpipe_api::wp_cmd.

| int sangoma_tdm_txsig_start | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Tranmsmit TX SIG START (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2766 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, and wanpipe_api::wp_cmd.

| int sangoma_tdm_txsig_onhook | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Tranmsmit TX SIG ON HOOK (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2776 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, and wanpipe_api::wp_cmd.

| int sangoma_tdm_txsig_offhook | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Tranmsmit TX SIG OFF HOOK (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2786 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, and wanpipe_api::wp_cmd.

| int sangoma_tdm_enable_tone_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| uint16_t | tone_id | ||
| ) |
Transmit a TONE on this device (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| tone_id | tone type to transmit |
Supported only on Analog Cards
Definition at line 2796 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, and wanpipe_api::wp_cmd.

| int sangoma_tdm_disable_tone_events | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Enable TONE Events (Analog Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on Analog Cards
Definition at line 2807 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_DISABLE, and wanpipe_api::wp_cmd.

| int sangoma_tdm_enable_hwec | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Enable HWEC on this channel.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on cards that have HWEC
Definition at line 2819 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, and wanpipe_api::wp_cmd.

| int sangoma_tdm_disable_hwec | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Disable HWEC on this channel.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Supported only on cards that have HWEC
Definition at line 2827 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, and wanpipe_api::wp_cmd.

| int _LIBSNG_CALL sangoma_tdm_get_fe_alarms | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| unsigned int * | alarms | ||
| ) |
Get Front End Alarms (T1/E1 Only)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| alarms | bit map status of T1/E1 alarms |
Supported only on T1/E1 Cards
Definition at line 2841 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::fe_alarms, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, and wanpipe_api::wp_cmd.

| int sangoma_get_fe_status | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| unsigned char * | current_status | ||
| ) |
Get Device Link Status (Connected/Disconnected)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| current_status | pointer where result will be filled: 0=Link UP 1=Link Down |
Deprecated - replaced by sangoma_tdm_get_link_status function
Definition at line 2860 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::fe_status, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, and wanpipe_api::wp_cmd.

| int sangoma_get_link_status | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| unsigned char * | current_status | ||
| ) |
Get Device Link Status (Connected/Disconnected)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| current_status | pointer where result will be filled: 0=Link UP 1=Link Down |
Definition at line 2876 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::fe_status, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, and wanpipe_api::wp_cmd.

| int sangoma_set_fe_status | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| unsigned char | new_status | ||
| ) |
Set Device Link Status (Connected/Disconnected)
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| new_status | new status 0=Link UP 1=Link Down |
Definition at line 2890 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::fe_status, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, and wanpipe_api::wp_cmd.

| int _LIBSNG_CALL sangoma_disable_bri_bchan_loopback | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| int | channel | ||
| ) |
Disable BRI Bchannel loopback - used when debugging bri device.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| channel | bri bchannel 1 or 2 |
Definition at line 2900 of file libsangoma.c.
References wp_api_event::channel, wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_DISABLE, and wanpipe_api::wp_cmd.

| int _LIBSNG_CALL sangoma_enable_bri_bchan_loopback | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| int | channel | ||
| ) |
Enable BRI Bchannel loopback - used when debugging bri device.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| channel | bri bchannel 1 or 2 |
Definition at line 2911 of file libsangoma.c.
References wp_api_event::channel, wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, and wanpipe_api::wp_cmd.

| int sangoma_get_tx_queue_sz | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Get Tx Queue Size for this channel.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 2922 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, wanpipe_api_cmd::tx_queue_sz, WP_API_CMD_GET_TX_Q_SIZE, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_set_tx_queue_sz | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| int | size | ||
| ) |
Get Tx Queue Size for this channel.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| size | tx queue size (minimum value of 1) |
Definition at line 2939 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, wanpipe_api_cmd::tx_queue_sz, WP_API_CMD_SET_TX_Q_SIZE, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_get_rx_queue_sz | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Get Rx Queue Size for this channel.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 2951 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::rx_queue_sz, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_GET_RX_Q_SIZE, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_set_rx_queue_sz | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| int | size | ||
| ) |
Get Tx Queue Size for this channel.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| size | rx queue size (minimum value of 1) |
Definition at line 2969 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::rx_queue_sz, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_SET_RX_Q_SIZE, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_get_driver_version | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| wan_driver_version_t * | drv_ver | ||
| ) |
Get Device Driver Version Number.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| drv_ver | driver version structure that will contain the driver version |
Definition at line 2982 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_DRIVER_VERSION, and wanpipe_api::wp_cmd.

| int sangoma_get_firmware_version | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| unsigned char * | ver | ||
| ) |
Get Hardware/Firmware Version.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| ver | hardware/firmware version number |
Definition at line 3004 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_FIRMWARE_VERSION, and wanpipe_api::wp_cmd.

| int sangoma_get_cpld_version | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| unsigned char * | ver | ||
| ) |
Get AFT CPLD Version.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| ver | AFT CPLD version number |
Definition at line 3024 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_CPLD_VERSION, and wanpipe_api::wp_cmd.

| int _LIBSNG_CALL sangoma_get_aft_customer_id | ( | sng_fd_t | fd, |
| unsigned char * | out_customer_id | ||
| ) |
Get Customer-specific ID from AFT hardware, the default value is 0xFF, any change requires special arrangement with Sangoma Technologies.
| fd | device file descriptor |
| out_customer_id | AFT Customer ID |
Definition at line 3044 of file libsangoma.c.
References SANG_STATUS_IO_ERROR, SANG_STATUS_UNSUPPORTED_FUNCTION, sangoma_mgmt_cmd(), and WANPIPEMON_AFT_CUSTOMER_ID.

| int _LIBSNG_CALL sangoma_port_led_ctrl | ( | sng_fd_t | fd, |
| unsigned char | led_state | ||
| ) |
Control the LED ligths of the TDM port. On (led set based on link status) Off (turn off all led). Used to visually identify a phisical port from software.
| fd | device file descriptor |
| led_state | 0=off 1=on |
Definition at line 3068 of file libsangoma.c.
References SANG_STATUS_IO_ERROR, SANG_STATUS_UNSUPPORTED_FUNCTION, sangoma_mgmt_cmd(), and WANPIPEMON_LED_CTRL.

| int sangoma_fe_reg_write | ( | sng_fd_t | fd, |
| uint32_t | offset, | ||
| uint8_t | data | ||
| ) |
Write to a front end register.
| fd | device file descriptor |
| offset | offset of front end register |
| data | value to write |
Definition at line 3092 of file libsangoma.c.
References wanpipe_api_cmd::chan, SANG_STATUS_IO_ERROR, SANG_STATUS_UNSUPPORTED_FUNCTION, sangoma_get_full_cfg(), sangoma_mgmt_cmd(), and wanpipe_api::wp_cmd.

| int sangoma_fe_reg_read | ( | sng_fd_t | fd, |
| uint32_t | offset, | ||
| uint8_t * | data | ||
| ) |
Read front end register.
| fd | device file descriptor |
| offset | offset of front end register |
| data | value of the read register |
Definition at line 3134 of file libsangoma.c.
References wanpipe_api_cmd::chan, SANG_STATUS_IO_ERROR, SANG_STATUS_UNSUPPORTED_FUNCTION, sangoma_get_full_cfg(), sangoma_mgmt_cmd(), and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_get_stats | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| wanpipe_chan_stats_t * | stats | ||
| ) |
Get Device Statistics. Statistics will be available in tdm_api->wp_cmd.stats structure.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| stats | stats structure will be filled with device stats. (Optional, can be left NULL) |
Definition at line 3281 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, wanpipe_api_cmd::stats, WP_API_CMD_GET_STATS, and wanpipe_api::wp_cmd.

| int _LIBSNG_CALL sangoma_flush_stats | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Flush/Reset device statistics.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 3299 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_RESET_STATS, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


| int sangoma_set_rm_rxflashtime | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| int | rxflashtime | ||
| ) |
Set rxflashtime for FXS module Wink-Flash Event.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| rxflashtime | time value |
Definition at line 3307 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::rxflashtime, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_SET_RM_RXFLASHTIME, and wanpipe_api::wp_cmd.

| int sangoma_set_rm_tx_gain | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| int | value | ||
| ) |
set tx gain for FXO/FXS module
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| value | txgain (FXO - txgain value ranges from -150 to 120 , FXS - txgain value 35,-35) |
Definition at line 3317 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, WP_API_EVENT_SET_RM_TX_GAIN, and wanpipe_api::wp_cmd.

| int sangoma_set_rm_rx_gain | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| int | value | ||
| ) |
set rx gain for FXO/FXS module
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| value | rxgain (FXO - rxgain value ranges from -150 to 120 , FXS -rxgain value 35,-35) |
Definition at line 3328 of file libsangoma.c.
References wanpipe_api_cmd::cmd, wanpipe_api_cmd::event, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_EVENT_ENABLE, WP_API_EVENT_SET_RM_RX_GAIN, and wanpipe_api::wp_cmd.

| int sangoma_tdm_enable_loop | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Enable channel loop: All rx data will be transmitted back out.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 3367 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_ENABLE_LOOP, and wanpipe_api::wp_cmd.

| int sangoma_tdm_disable_loop | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Disable channel loop.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 3378 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_DISABLE_LOOP, and wanpipe_api::wp_cmd.

| int _LIBSNG_CALL sangoma_ss7_force_rx | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api | ||
| ) |
Force the firmware to pass up a repeating frame.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
Definition at line 3400 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_SS7_FORCE_RX, and wanpipe_api::wp_cmd.

| int _LIBSNG_CALL sangoma_ss7_get_cfg_status | ( | sng_fd_t | fd, |
| wanpipe_api_t * | tdm_api, | ||
| wan_api_ss7_cfg_status_t * | ss7_cfg_status | ||
| ) |
Get current ss7 hw configuration.
| fd | device file descriptor |
| tdm_api | tdm api command structure |
| ss7_cfg_status | ss7 configuration status structure |
Definition at line 3410 of file libsangoma.c.
References wanpipe_api_cmd::cmd, sangoma_cmd_exec(), SANGOMA_INIT_TDM_API_CMD_RESULT, WP_API_CMD_SS7_GET_CFG_STATUS, and wanpipe_api::wp_cmd.
Referenced by open_sangoma_device().


1.8.5