mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
freetdm: Added new OOB event FTDM_OOB_POLARITY_REVERSE
Added new channel command FTDM_COMMAND_SET_POLARITY ftmod_wanpipe - Added support to enqueue polarity events on FXO lines ftmod_wanpipe - Added support to set polarity on FXS lines ftmod_analog - Added support to answer and hangup FXO lines on polarity reverse ftmod_analog - Added support to reverse polarity in the FXS line on answer and hangup mod_freetdm - Added parameters answer-on-polarity, hangup-on-polarity and polarity-delay to enable those analog features
This commit is contained in:
@@ -557,8 +557,14 @@ typedef enum {
|
||||
FTDM_COMMAND_COUNT,
|
||||
FTDM_COMMAND_SET_RX_QUEUE_SIZE,
|
||||
FTDM_COMMAND_SET_TX_QUEUE_SIZE,
|
||||
FTDM_COMMAND_SET_POLARITY,
|
||||
} ftdm_command_t;
|
||||
|
||||
typedef enum {
|
||||
FTDM_POLARITY_FORWARD = 0,
|
||||
FTDM_POLARITY_REVERSE = 1
|
||||
} ftdm_polarity_t;
|
||||
|
||||
/*! \brief Custom memory handler hooks. Not recommended to use unless you need memory allocation customizations */
|
||||
typedef void *(*ftdm_malloc_func_t)(void *pool, ftdm_size_t len);
|
||||
typedef void *(*ftdm_calloc_func_t)(void *pool, ftdm_size_t elements, ftdm_size_t len);
|
||||
|
@@ -143,7 +143,9 @@ extern "C" {
|
||||
\return true value if the object has the flags defined
|
||||
*/
|
||||
#define ftdm_test_flag(obj, flag) ((obj)->flags & flag)
|
||||
/*!< Physical (IO) module specific flags */
|
||||
#define ftdm_test_pflag(obj, flag) ((obj)->pflags & flag)
|
||||
/*!< signaling module specific flags */
|
||||
#define ftdm_test_sflag(obj, flag) ((obj)->sflags & flag)
|
||||
|
||||
#define ftdm_set_alarm_flag(obj, flag) (obj)->alarm_flags |= (flag)
|
||||
@@ -456,6 +458,7 @@ struct ftdm_channel {
|
||||
ftdm_fsk_data_state_t fsk;
|
||||
uint8_t fsk_buf[80];
|
||||
uint32_t ring_count;
|
||||
ftdm_polarity_t polarity;
|
||||
/* Private I/O data. Do not touch unless you are an I/O module */
|
||||
void *io_data;
|
||||
/* Private signaling data. Do not touch unless you are a signaling module */
|
||||
|
@@ -123,6 +123,7 @@ typedef enum {
|
||||
FTDM_STR2ENUM_P(ftdm_str2ftdm_analog_start_type, ftdm_analog_start_type2str, ftdm_analog_start_type_t)
|
||||
|
||||
typedef enum {
|
||||
FTDM_OOB_NOOP,
|
||||
FTDM_OOB_ONHOOK,
|
||||
FTDM_OOB_OFFHOOK,
|
||||
FTDM_OOB_WINK,
|
||||
@@ -131,11 +132,11 @@ typedef enum {
|
||||
FTDM_OOB_RING_STOP,
|
||||
FTDM_OOB_ALARM_TRAP,
|
||||
FTDM_OOB_ALARM_CLEAR,
|
||||
FTDM_OOB_NOOP,
|
||||
FTDM_OOB_CAS_BITS_CHANGE,
|
||||
FTDM_OOB_POLARITY_REVERSE,
|
||||
FTDM_OOB_INVALID
|
||||
} ftdm_oob_event_t;
|
||||
#define OOB_STRINGS "ONHOOK", "OFFHOOK", "WINK", "FLASH", "RING_START", "RING_STOP", "ALARM_TRAP", "ALARM_CLEAR", "NOOP", "CAS_BITS_CHANGE", "INVALID"
|
||||
#define OOB_STRINGS "NOOP", "ONHOOK", "OFFHOOK", "WINK", "FLASH", "RING_START", "RING_STOP", "ALARM_TRAP", "ALARM_CLEAR", "CAS_BITS_CHANGE", "POLARITY_REVERSE", "INVALID"
|
||||
FTDM_STR2ENUM_P(ftdm_str2ftdm_oob_event, ftdm_oob_event2str, ftdm_oob_event_t)
|
||||
|
||||
/*! \brief Event types */
|
||||
|
Reference in New Issue
Block a user