Data Structures | |
struct | ftdm_queue_handler |
struct | ftdm_sms_data_t |
struct | ftdm_caller_data |
Caller information. More... | |
struct | ftdm_span_hunt_t |
Structure used for FTDM_HUNT_SPAN mode. More... | |
struct | ftdm_group_hunt_t |
Structure used for FTDM_HUNT_GROUP mode. More... | |
struct | ftdm_chan_hunt_t |
Structure used for FTDM_HUNT_CHAN mode. More... | |
struct | ftdm_hunting_scheme_t |
Channel Hunting provided to ftdm_call_place(). More... | |
struct | ftdm_event_collected_t |
struct | ftdm_event_transfer_completed_t |
struct | ftdm_raw_data_t |
struct | ftdm_sigmsg |
Generic signaling message received from the stack. More... | |
struct | ftdm_usrmsg |
Generic user message sent to the stack. More... | |
struct | ftdm_conf_parameter |
Signaling configuration parameter for the stacks (variable=value pair). More... | |
struct | ftdm_memory_handler |
struct | ftdm_io_interface |
FreeTDM I/O layer function prototype wrapper macros You don't need these unless your implementing an I/O interface module (most users don't). More... | |
struct | ftdm_channel_iostats_t |
IO statistics. More... | |
Defines | |
#define | RECONFIG_DBG 1 |
#define | FTDM_MAX_CHANNELS_PHYSICAL_SPAN 32 |
Max number of channels per physical span. | |
#define | FTDM_MAX_PHYSICAL_SPANS_PER_LOGICAL_SPAN 128 |
Max number of physical spans per logical span. | |
#define | FTDM_MAX_CHANNELS_SPAN FTDM_MAX_CHANNELS_PHYSICAL_SPAN * FTDM_MAX_PHYSICAL_SPANS_PER_LOGICAL_SPAN |
Max number of channels a logical span can contain. | |
#define | FTDM_MAX_SPANS_INTERFACE 128 |
Max number of logical spans. | |
#define | FTDM_MAX_CHANNELS_GROUP 2048 |
Max number of channels per hunting group. | |
#define | FTDM_MAX_GROUPS_INTERFACE FTDM_MAX_SPANS_INTERFACE |
Max number of groups. | |
#define | FTDM_MAX_SIG_PARAMETERS 30 |
Max number of key=value pairs to be sent as signaling stack parameters. | |
#define | FTDM_INVALID_INT_PARM 0xFF |
#define | FTDM_MAX_NAME_STR_SZ 80 |
Thread/Mutex OS abstraction API. | |
#define | FTDM_MAX_NUMBER_STR_SZ 20 |
Limit to channel number strings. | |
#define | CHAN_TYPE_STRINGS "B", "DQ921", "DQ931", "FXS", "FXO", "EM", "CAS", "INVALID" |
#define | FTDM_IS_VOICE_CHANNEL(fchan) ((fchan)->type != FTDM_CHAN_TYPE_DQ921 && (fchan)->type != FTDM_CHAN_TYPE_DQ931) |
#define | FTDM_IS_DCHAN(fchan) ((fchan)->type == FTDM_CHAN_TYPE_DQ921 || (fchan)->type == FTDM_CHAN_TYPE_DQ931) |
#define | FTDM_IS_DIGITAL_CHANNEL(fchan) |
#define | TON_STRINGS "unknown", "international", "national", "network-specific", "subscriber-number", "abbreviated-number", "reserved", "invalid" |
#define | NPI_STRINGS "unknown", "ISDN", "data", "telex", "national", "private", "reserved", "invalid" |
#define | PRESENTATION_STRINGS "presentation-allowed", "presentation-restricted", "number-not-available", "reserved", "Invalid" |
#define | SCREENING_STRINGS "user-provided-not-screened", "user-provided-verified-and-passed", "user-provided-verified-and-failed", "network-provided", "invalid" |
#define | BEARER_CAP_STRINGS "speech", "unrestricted-digital-information", "restricted-digital-information", "3.1-Khz-audio", "7-Khz-audio", "15-Khz-audio", "video", "invalid" |
#define | USER_LAYER1_PROT_STRINGS "V.110", "ulaw", "alaw", "Invalid" |
#define | CALLING_PARTY_CATEGORY_STRINGS "unknown", "operator", "operator-french", "operator-english", "operator-german", "operator-russian", "operator-spanish", "ordinary", "priority", "data-call", "test-call", "payphone", "china", "invalid" |
#define | TRANSFER_RESPONSE_STRINGS "transfer-ok", "cp-drop-off", "limits-exceeded", "invalid-num", "invalid-command", "timeout", "invalid" |
#define | FTDM_DIGITS_LIMIT 25 |
#define | FTDM_SILENCE_VALUE(fchan) (fchan)->native_codec == FTDM_CODEC_ULAW ? 255 : (fchan)->native_codec == FTDM_CODEC_ALAW ? 0xD5 : 0x00 |
#define | SIGNAL_STRINGS |
#define | TRUNK_STRINGS "E1", "T1", "J1", "BRI", "BRI_PTMP", "FXO", "FXS", "EM", "GSM", "NONE" |
#define | SIGSTATUS_STRINGS "DOWN", "SUSPENDED", "UP", "INVALID" |
#define | TRACE_DIR_STRINGS "INCOMING", "OUTGOING", "INVALID" |
#define | TRACE_TYPE_STRINGS "Q931", "Q921", "INVALID" |
#define | INDICATION_STRINGS "NONE", "RINGING", "PROCEED", "PROGRESS", "PROGRESS_MEDIA", "BUSY", "ANSWER", "FACILITY", "TRANSFER", "RAW", "INVALID" |
#define | FIO_CHANNEL_REQUEST_ARGS (ftdm_span_t *span, uint32_t chan_id, ftdm_direction_t direction, ftdm_caller_data_t *caller_data, ftdm_channel_t **ftdmchan) |
FreeTDM I/O layer interface argument macros You don't need these unless your implementing an I/O interface module (most users don't). | |
#define | FIO_CHANNEL_OUTGOING_CALL_ARGS (ftdm_channel_t *ftdmchan) |
#define | FIO_CHANNEL_INDICATE_ARGS (ftdm_channel_t *ftdmchan, ftdm_channel_indication_t indication) |
#define | FIO_CHANNEL_SET_SIG_STATUS_ARGS (ftdm_channel_t *ftdmchan, ftdm_signaling_status_t status) |
#define | FIO_CHANNEL_GET_SIG_STATUS_ARGS (ftdm_channel_t *ftdmchan, ftdm_signaling_status_t *status) |
#define | FIO_SPAN_SET_SIG_STATUS_ARGS (ftdm_span_t *span, ftdm_signaling_status_t status) |
#define | FIO_SPAN_GET_SIG_STATUS_ARGS (ftdm_span_t *span, ftdm_signaling_status_t *status) |
#define | FIO_SPAN_POLL_EVENT_ARGS (ftdm_span_t *span, uint32_t ms, short *poll_events) |
#define | FIO_SPAN_NEXT_EVENT_ARGS (ftdm_span_t *span, ftdm_event_t **event) |
#define | FIO_CHANNEL_NEXT_EVENT_ARGS (ftdm_channel_t *ftdmchan, ftdm_event_t **event) |
#define | FIO_SIGNAL_CB_ARGS (ftdm_sigmsg_t *sigmsg) |
#define | FIO_EVENT_CB_ARGS (ftdm_channel_t *ftdmchan, ftdm_event_t *event) |
#define | FIO_CONFIGURE_SPAN_ARGS (ftdm_span_t *span, const char *str, ftdm_chan_type_t type, char *name, char *number) |
#define | FIO_CONFIGURE_ARGS (const char *category, const char *var, const char *val, int lineno) |
#define | FIO_OPEN_ARGS (ftdm_channel_t *ftdmchan) |
#define | FIO_CLOSE_ARGS (ftdm_channel_t *ftdmchan) |
#define | FIO_CHANNEL_DESTROY_ARGS (ftdm_channel_t *ftdmchan) |
#define | FIO_SPAN_DESTROY_ARGS (ftdm_span_t *span) |
#define | FIO_COMMAND_ARGS (ftdm_channel_t *ftdmchan, ftdm_command_t command, void *obj) |
#define | FIO_WAIT_ARGS (ftdm_channel_t *ftdmchan, ftdm_wait_flag_t *flags, int32_t to) |
#define | FIO_GET_ALARMS_ARGS (ftdm_channel_t *ftdmchan) |
#define | FIO_READ_ARGS (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen) |
#define | FIO_WRITE_ARGS (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen) |
#define | FIO_IO_LOAD_ARGS (ftdm_io_interface_t **fio) |
#define | FIO_IO_UNLOAD_ARGS (void) |
#define | FIO_SIG_LOAD_ARGS (void) |
#define | FIO_SIG_CONFIGURE_ARGS (ftdm_span_t *span, fio_signal_cb_t sig_cb, va_list ap) |
#define | FIO_CONFIGURE_SPAN_SIGNALING_ARGS (ftdm_span_t *span, fio_signal_cb_t sig_cb, ftdm_conf_parameter_t *ftdm_parameters) |
#define | FIO_SIG_UNLOAD_ARGS (void) |
#define | FIO_API_ARGS (ftdm_stream_handle_t *stream, const char *data) |
#define | FIO_CHANNEL_REQUEST_FUNCTION(name) ftdm_status_t name FIO_CHANNEL_REQUEST_ARGS |
FreeTDM I/O layer interface function prototype wrapper macros You don't need these unless your implementing an I/O interface module (most users don't). | |
#define | FIO_CHANNEL_OUTGOING_CALL_FUNCTION(name) ftdm_status_t name FIO_CHANNEL_OUTGOING_CALL_ARGS |
#define | FIO_CHANNEL_INDICATE_FUNCTION(name) ftdm_status_t name FIO_CHANNEL_INDICATE_ARGS |
#define | FIO_CHANNEL_SET_SIG_STATUS_FUNCTION(name) ftdm_status_t name FIO_CHANNEL_SET_SIG_STATUS_ARGS |
#define | FIO_CHANNEL_GET_SIG_STATUS_FUNCTION(name) ftdm_status_t name FIO_CHANNEL_GET_SIG_STATUS_ARGS |
#define | FIO_SPAN_SET_SIG_STATUS_FUNCTION(name) ftdm_status_t name FIO_SPAN_SET_SIG_STATUS_ARGS |
#define | FIO_SPAN_GET_SIG_STATUS_FUNCTION(name) ftdm_status_t name FIO_SPAN_GET_SIG_STATUS_ARGS |
#define | FIO_SPAN_POLL_EVENT_FUNCTION(name) ftdm_status_t name FIO_SPAN_POLL_EVENT_ARGS |
#define | FIO_SPAN_NEXT_EVENT_FUNCTION(name) ftdm_status_t name FIO_SPAN_NEXT_EVENT_ARGS |
#define | FIO_CHANNEL_NEXT_EVENT_FUNCTION(name) ftdm_status_t name FIO_CHANNEL_NEXT_EVENT_ARGS |
#define | FIO_SIGNAL_CB_FUNCTION(name) ftdm_status_t name FIO_SIGNAL_CB_ARGS |
#define | FIO_EVENT_CB_FUNCTION(name) ftdm_status_t name FIO_EVENT_CB_ARGS |
#define | FIO_CONFIGURE_SPAN_FUNCTION(name) ftdm_status_t name FIO_CONFIGURE_SPAN_ARGS |
#define | FIO_CONFIGURE_FUNCTION(name) ftdm_status_t name FIO_CONFIGURE_ARGS |
#define | FIO_OPEN_FUNCTION(name) ftdm_status_t name FIO_OPEN_ARGS |
#define | FIO_CLOSE_FUNCTION(name) ftdm_status_t name FIO_CLOSE_ARGS |
#define | FIO_CHANNEL_DESTROY_FUNCTION(name) ftdm_status_t name FIO_CHANNEL_DESTROY_ARGS |
#define | FIO_SPAN_DESTROY_FUNCTION(name) ftdm_status_t name FIO_SPAN_DESTROY_ARGS |
#define | FIO_GET_ALARMS_FUNCTION(name) ftdm_status_t name FIO_GET_ALARMS_ARGS |
#define | FIO_COMMAND_FUNCTION(name) ftdm_status_t name FIO_COMMAND_ARGS |
#define | FIO_WAIT_FUNCTION(name) ftdm_status_t name FIO_WAIT_ARGS |
#define | FIO_READ_FUNCTION(name) ftdm_status_t name FIO_READ_ARGS |
#define | FIO_WRITE_FUNCTION(name) ftdm_status_t name FIO_WRITE_ARGS |
#define | FIO_IO_LOAD_FUNCTION(name) ftdm_status_t name FIO_IO_LOAD_ARGS |
#define | FIO_SIG_LOAD_FUNCTION(name) ftdm_status_t name FIO_SIG_LOAD_ARGS |
#define | FIO_SIG_CONFIGURE_FUNCTION(name) ftdm_status_t name FIO_SIG_CONFIGURE_ARGS |
#define | FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(name) ftdm_status_t name FIO_CONFIGURE_SPAN_SIGNALING_ARGS |
#define | FIO_IO_UNLOAD_FUNCTION(name) ftdm_status_t name FIO_IO_UNLOAD_ARGS |
#define | FIO_SIG_UNLOAD_FUNCTION(name) ftdm_status_t name FIO_SIG_UNLOAD_ARGS |
#define | FIO_API_FUNCTION(name) ftdm_status_t name FIO_API_ARGS |
#define | ftdm_channel_call_answer(ftdmchan) _ftdm_channel_call_answer(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL) |
Answer call. This can also be accomplished by ftdm_channel_call_indicate with FTDM_CHANNEL_INDICATE_ANSWER, in both cases you will get a FTDM_SIGEVENT_INDICATION_COMPLETED when the indication is sent (or an error occurs). Just as with ftdm_channel_call_indicate you won't receive FTDM_SIGEVENT_INDICATION_COMPLETED when this function returns anything else than FTDM_SUCCESS. | |
#define | ftdm_channel_call_answer_ex(ftdmchan, usrmsg) _ftdm_channel_call_answer(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg)) |
#define | ftdm_channel_call_place(ftdmchan) _ftdm_channel_call_place(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL) |
Place an outgoing call in the given channel. | |
#define | ftdm_channel_call_place_ex(ftdmchan, usrmsg) _ftdm_channel_call_place_ex(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg)) |
#define | ftdm_call_place(callerdata, hunting) _ftdm_call_place(__FILE__, __FUNCTION__, __LINE__, (callerdata), (hunting), NULL) |
Place an outgoing call with the given caller data in a channel according to the hunting scheme provided. | |
#define | ftdm_call_place_ex(callerdata, hunting, usrmsg) _ftdm_call_place(__FILE__, __FUNCTION__, __LINE__, (callerdata), (hunting), (usrmsg)) |
#define | ftdm_channel_call_indicate(ftdmchan, indication) _ftdm_channel_call_indicate(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (indication), NULL) |
Indicate a new condition in an incoming call. | |
#define | ftdm_channel_call_indicate_ex(ftdmchan, indication, usrmsg) _ftdm_channel_call_indicate(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (indication), (usrmsg)) |
#define | ftdm_channel_call_hangup(ftdmchan) _ftdm_channel_call_hangup(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL) |
Hangup the call without cause. | |
#define | ftdm_channel_call_hangup_ex(ftdmchan, usrmsg) _ftdm_channel_call_hangup(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg)) |
#define | ftdm_channel_call_hangup_with_cause(ftdmchan, cause) _ftdm_channel_call_hangup_with_cause(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (cause), NULL) |
Hangup the call with cause. | |
#define | ftdm_channel_call_hangup_with_cause_ex(ftdmchan, cause, usrmsg) _ftdm_channel_call_hangup_with_cause(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (cause), (usrmsg)) |
#define | ftdm_channel_call_transfer(ftdmchan, arg) _ftdm_channel_call_transfer(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (arg), NULL) |
Transfer call. This can also be accomplished by ftdm_channel_call_indicate with FTDM_CHANNEL_INDICATE_TRANSFER, in both cases you will get a FTDM_SIGEVENT_INDICATION_COMPLETED when the indication is sent (or an error occurs). Just as with ftdm_channel_call_indicate you won't receive FTDM_SIGEVENT_INDICATION_COMPLETED when this function returns anything else than FTDM_SUCCESS. | |
#define | ftdm_channel_call_transfer_ex(ftdmchan, arg, usrmsg) _ftdm_channel_call_transfer(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (arg), (usrmsg)) |
#define | ftdm_channel_reset(ftdmchan) _ftdm_channel_reset(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL) |
Reset the channel. | |
#define | ftdm_channel_reset_ex(ftdmchan, usrmsg) _ftdm_channel_reset(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), usrmsg) |
#define | ftdm_channel_call_hold(ftdmchan) _ftdm_channel_call_hold(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL) |
Put a call on hold (if supported by the signaling stack). | |
#define | ftdm_channel_call_hold_ex(ftdmchan, usrmsg) _ftdm_channel_call_hold(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg)) |
#define | ftdm_channel_call_unhold(ftdmchan) _ftdm_channel_call_unhold(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL) |
Unhold a call. | |
#define | ftdm_channel_call_unhold_ex(ftdmchan, usrmsg) _ftdm_channel_call_unhold(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg)) |
#define | ftdm_channel_set_sig_status(ftdmchan, sigstatus) _ftdm_channel_set_sig_status(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (sigstatus), NULL) |
Set the channel signaling status. | |
#define | ftdm_channel_set_sig_status_ex(ftdmchan, sigstatus, usrmsg) _ftdm_channel_set_sig_status(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (sigstatus), usrmsg) |
#define | FTDM_TAG_END NULL |
#define | FIO_CODEC_ARGS (void *data, ftdm_size_t max, ftdm_size_t *datalen) |
Basic transcoding function prototype. | |
#define | FIO_CODEC_FUNCTION(name) FT_DECLARE_NONSTD(ftdm_status_t) name FIO_CODEC_ARGS |
#define | FTDM_PRE __FILE__, __FUNCTION__, __LINE__ |
#define | FTDM_LOG_LEVEL_DEBUG 7 |
#define | FTDM_LOG_LEVEL_INFO 6 |
#define | FTDM_LOG_LEVEL_NOTICE 5 |
#define | FTDM_LOG_LEVEL_WARNING 4 |
#define | FTDM_LOG_LEVEL_ERROR 3 |
#define | FTDM_LOG_LEVEL_CRIT 2 |
#define | FTDM_LOG_LEVEL_ALERT 1 |
#define | FTDM_LOG_LEVEL_EMERG 0 |
#define | FTDM_LOG_DEBUG FTDM_PRE, FTDM_LOG_LEVEL_DEBUG |
Log levels. | |
#define | FTDM_LOG_INFO FTDM_PRE, FTDM_LOG_LEVEL_INFO |
#define | FTDM_LOG_NOTICE FTDM_PRE, FTDM_LOG_LEVEL_NOTICE |
#define | FTDM_LOG_WARNING FTDM_PRE, FTDM_LOG_LEVEL_WARNING |
#define | FTDM_LOG_ERROR FTDM_PRE, FTDM_LOG_LEVEL_ERROR |
#define | FTDM_LOG_CRIT FTDM_PRE, FTDM_LOG_LEVEL_CRIT |
#define | FTDM_LOG_ALERT FTDM_PRE, FTDM_LOG_LEVEL_ALERT |
#define | FTDM_LOG_EMERG FTDM_PRE, FTDM_LOG_LEVEL_EMERG |
Typedefs | |
typedef ftdm_status_t(* | ftdm_queue_enqueue_func_t )(ftdm_queue_t *queue, void *obj) |
typedef void *(* | ftdm_queue_dequeue_func_t )(ftdm_queue_t *queue) |
typedef ftdm_status_t(* | ftdm_queue_wait_func_t )(ftdm_queue_t *queue, int ms) |
typedef ftdm_status_t(* | ftdm_queue_get_interrupt_func_t )(ftdm_queue_t *queue, ftdm_interrupt_t **interrupt) |
typedef ftdm_status_t(* | ftdm_queue_destroy_func_t )(ftdm_queue_t **queue) |
typedef struct ftdm_queue_handler | ftdm_queue_handler_t |
typedef struct ftdm_caller_data | ftdm_caller_data_t |
Caller information. | |
typedef ftdm_status_t(* | ftdm_hunt_result_cb_t )(ftdm_channel_t *fchan, ftdm_caller_data_t *caller_data) |
Function called before placing the call in the hunted channel The user can have a last saying in whether to proceed or abort the call attempt. Be aware that this callback will be called with the channel lock and you must not do any blocking operations during its execution. | |
typedef void * | ftdm_variable_container_t |
typedef struct ftdm_conf_parameter | ftdm_conf_parameter_t |
Signaling configuration parameter for the stacks (variable=value pair). | |
typedef struct ftdm_iterator | ftdm_iterator_t |
Opaque general purpose iterator. | |
typedef void *(* | ftdm_malloc_func_t )(void *pool, ftdm_size_t len) |
Custom memory handler hooks. Not recommended to use unless you need memory allocation customizations. | |
typedef void *(* | ftdm_calloc_func_t )(void *pool, ftdm_size_t elements, ftdm_size_t len) |
typedef void *(* | ftdm_realloc_func_t )(void *pool, void *buff, ftdm_size_t len) |
typedef void(* | ftdm_free_func_t )(void *pool, void *ptr) |
typedef ftdm_status_t(* | fio_channel_request_t )(ftdm_span_t *span, uint32_t chan_id, ftdm_direction_t direction, ftdm_caller_data_t *caller_data, ftdm_channel_t **ftdmchan) |
FreeTDM I/O layer interface function typedefs You don't need these unless your implementing an I/O interface module (most users don't). | |
typedef ftdm_status_t(* | fio_channel_outgoing_call_t )(ftdm_channel_t *ftdmchan) |
typedef ftdm_status_t(* | fio_channel_indicate_t )(ftdm_channel_t *ftdmchan, ftdm_channel_indication_t indication) |
typedef ftdm_status_t(* | fio_channel_set_sig_status_t )(ftdm_channel_t *ftdmchan, ftdm_signaling_status_t status) |
typedef ftdm_status_t(* | fio_channel_get_sig_status_t )(ftdm_channel_t *ftdmchan, ftdm_signaling_status_t *status) |
typedef ftdm_status_t(* | fio_span_set_sig_status_t )(ftdm_span_t *span, ftdm_signaling_status_t status) |
typedef ftdm_status_t(* | fio_span_get_sig_status_t )(ftdm_span_t *span, ftdm_signaling_status_t *status) |
typedef ftdm_status_t(* | fio_span_poll_event_t )(ftdm_span_t *span, uint32_t ms, short *poll_events) |
typedef ftdm_status_t(* | fio_span_next_event_t )(ftdm_span_t *span, ftdm_event_t **event) |
typedef ftdm_status_t(* | fio_channel_next_event_t )(ftdm_channel_t *ftdmchan, ftdm_event_t **event) |
typedef ftdm_status_t(* | fio_signal_cb_t )(ftdm_sigmsg_t *sigmsg) |
Callback for signal delivery (FTDM_SIGEVENT_START and friends). | |
typedef ftdm_status_t(* | fio_event_cb_t )(ftdm_channel_t *ftdmchan, ftdm_event_t *event) |
typedef ftdm_status_t(* | fio_configure_span_t )(ftdm_span_t *span, const char *str, ftdm_chan_type_t type, char *name, char *number) |
typedef ftdm_status_t(* | fio_configure_t )(const char *category, const char *var, const char *val, int lineno) |
typedef ftdm_status_t(* | fio_open_t )(ftdm_channel_t *ftdmchan) |
typedef ftdm_status_t(* | fio_close_t )(ftdm_channel_t *ftdmchan) |
typedef ftdm_status_t(* | fio_channel_destroy_t )(ftdm_channel_t *ftdmchan) |
typedef ftdm_status_t(* | fio_span_destroy_t )(ftdm_span_t *span) |
typedef ftdm_status_t(* | fio_get_alarms_t )(ftdm_channel_t *ftdmchan) |
typedef ftdm_status_t(* | fio_command_t )(ftdm_channel_t *ftdmchan, ftdm_command_t command, void *obj) |
typedef ftdm_status_t(* | fio_wait_t )(ftdm_channel_t *ftdmchan, ftdm_wait_flag_t *flags, int32_t to) |
typedef ftdm_status_t(* | fio_read_t )(ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen) |
typedef ftdm_status_t(* | fio_write_t )(ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen) |
typedef ftdm_status_t(* | fio_io_load_t )(ftdm_io_interface_t **fio) |
typedef ftdm_status_t(* | fio_sig_load_t )(void) |
typedef ftdm_status_t(* | fio_sig_configure_t )(ftdm_span_t *span, fio_signal_cb_t sig_cb, va_list ap) |
typedef ftdm_status_t(* | fio_configure_span_signaling_t )(ftdm_span_t *span, fio_signal_cb_t sig_cb, ftdm_conf_parameter_t *ftdm_parameters) |
typedef ftdm_status_t(* | fio_io_unload_t )(void) |
typedef ftdm_status_t(* | fio_sig_unload_t )(void) |
typedef ftdm_status_t(* | fio_api_t )(ftdm_stream_handle_t *stream, const char *data) |
typedef ftdm_status_t(* | fio_codec_t )(void *data, ftdm_size_t max, ftdm_size_t *datalen) |
Enumerations | |
enum | ftdm_call_cause_t { FTDM_CAUSE_NONE = 0, FTDM_CAUSE_UNALLOCATED = 1, FTDM_CAUSE_NO_ROUTE_TRANSIT_NET = 2, FTDM_CAUSE_NO_ROUTE_DESTINATION = 3, FTDM_CAUSE_SEND_SPECIAL_INFO_TONE = 4, FTDM_CAUSE_MISDIALED_TRUNK_PREFIX = 5, FTDM_CAUSE_CHANNEL_UNACCEPTABLE = 6, FTDM_CAUSE_CALL_AWARDED_DELIVERED = 7, FTDM_CAUSE_PREEMPTION = 8, FTDM_CAUSE_PREEMPTION_CIRCUIT_RESERVED = 9, FTDM_CAUSE_NORMAL_CLEARING = 16, FTDM_CAUSE_USER_BUSY = 17, FTDM_CAUSE_NO_USER_RESPONSE = 18, FTDM_CAUSE_NO_ANSWER = 19, FTDM_CAUSE_SUBSCRIBER_ABSENT = 20, FTDM_CAUSE_CALL_REJECTED = 21, FTDM_CAUSE_NUMBER_CHANGED = 22, FTDM_CAUSE_REDIRECTION_TO_NEW_DESTINATION = 23, FTDM_CAUSE_EXCHANGE_ROUTING_ERROR = 25, FTDM_CAUSE_DESTINATION_OUT_OF_ORDER = 27, FTDM_CAUSE_INVALID_NUMBER_FORMAT = 28, FTDM_CAUSE_FACILITY_REJECTED = 29, FTDM_CAUSE_RESPONSE_TO_STATUS_ENQUIRY = 30, FTDM_CAUSE_NORMAL_UNSPECIFIED = 31, FTDM_CAUSE_NORMAL_CIRCUIT_CONGESTION = 34, FTDM_CAUSE_NETWORK_OUT_OF_ORDER = 38, FTDM_CAUSE_PERMANENT_FRAME_MODE_CONNECTION_OOS = 39, FTDM_CAUSE_PERMANENT_FRAME_MODE_OPERATIONAL = 40, FTDM_CAUSE_NORMAL_TEMPORARY_FAILURE = 41, FTDM_CAUSE_SWITCH_CONGESTION = 42, FTDM_CAUSE_ACCESS_INFO_DISCARDED = 43, FTDM_CAUSE_REQUESTED_CHAN_UNAVAIL = 44, FTDM_CAUSE_PRE_EMPTED = 45, FTDM_CAUSE_PRECEDENCE_CALL_BLOCKED = 46, FTDM_CAUSE_RESOURCE_UNAVAILABLE_UNSPECIFIED = 47, FTDM_CAUSE_QOS_NOT_AVAILABLE = 49, FTDM_CAUSE_FACILITY_NOT_SUBSCRIBED = 50, FTDM_CAUSE_OUTGOING_CALL_BARRED = 53, FTDM_CAUSE_INCOMING_CALL_BARRED = 55, FTDM_CAUSE_BEARERCAPABILITY_NOTAUTH = 57, FTDM_CAUSE_BEARERCAPABILITY_NOTAVAIL = 58, FTDM_CAUSE_INCONSISTENCY_IN_INFO = 62, FTDM_CAUSE_SERVICE_UNAVAILABLE = 63, FTDM_CAUSE_BEARERCAPABILITY_NOTIMPL = 65, FTDM_CAUSE_CHAN_NOT_IMPLEMENTED = 66, FTDM_CAUSE_FACILITY_NOT_IMPLEMENTED = 69, FTDM_CAUSE_ONLY_DIGITAL_INFO_BC_AVAIL = 70, FTDM_CAUSE_SERVICE_NOT_IMPLEMENTED = 79, FTDM_CAUSE_INVALID_CALL_REFERENCE = 81, FTDM_CAUSE_IDENTIFIED_CHAN_NOT_EXIST = 82, FTDM_CAUSE_SUSPENDED_CALL_EXISTS_BUT_CALL_ID_DOES_NOT = 83, FTDM_CAUSE_CALL_ID_IN_USE = 84, FTDM_CAUSE_NO_CALL_SUSPENDED = 85, FTDM_CAUSE_CALL_WITH_CALL_ID_CLEARED = 86, FTDM_CAUSE_USER_NOT_CUG = 87, FTDM_CAUSE_INCOMPATIBLE_DESTINATION = 88, FTDM_CAUSE_NON_EXISTENT_CUG = 90, FTDM_CAUSE_INVALID_TRANSIT_NETWORK_SELECTION = 91, FTDM_CAUSE_INVALID_MSG_UNSPECIFIED = 95, FTDM_CAUSE_MANDATORY_IE_MISSING = 96, FTDM_CAUSE_MESSAGE_TYPE_NONEXIST = 97, FTDM_CAUSE_WRONG_MESSAGE = 98, FTDM_CAUSE_IE_NONEXIST = 99, FTDM_CAUSE_INVALID_IE_CONTENTS = 100, FTDM_CAUSE_WRONG_CALL_STATE = 101, FTDM_CAUSE_RECOVERY_ON_TIMER_EXPIRE = 102, FTDM_CAUSE_MANDATORY_IE_LENGTH_ERROR = 103, FTDM_CAUSE_MSG_WITH_UNRECOGNIZED_PARAM_DISCARDED = 110, FTDM_CAUSE_PROTOCOL_ERROR = 111, FTDM_CAUSE_INTERWORKING = 127, FTDM_CAUSE_SUCCESS = 142, FTDM_CAUSE_ORIGINATOR_CANCEL = 487, FTDM_CAUSE_CRASH = 500, FTDM_CAUSE_SYSTEM_SHUTDOWN = 501, FTDM_CAUSE_LOSE_RACE = 502, FTDM_CAUSE_MANAGER_REQUEST = 503, FTDM_CAUSE_BLIND_TRANSFER = 600, FTDM_CAUSE_ATTENDED_TRANSFER = 601, FTDM_CAUSE_ALLOTTED_TIMEOUT = 602, FTDM_CAUSE_USER_CHALLENGE = 603, FTDM_CAUSE_MEDIA_TIMEOUT = 604 } |
Hangup cause codes. More... | |
enum | ftdm_direction_t { FTDM_TOP_DOWN, FTDM_BOTTOM_UP, FTDM_RR_DOWN, FTDM_RR_UP } |
Hunting direction (when hunting for free channels). More... | |
enum | ftdm_chan_type_t { FTDM_CHAN_TYPE_B, FTDM_CHAN_TYPE_DQ921, FTDM_CHAN_TYPE_DQ931, FTDM_CHAN_TYPE_FXS, FTDM_CHAN_TYPE_FXO, FTDM_CHAN_TYPE_EM, FTDM_CHAN_TYPE_CAS, FTDM_CHAN_TYPE_COUNT } |
I/O channel type. More... | |
enum | ftdm_ton_t { FTDM_TON_UNKNOWN = 0, FTDM_TON_INTERNATIONAL, FTDM_TON_NATIONAL, FTDM_TON_NETWORK_SPECIFIC, FTDM_TON_SUBSCRIBER_NUMBER, FTDM_TON_ABBREVIATED_NUMBER, FTDM_TON_RESERVED, FTDM_TON_INVALID } |
Type Of Number (TON). More... | |
enum | ftdm_hunt_mode_t { FTDM_HUNT_SPAN, FTDM_HUNT_GROUP, FTDM_HUNT_CHAN } |
Hunting mode. More... | |
enum | ftdm_tone_type_t { FTDM_TONE_DTMF = (1 << 0) } |
Tone type. More... | |
enum | ftdm_signal_event_t { FTDM_SIGEVENT_START, FTDM_SIGEVENT_STOP, FTDM_SIGEVENT_RELEASED, FTDM_SIGEVENT_UP, FTDM_SIGEVENT_FLASH, FTDM_SIGEVENT_PROCEED, FTDM_SIGEVENT_RINGING, FTDM_SIGEVENT_ALERTING, FTDM_SIGEVENT_PROGRESS, FTDM_SIGEVENT_PROGRESS_MEDIA, FTDM_SIGEVENT_ALARM_TRAP, FTDM_SIGEVENT_ALARM_CLEAR, FTDM_SIGEVENT_COLLECTED_DIGIT, FTDM_SIGEVENT_ADD_CALL, FTDM_SIGEVENT_RESTART, FTDM_SIGEVENT_SIGSTATUS_CHANGED, FTDM_SIGEVENT_FACILITY, FTDM_SIGEVENT_TRACE, FTDM_SIGEVENT_TRACE_RAW, FTDM_SIGEVENT_INDICATION_COMPLETED, FTDM_SIGEVENT_DIALING, FTDM_SIGEVENT_TRANSFER_COMPLETED, FTDM_SIGEVENT_SMS, FTDM_SIGEVENT_IO_INDATA, FTDM_SIGEVENT_RAW, FTDM_SIGEVENT_INVALID } |
Signaling messages sent by the stacks. More... | |
enum | ftdm_signaling_status_t { FTDM_SIG_STATE_DOWN, FTDM_SIG_STATE_SUSPENDED, FTDM_SIG_STATE_UP, FTDM_SIG_STATE_INVALID } |
Signaling status on a given span or specific channel on protocols that support it. More... | |
enum | ftdm_trace_dir_t { FTDM_TRACE_DIR_INCOMING, FTDM_TRACE_DIR_OUTGOING, FTDM_TRACE_DIR_INVALID } |
enum | ftdm_channel_indication_t { FTDM_CHANNEL_INDICATE_NONE, FTDM_CHANNEL_INDICATE_RINGING, FTDM_CHANNEL_INDICATE_PROCEED, FTDM_CHANNEL_INDICATE_PROGRESS, FTDM_CHANNEL_INDICATE_PROGRESS_MEDIA, FTDM_CHANNEL_INDICATE_BUSY, FTDM_CHANNEL_INDICATE_ANSWER, FTDM_CHANNEL_INDICATE_FACILITY, FTDM_CHANNEL_INDICATE_TRANSFER, FTDM_CHANNEL_INDICATE_RAW, FTDM_CHANNEL_INDICATE_INVALID } |
FreeTDM supported indications. This is used during incoming calls when you want to request the signaling stack to notify about indications occurring locally. See ftdm_channel_call_indicate for more info. More... | |
enum | ftdm_crash_policy_t { FTDM_CRASH_NEVER = 0, FTDM_CRASH_ON_ASSERT } |
Crash policy Useful for debugging only, default policy is never, if you wish to crash on asserts then use ftdm_global_set_crash_policy. More... | |
enum | ftdm_command_t { FTDM_COMMAND_NOOP = 0, FTDM_COMMAND_SET_INTERVAL = 1, FTDM_COMMAND_GET_INTERVAL = 2, FTDM_COMMAND_SET_CODEC = 3, FTDM_COMMAND_GET_CODEC = 4, FTDM_COMMAND_SET_NATIVE_CODEC = 5, FTDM_COMMAND_GET_NATIVE_CODEC = 6, FTDM_COMMAND_ENABLE_DTMF_DETECT = 7, FTDM_COMMAND_DISABLE_DTMF_DETECT = 8, FTDM_COMMAND_SEND_DTMF = 9, FTDM_COMMAND_SET_DTMF_ON_PERIOD = 10, FTDM_COMMAND_GET_DTMF_ON_PERIOD = 11, FTDM_COMMAND_SET_DTMF_OFF_PERIOD = 12, FTDM_COMMAND_GET_DTMF_OFF_PERIOD = 13, FTDM_COMMAND_GENERATE_RING_ON = 14, FTDM_COMMAND_GENERATE_RING_OFF = 15, FTDM_COMMAND_OFFHOOK = 16, FTDM_COMMAND_ONHOOK = 17, FTDM_COMMAND_FLASH = 18, FTDM_COMMAND_WINK = 19, FTDM_COMMAND_ENABLE_PROGRESS_DETECT = 20, FTDM_COMMAND_DISABLE_PROGRESS_DETECT = 21, FTDM_COMMAND_TRACE_INPUT = 22, FTDM_COMMAND_TRACE_OUTPUT = 23, FTDM_COMMAND_TRACE_END_ALL = 24, FTDM_COMMAND_ENABLE_DEBUG_DTMF = 25, FTDM_COMMAND_DISABLE_DEBUG_DTMF = 26, FTDM_COMMAND_ENABLE_INPUT_DUMP = 27, FTDM_COMMAND_DISABLE_INPUT_DUMP = 28, FTDM_COMMAND_ENABLE_OUTPUT_DUMP = 29, FTDM_COMMAND_DISABLE_OUTPUT_DUMP = 30, FTDM_COMMAND_DUMP_INPUT = 31, FTDM_COMMAND_DUMP_OUTPUT = 32, FTDM_COMMAND_ENABLE_CALLERID_DETECT = 33, FTDM_COMMAND_DISABLE_CALLERID_DETECT = 34, FTDM_COMMAND_ENABLE_ECHOCANCEL = 35, FTDM_COMMAND_DISABLE_ECHOCANCEL = 36, FTDM_COMMAND_ENABLE_ECHOTRAIN = 37, FTDM_COMMAND_DISABLE_ECHOTRAIN = 38, FTDM_COMMAND_SET_CAS_BITS = 39, FTDM_COMMAND_GET_CAS_BITS = 40, FTDM_COMMAND_SET_RX_GAIN = 41, FTDM_COMMAND_GET_RX_GAIN = 42, FTDM_COMMAND_SET_TX_GAIN = 43, FTDM_COMMAND_GET_TX_GAIN = 44, FTDM_COMMAND_FLUSH_TX_BUFFERS = 45, FTDM_COMMAND_FLUSH_RX_BUFFERS = 46, FTDM_COMMAND_FLUSH_BUFFERS = 47, FTDM_COMMAND_FLUSH_IOSTATS = 48, FTDM_COMMAND_SET_PRE_BUFFER_SIZE = 49, FTDM_COMMAND_SET_LINK_STATUS = 50, FTDM_COMMAND_GET_LINK_STATUS = 51, FTDM_COMMAND_ENABLE_LOOP = 52, FTDM_COMMAND_DISABLE_LOOP = 53, FTDM_COMMAND_SET_RX_QUEUE_SIZE = 54, FTDM_COMMAND_SET_TX_QUEUE_SIZE = 55, FTDM_COMMAND_SET_POLARITY = 56, FTDM_COMMAND_START_MF_PLAYBACK = 57, FTDM_COMMAND_STOP_MF_PLAYBACK = 58, FTDM_COMMAND_GET_IOSTATS = 59, FTDM_COMMAND_SWITCH_IOSTATS = 60, FTDM_COMMAND_ENABLE_DTMF_REMOVAL = 61, FTDM_COMMAND_DISABLE_DTMF_REMOVAL = 62, FTDM_COMMAND_COUNT } |
Channel commands that can be executed through ftdm_channel_command(). More... | |
enum | ftdm_polarity_t { FTDM_POLARITY_FORWARD = 0, FTDM_POLARITY_REVERSE = 1 } |
enum | ftdm_codec_t { FTDM_CODEC_ULAW = 0, FTDM_CODEC_ALAW = 8, FTDM_CODEC_SLIN = 10, FTDM_CODEC_NONE = (1 << 30) } |
FreeTDM supported I/O codecs. More... | |
enum | ftdm_alarm_flag_t { FTDM_ALARM_NONE = 0, FTDM_ALARM_RED = (1 << 0), FTDM_ALARM_YELLOW = (1 << 1), FTDM_ALARM_RAI = (1 << 2), FTDM_ALARM_BLUE = (1 << 3), FTDM_ALARM_AIS = (1 << 4), FTDM_ALARM_GENERAL = (1 << 30) } |
FreeTDM supported hardware alarms. More... | |
enum | ftdm_mf_direction_flag_t { FTDM_MF_DIRECTION_FORWARD = (1 << 8), FTDM_MF_DIRECTION_BACKWARD = (1 << 9) } |
MF generation direction flags. More... | |
enum | ftdm_iostats_error_type_t { FTDM_IOSTATS_ERROR_CRC = (1 << 0), FTDM_IOSTATS_ERROR_FRAME = (1 << 1), FTDM_IOSTATS_ERROR_ABORT = (1 << 2), FTDM_IOSTATS_ERROR_FIFO = (1 << 3), FTDM_IOSTATS_ERROR_DMA = (1 << 4), FTDM_IOSTATS_ERROR_QUEUE_THRES = (1 << 5), FTDM_IOSTATS_ERROR_QUEUE_FULL = (1 << 6) } |
IO Error statistics. More... | |
Functions | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_chan_type, ftdm_chan_type2str, ftdm_chan_type_t) typedef void(*ftdm_logger_t)(const char *file | |
transform from channel type to string and from string to channel type ftdm_str2ftdm_chan_type transforms a channel string (ie: "FXO" to FTDM_CHAN_TYPE_FXO) ftdm_chan_type2str transforms a channel type to string (ie: FTDM_CHAN_TYPE_B to "B") | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_ton, ftdm_ton2str, ftdm_ton_t) typedef enum | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_npi, ftdm_npi2str, ftdm_npi_t) typedef enum | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_presentation, ftdm_presentation2str, ftdm_presentation_t) typedef enum | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_screening, ftdm_screening2str, ftdm_screening_t) typedef enum | |
bearer capability | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_bearer_cap, ftdm_bearer_cap2str, ftdm_bearer_cap_t) typedef enum | |
user information layer 1 protocol | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_usr_layer1_prot, ftdm_user_layer1_prot2str, ftdm_user_layer1_prot_t) typedef enum | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_calling_party_category, ftdm_calling_party_category2str, ftdm_calling_party_category_t) typedef enum | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_transfer_response, ftdm_transfer_response2str, ftdm_transfer_response_t) typedef struct | |
Digit limit used in DNIS/ANI. | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_signal_event, ftdm_signal_event2str, ftdm_signal_event_t) typedef enum | |
Move from string to ftdm_signal_event_t and viceversa. | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_trunk_type, ftdm_trunk_type2str, ftdm_trunk_type_t) typedef struct ftdm_channel_config | |
Move from string to ftdm_trunk_type_t and viceversa. | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_signaling_status, ftdm_signaling_status2str, ftdm_signaling_status_t) typedef struct | |
Move from string to ftdm_signaling_status_t and viceversa. | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_trace_dir, ftdm_trace_dir2str, ftdm_trace_dir_t) typedef enum | |
Move string to ftdm_trace_dir_t and viceversa. | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_trace_type, ftdm_trace_type2str, ftdm_trace_type_t) typedef struct | |
Move string to ftdm_trace_type_t and viceversa. | |
FTDM_STR2ENUM_P (ftdm_str2ftdm_channel_indication, ftdm_channel_indication2str, ftdm_channel_indication_t) typedef struct | |
Move from string to ftdm_channel_indication_t and viceversa. | |
ftdm_status_t | ftdm_global_set_queue_handler (ftdm_queue_handler_t *handler) |
Override the default queue handler. | |
int | ftdm_channel_get_availability (ftdm_channel_t *ftdmchan) |
Return the availability rate for a channel. | |
ftdm_status_t | _ftdm_channel_call_answer (const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_usrmsg_t *usrmsg) |
Answer call recording the source code point where the it was called (see ftdm_channel_call_answer for an easy to use macro). | |
ftdm_status_t | _ftdm_channel_call_place (const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_usrmsg_t *usrmsg) |
Place an outgoing call recording the source code point where it was called (see ftdm_channel_call_place for an easy to use macro). | |
ftdm_status_t | _ftdm_call_place (const char *file, const char *func, int line, ftdm_caller_data_t *caller_data, ftdm_hunting_scheme_t *hunting, ftdm_usrmsg_t *usrmsg) |
Place an outgoing call with the given caller data in a channel according to the hunting scheme provided and records the place where it was called. See ftdm_call_place for an easy to use macro. | |
ftdm_status_t | _ftdm_channel_call_indicate (const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_channel_indication_t indication, ftdm_usrmsg_t *usrmsg) |
Indicate a new condition in an incoming call recording the source code point where it was called (see ftdm_channel_call_indicate for an easy to use macro). | |
ftdm_status_t | _ftdm_channel_call_hangup (const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_usrmsg_t *usrmsg) |
Hangup the call without cause recording the source code point where it was called (see ftdm_channel_call_hangup for an easy to use macro). | |
ftdm_status_t | _ftdm_channel_call_hangup_with_cause (const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_call_cause_t, ftdm_usrmsg_t *usrmsg) |
Hangup the call with cause recording the source code point where it was called (see ftdm_channel_call_hangup_with_cause for an easy to use macro). | |
ftdm_status_t | _ftdm_channel_call_transfer (const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, const char *arg, ftdm_usrmsg_t *usrmsg) |
Answer call recording the source code point where the it was called (see ftdm_channel_call_tranasfer for an easy to use macro). | |
ftdm_status_t | _ftdm_channel_reset (const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_usrmsg_t *usrmsg) |
Reset the channel (see _ftdm_channel_reset for an easy to use macro). | |
ftdm_status_t | _ftdm_channel_call_hold (const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_usrmsg_t *usrmsg) |
Put a call on hold recording the source code point where it was called (see ftdm_channel_call_hold for an easy to use macro). | |
ftdm_status_t | _ftdm_channel_call_unhold (const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_usrmsg_t *usrmsg) |
Unhold a call recording the source code point where it was called (see ftdm_channel_call_unhold for an easy to use macro). | |
ftdm_bool_t | ftdm_channel_call_check_answered (const ftdm_channel_t *ftdmchan) |
Check if the call is answered already. | |
ftdm_bool_t | ftdm_channel_call_check_busy (const ftdm_channel_t *ftdmchan) |
Check if the call is busy. | |
ftdm_bool_t | ftdm_channel_call_check_hangup (const ftdm_channel_t *ftdmchan) |
Check if the call is hangup. | |
ftdm_bool_t | ftdm_channel_call_check_done (const ftdm_channel_t *ftdmchan) |
Check if the call is done (final state for a call, just after hangup). | |
ftdm_bool_t | ftdm_channel_call_check_hold (const ftdm_channel_t *ftdmchan) |
Check if the call is in hold. | |
ftdm_status_t | _ftdm_channel_set_sig_status (const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_signaling_status_t status, ftdm_usrmsg_t *usrmsg) |
Set channel signaling status (ie: put specific circuit down) only if supported by the signaling (see ftdm_channel_set_sig_stauts for an easy to use macro) | |
ftdm_status_t | ftdm_channel_get_sig_status (ftdm_channel_t *ftdmchan, ftdm_signaling_status_t *status) |
Get channel signaling status (ie: whether protocol layer is up or down). | |
ftdm_status_t | ftdm_span_set_sig_status (ftdm_span_t *span, ftdm_signaling_status_t status) |
Set span signaling status (ie: put the whole span protocol layer down) only if supported by the signaling. | |
ftdm_status_t | ftdm_span_get_sig_status (ftdm_span_t *span, ftdm_signaling_status_t *status) |
Get span signaling status (ie: whether protocol layer is up or down). | |
void | ftdm_channel_set_private (ftdm_channel_t *ftdmchan, void *pvt) |
Set user private data in the channel. | |
void * | ftdm_channel_get_private (const ftdm_channel_t *ftdmchan) |
Get user private data in the channel. | |
ftdm_status_t | ftdm_channel_clear_token (ftdm_channel_t *ftdmchan, const char *token) |
Remove the given token from the channel. | |
void | ftdm_channel_replace_token (ftdm_channel_t *ftdmchan, const char *old_token, const char *new_token) |
Replace the given token with the new token. | |
ftdm_status_t | ftdm_channel_add_token (ftdm_channel_t *ftdmchan, char *token, int end) |
Add a new token to the channel. | |
const char * | ftdm_channel_get_token (const ftdm_channel_t *ftdmchan, uint32_t tokenid) |
Get the requested token. | |
uint32_t | ftdm_channel_get_token_count (const ftdm_channel_t *ftdmchan) |
Get the token count. | |
uint32_t | ftdm_channel_get_io_interval (const ftdm_channel_t *ftdmchan) |
Get the I/O read/write interval. | |
uint32_t | ftdm_channel_get_io_packet_len (const ftdm_channel_t *ftdmchan) |
Get the I/O read/write packet length per interval. | |
ftdm_codec_t | ftdm_channel_get_codec (const ftdm_channel_t *ftdmchan) |
Get the I/O read/write codec. | |
const char * | ftdm_channel_get_last_error (const ftdm_channel_t *ftdmchan) |
Get the last error string for the channel. | |
ftdm_status_t | ftdm_channel_get_alarms (ftdm_channel_t *ftdmchan, ftdm_alarm_flag_t *alarmbits) |
Get the current alarm bitmask for the channel. | |
ftdm_chan_type_t | ftdm_channel_get_type (const ftdm_channel_t *ftdmchan) |
Get the channel type. | |
ftdm_size_t | ftdm_channel_dequeue_dtmf (ftdm_channel_t *ftdmchan, char *dtmf, ftdm_size_t len) |
Dequeue DTMF from the given channel. | |
void | ftdm_channel_flush_dtmf (ftdm_channel_t *ftdmchan) |
Flush the DTMF queue. | |
ftdm_status_t | ftdm_span_poll_event (ftdm_span_t *span, uint32_t ms, short *poll_events) |
Wait for an event in the span. | |
ftdm_status_t | ftdm_span_find (uint32_t id, ftdm_span_t **span) |
Find a span by its id. | |
const char * | ftdm_span_get_last_error (const ftdm_span_t *span) |
Get the last error string for the given span. | |
ftdm_status_t | ftdm_span_create (const char *iotype, const char *name, ftdm_span_t **span) |
Create a new span (not needed if you are using freetdm.conf). | |
ftdm_status_t | ftdm_span_add_channel (ftdm_span_t *span, ftdm_socket_t sockfd, ftdm_chan_type_t type, ftdm_channel_t **chan) |
Add a new channel to a span. | |
ftdm_status_t | ftdm_channel_add_to_group (const char *name, ftdm_channel_t *ftdmchan) |
Add the channel to a hunt group. | |
ftdm_status_t | ftdm_channel_remove_from_group (ftdm_group_t *group, ftdm_channel_t *ftdmchan) |
Remove the channel from a hunt group. | |
ftdm_status_t | ftdm_channel_read_event (ftdm_channel_t *ftdmchan, ftdm_event_t **event) |
Retrieves an event from the span. | |
ftdm_status_t | ftdm_group_find (uint32_t id, ftdm_group_t **group) |
Find a hunt group by id. | |
ftdm_status_t | ftdm_group_find_by_name (const char *name, ftdm_group_t **group) |
Find a hunt group by name. | |
ftdm_status_t | ftdm_group_create (ftdm_group_t **group, const char *name) |
Create a group with the given name. | |
ftdm_status_t | ftdm_span_channel_use_count (ftdm_span_t *span, uint32_t *count) |
Get the number of channels in use on a span. | |
ftdm_status_t | ftdm_group_channel_use_count (ftdm_group_t *group, uint32_t *count) |
Get the number of channels in use on a group. | |
uint32_t | ftdm_group_get_id (const ftdm_group_t *group) |
Get the id of a group. | |
ftdm_status_t | ftdm_channel_open (uint32_t span_id, uint32_t chan_id, ftdm_channel_t **ftdmchan) |
Open a channel specifying the span id and chan id (required before placing a call on the channel). | |
ftdm_status_t | ftdm_channel_open_ph (uint32_t span_id, uint32_t chan_id, ftdm_channel_t **ftdmchan) |
Open a channel specifying the span id and physical chan id (required before placing a call on the channel). | |
ftdm_status_t | ftdm_channel_open_by_span (uint32_t span_id, ftdm_direction_t direction, ftdm_caller_data_t *caller_data, ftdm_channel_t **ftdmchan) |
Hunts and opens a channel specifying the span id only. | |
ftdm_status_t | ftdm_channel_open_by_group (uint32_t group_id, ftdm_direction_t direction, ftdm_caller_data_t *caller_data, ftdm_channel_t **ftdmchan) |
Hunts and opens a channel specifying group id. | |
ftdm_status_t | ftdm_channel_close (ftdm_channel_t **ftdmchan) |
Close a previously open channel. | |
ftdm_status_t | ftdm_channel_command (ftdm_channel_t *ftdmchan, ftdm_command_t command, void *arg) |
Execute a command in a channel (same semantics as the ioctl() unix system call). | |
ftdm_status_t | ftdm_channel_wait (ftdm_channel_t *ftdmchan, ftdm_wait_flag_t *flags, int32_t timeout) |
Wait for I/O events in a channel. | |
ftdm_status_t | ftdm_channel_read (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen) |
Read data from a channel. | |
ftdm_status_t | ftdm_channel_write (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t datasize, ftdm_size_t *datalen) |
Write data to a channel. | |
const char * | ftdm_sigmsg_get_var (ftdm_sigmsg_t *sigmsg, const char *var_name) |
Get a custom variable from the sigmsg. | |
ftdm_iterator_t * | ftdm_sigmsg_get_var_iterator (const ftdm_sigmsg_t *sigmsg, ftdm_iterator_t *iter) |
Get an iterator to iterate over the sigmsg variables. | |
ftdm_status_t | ftdm_sigmsg_get_raw_data (ftdm_sigmsg_t *sigmsg, void **data, ftdm_size_t *datalen) |
Get raw data from sigmsg. | |
ftdm_status_t | ftdm_sigmsg_get_raw_data_detached (ftdm_sigmsg_t *sigmsg, void **data, ftdm_size_t *datalen) |
Get raw data from event. | |
ftdm_status_t | ftdm_usrmsg_add_var (ftdm_usrmsg_t *usrmsg, const char *var_name, const char *value) |
Add a custom variable to the user message. | |
ftdm_status_t | ftdm_usrmsg_set_raw_data (ftdm_usrmsg_t *usrmsg, void *data, ftdm_size_t datalen) |
Attach raw data to usrmsg. | |
void * | ftdm_iterator_current (ftdm_iterator_t *iter) |
Get iterator current value (depends on the iterator type). | |
ftdm_status_t | ftdm_get_current_var (ftdm_iterator_t *iter, const char **var_name, const char **var_val) |
Get variable name and value for the current iterator position. | |
ftdm_iterator_t * | ftdm_iterator_next (ftdm_iterator_t *iter) |
Advance iterator. | |
ftdm_status_t | ftdm_iterator_free (ftdm_iterator_t *iter) |
Free iterator. | |
ftdm_span_t * | ftdm_channel_get_span (const ftdm_channel_t *ftdmchan) |
Get the span pointer associated to the channel. | |
uint32_t | ftdm_channel_get_span_id (const ftdm_channel_t *ftdmchan) |
Get the span pointer associated to the channel. | |
uint32_t | ftdm_channel_get_ph_span_id (const ftdm_channel_t *ftdmchan) |
Get the physical span id associated to the channel. | |
const char * | ftdm_channel_get_span_name (const ftdm_channel_t *ftdmchan) |
Get the span name associated to the channel. | |
uint32_t | ftdm_channel_get_id (const ftdm_channel_t *ftdmchan) |
Get the id associated to the channel. | |
const char * | ftdm_channel_get_name (const ftdm_channel_t *ftdmchan) |
Get the name associated to the channel. | |
const char * | ftdm_channel_get_number (const ftdm_channel_t *ftdmchan) |
Get the number associated to the channel. | |
uint32_t | ftdm_channel_get_ph_id (const ftdm_channel_t *ftdmchan) |
Get the number physical id associated to the channel. | |
ftdm_status_t | ftdm_configure_span (ftdm_span_t *span, const char *type, fio_signal_cb_t sig_cb,...) |
Configure span with a signaling type. | |
ftdm_status_t | ftdm_configure_span_signaling (ftdm_span_t *span, const char *type, fio_signal_cb_t sig_cb, ftdm_conf_parameter_t *parameters) |
Configure span with a signaling type. | |
ftdm_status_t | ftdm_span_register_signal_cb (ftdm_span_t *span, fio_signal_cb_t sig_cb) |
Register callback to listen for incoming events. | |
ftdm_status_t | ftdm_span_start (ftdm_span_t *span) |
Start the span signaling (must call ftdm_configure_span_signaling first). | |
ftdm_status_t | ftdm_span_stop (ftdm_span_t *span) |
Stop the span signaling (must call ftdm_span_start first). | |
ftdm_status_t | ftdm_span_delete (ftdm_span_t *span) |
delete span from freetdm delete span from global span hash table frees all ftdm resources associated with span invoke signaling cb "ftdm_span_stop" to stop signaling | |
ftdm_status_t | ftdm_global_add_io_interface (ftdm_io_interface_t *io_interface) |
Register a custom I/O interface with the FreeTDM core. | |
ftdm_status_t | ftdm_span_find_by_name (const char *name, ftdm_span_t **span) |
Find a span by name. | |
uint32_t | ftdm_span_get_id (const ftdm_span_t *span) |
Get the span id. | |
const char * | ftdm_span_get_name (const ftdm_span_t *span) |
Get the span name. | |
ftdm_iterator_t * | ftdm_span_get_chan_iterator (const ftdm_span_t *span, ftdm_iterator_t *iter) |
Get iterator for the span channels. | |
char * | ftdm_api_execute (const char *cmd) |
Execute a text command. The text command output will be returned and must be free'd. | |
int | ftdm_get_all_span_list (char *buffer) |
get all span details buffer | |
ftdm_status_t | ftdm_conf_node_create (const char *name, ftdm_conf_node_t **node, ftdm_conf_node_t *parent) |
Create a configuration node. | |
ftdm_status_t | ftdm_conf_node_add_param (ftdm_conf_node_t *node, const char *param, const char *val) |
Adds a new parameter to the specified configuration node. | |
ftdm_status_t | ftdm_conf_node_destroy (ftdm_conf_node_t *node) |
Destroy the memory allocated for a configuration node (and all of its descendance). | |
ftdm_status_t | ftdm_configure_span_channels (ftdm_span_t *span, const char *str, ftdm_channel_config_t *chan_config, unsigned *configured) |
Create and configure channels in the given span. | |
void | ftdm_span_set_trunk_type (ftdm_span_t *span, ftdm_trunk_type_t type) |
Set the trunk type for a span This must be called before configuring any channels within the span. | |
ftdm_trunk_type_t | ftdm_span_get_trunk_type (const ftdm_span_t *span) |
Get the trunk type for a span. | |
const char * | ftdm_span_get_trunk_type_str (const ftdm_span_t *span) |
For display debugging purposes you can display this string which describes the trunk type of a span. | |
ftdm_channel_t * | ftdm_span_get_channel (const ftdm_span_t *span, uint32_t chanid) |
Return the channel identified by the provided logical id. | |
ftdm_channel_t * | ftdm_span_get_channel_ph (const ftdm_span_t *span, uint32_t chanid) |
Return the channel identified by the provided physical id. | |
uint32_t | ftdm_span_get_chan_count (const ftdm_span_t *span) |
Return the channel count number for the given span. | |
ftdm_status_t | ftdm_channel_set_caller_data (ftdm_channel_t *ftdmchan, ftdm_caller_data_t *caller_data) |
Set the caller data for a channel. Be sure to call this before ftdm_channel_call_place(). | |
ftdm_caller_data_t * | ftdm_channel_get_caller_data (ftdm_channel_t *channel) |
Get the caller data for a channel, typically you need this when receiving FTDM_SIGEVENT_START. | |
int | ftdm_channel_get_state (const ftdm_channel_t *ftdmchan) |
Get current state of a channel. | |
int | ftdm_channel_get_last_state (const ftdm_channel_t *ftdmchan) |
Get last state of a channel. | |
const char * | ftdm_channel_get_state_str (const ftdm_channel_t *channel) |
For display debugging purposes you can display this string which describes the current channel internal state. | |
const char * | ftdm_channel_get_last_state_str (const ftdm_channel_t *channel) |
For display debugging purposes you can display this string which describes the last channel internal state. | |
char * | ftdm_channel_get_history_str (const ftdm_channel_t *channel) |
For display debugging purposes you can display this string which describes the history of the channel. | |
ftdm_status_t | ftdm_span_set_blocking_mode (const ftdm_span_t *span, ftdm_bool_t enabled) |
Enable/disable blocking mode in the channels for this span. | |
ftdm_status_t | ftdm_global_init (void) |
Initialize the library. | |
ftdm_status_t | ftdm_global_configuration (void) |
Create spans and channels reading the freetdm.conf file. | |
ftdm_status_t | ftdm_global_reconfiguration (void) |
reading freetdm.conf file and create spans and channels , skip already created spans | |
ftdm_status_t | ftdm_global_destroy (void) |
Shutdown the library. | |
ftdm_status_t | ftdm_global_set_memory_handler (ftdm_memory_handler_t *handler) |
Set memory handler for the library. | |
void | ftdm_global_set_crash_policy (ftdm_crash_policy_t policy) |
Set the crash policy for the library. | |
void | ftdm_global_set_logger (ftdm_logger_t logger) |
Set the logger handler for the library. | |
void | ftdm_global_set_default_logger (int level) |
Set the default logger level. | |
void | ftdm_global_set_mod_directory (const char *path) |
Set the directory to look for modules. | |
void | ftdm_global_set_config_directory (const char *path) |
Set the directory to look for configs. | |
ftdm_bool_t | ftdm_running (void) |
Check if the FTDM library is initialized and running. | |
FT_DECLARE_NONSTD (ftdm_status_t) fio_slin2ulaw(void *data | |
Basic transcoding functions. | |
Variables | |
const char * | func |
const char int | line |
const char int int | level |
const char int int const char * | fmt |
const char int int const char typedef ftdm_status_t(* | ftdm_queue_create_func_t )(ftdm_queue_t **queue, ftdm_size_t capacity) |
Data queue operation functions you can use ftdm_global_set_queue_handler if you want to override the default implementation (not recommended). | |
ftdm_npi_t | |
ftdm_presentation_t | |
ftdm_screening_t | |
ftdm_bearer_cap_t | |
ftdm_user_layer1_prot_t | |
ftdm_calling_party_category_t | |
ftdm_transfer_response_t | |
ftdm_number_t | |
ftdm_trunk_type_t | |
ftdm_channel_config_t | |
ftdm_event_sigstatus_t | |
ftdm_trace_type_t | |
ftdm_event_trace_t | |
ftdm_event_indication_completed_t | |
FT_DECLARE_DATA ftdm_logger_t | ftdm_log |
ftdm_size_t | max |
ftdm_size_t ftdm_size_t * | datalen |
#define BEARER_CAP_STRINGS "speech", "unrestricted-digital-information", "restricted-digital-information", "3.1-Khz-audio", "7-Khz-audio", "15-Khz-audio", "video", "invalid" |
#define CALLING_PARTY_CATEGORY_STRINGS "unknown", "operator", "operator-french", "operator-english", "operator-german", "operator-russian", "operator-spanish", "ordinary", "priority", "data-call", "test-call", "payphone", "china", "invalid" |
#define CHAN_TYPE_STRINGS "B", "DQ921", "DQ931", "FXS", "FXO", "EM", "CAS", "INVALID" |
#define FIO_API_ARGS (ftdm_stream_handle_t *stream, const char *data) |
#define FIO_API_FUNCTION | ( | name | ) | ftdm_status_t name FIO_API_ARGS |
#define FIO_CHANNEL_DESTROY_ARGS (ftdm_channel_t *ftdmchan) |
#define FIO_CHANNEL_DESTROY_FUNCTION | ( | name | ) | ftdm_status_t name FIO_CHANNEL_DESTROY_ARGS |
#define FIO_CHANNEL_GET_SIG_STATUS_ARGS (ftdm_channel_t *ftdmchan, ftdm_signaling_status_t *status) |
#define FIO_CHANNEL_GET_SIG_STATUS_FUNCTION | ( | name | ) | ftdm_status_t name FIO_CHANNEL_GET_SIG_STATUS_ARGS |
#define FIO_CHANNEL_INDICATE_ARGS (ftdm_channel_t *ftdmchan, ftdm_channel_indication_t indication) |
#define FIO_CHANNEL_INDICATE_FUNCTION | ( | name | ) | ftdm_status_t name FIO_CHANNEL_INDICATE_ARGS |
#define FIO_CHANNEL_NEXT_EVENT_ARGS (ftdm_channel_t *ftdmchan, ftdm_event_t **event) |
#define FIO_CHANNEL_NEXT_EVENT_FUNCTION | ( | name | ) | ftdm_status_t name FIO_CHANNEL_NEXT_EVENT_ARGS |
#define FIO_CHANNEL_OUTGOING_CALL_ARGS (ftdm_channel_t *ftdmchan) |
#define FIO_CHANNEL_OUTGOING_CALL_FUNCTION | ( | name | ) | ftdm_status_t name FIO_CHANNEL_OUTGOING_CALL_ARGS |
#define FIO_CHANNEL_REQUEST_ARGS (ftdm_span_t *span, uint32_t chan_id, ftdm_direction_t direction, ftdm_caller_data_t *caller_data, ftdm_channel_t **ftdmchan) |
FreeTDM I/O layer interface argument macros You don't need these unless your implementing an I/O interface module (most users don't).
#define FIO_CHANNEL_REQUEST_FUNCTION | ( | name | ) | ftdm_status_t name FIO_CHANNEL_REQUEST_ARGS |
FreeTDM I/O layer interface function prototype wrapper macros You don't need these unless your implementing an I/O interface module (most users don't).
#define FIO_CHANNEL_SET_SIG_STATUS_ARGS (ftdm_channel_t *ftdmchan, ftdm_signaling_status_t status) |
#define FIO_CHANNEL_SET_SIG_STATUS_FUNCTION | ( | name | ) | ftdm_status_t name FIO_CHANNEL_SET_SIG_STATUS_ARGS |
#define FIO_CLOSE_ARGS (ftdm_channel_t *ftdmchan) |
#define FIO_CLOSE_FUNCTION | ( | name | ) | ftdm_status_t name FIO_CLOSE_ARGS |
Basic transcoding function prototype.
#define FIO_CODEC_FUNCTION | ( | name | ) | FT_DECLARE_NONSTD(ftdm_status_t) name FIO_CODEC_ARGS |
#define FIO_COMMAND_ARGS (ftdm_channel_t *ftdmchan, ftdm_command_t command, void *obj) |
#define FIO_COMMAND_FUNCTION | ( | name | ) | ftdm_status_t name FIO_COMMAND_ARGS |
#define FIO_CONFIGURE_ARGS (const char *category, const char *var, const char *val, int lineno) |
#define FIO_CONFIGURE_FUNCTION | ( | name | ) | ftdm_status_t name FIO_CONFIGURE_ARGS |
#define FIO_CONFIGURE_SPAN_ARGS (ftdm_span_t *span, const char *str, ftdm_chan_type_t type, char *name, char *number) |
#define FIO_CONFIGURE_SPAN_FUNCTION | ( | name | ) | ftdm_status_t name FIO_CONFIGURE_SPAN_ARGS |
#define FIO_CONFIGURE_SPAN_SIGNALING_ARGS (ftdm_span_t *span, fio_signal_cb_t sig_cb, ftdm_conf_parameter_t *ftdm_parameters) |
#define FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION | ( | name | ) | ftdm_status_t name FIO_CONFIGURE_SPAN_SIGNALING_ARGS |
#define FIO_EVENT_CB_ARGS (ftdm_channel_t *ftdmchan, ftdm_event_t *event) |
#define FIO_EVENT_CB_FUNCTION | ( | name | ) | ftdm_status_t name FIO_EVENT_CB_ARGS |
#define FIO_GET_ALARMS_ARGS (ftdm_channel_t *ftdmchan) |
#define FIO_GET_ALARMS_FUNCTION | ( | name | ) | ftdm_status_t name FIO_GET_ALARMS_ARGS |
#define FIO_IO_LOAD_ARGS (ftdm_io_interface_t **fio) |
#define FIO_IO_LOAD_FUNCTION | ( | name | ) | ftdm_status_t name FIO_IO_LOAD_ARGS |
#define FIO_IO_UNLOAD_ARGS (void) |
#define FIO_IO_UNLOAD_FUNCTION | ( | name | ) | ftdm_status_t name FIO_IO_UNLOAD_ARGS |
#define FIO_OPEN_ARGS (ftdm_channel_t *ftdmchan) |
#define FIO_OPEN_FUNCTION | ( | name | ) | ftdm_status_t name FIO_OPEN_ARGS |
#define FIO_READ_ARGS (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen) |
#define FIO_READ_FUNCTION | ( | name | ) | ftdm_status_t name FIO_READ_ARGS |
#define FIO_SIG_CONFIGURE_ARGS (ftdm_span_t *span, fio_signal_cb_t sig_cb, va_list ap) |
#define FIO_SIG_CONFIGURE_FUNCTION | ( | name | ) | ftdm_status_t name FIO_SIG_CONFIGURE_ARGS |
#define FIO_SIG_LOAD_ARGS (void) |
#define FIO_SIG_LOAD_FUNCTION | ( | name | ) | ftdm_status_t name FIO_SIG_LOAD_ARGS |
#define FIO_SIG_UNLOAD_ARGS (void) |
#define FIO_SIG_UNLOAD_FUNCTION | ( | name | ) | ftdm_status_t name FIO_SIG_UNLOAD_ARGS |
#define FIO_SIGNAL_CB_ARGS (ftdm_sigmsg_t *sigmsg) |
#define FIO_SIGNAL_CB_FUNCTION | ( | name | ) | ftdm_status_t name FIO_SIGNAL_CB_ARGS |
#define FIO_SPAN_DESTROY_ARGS (ftdm_span_t *span) |
#define FIO_SPAN_DESTROY_FUNCTION | ( | name | ) | ftdm_status_t name FIO_SPAN_DESTROY_ARGS |
#define FIO_SPAN_GET_SIG_STATUS_ARGS (ftdm_span_t *span, ftdm_signaling_status_t *status) |
#define FIO_SPAN_GET_SIG_STATUS_FUNCTION | ( | name | ) | ftdm_status_t name FIO_SPAN_GET_SIG_STATUS_ARGS |
#define FIO_SPAN_NEXT_EVENT_ARGS (ftdm_span_t *span, ftdm_event_t **event) |
#define FIO_SPAN_NEXT_EVENT_FUNCTION | ( | name | ) | ftdm_status_t name FIO_SPAN_NEXT_EVENT_ARGS |
#define FIO_SPAN_POLL_EVENT_ARGS (ftdm_span_t *span, uint32_t ms, short *poll_events) |
#define FIO_SPAN_POLL_EVENT_FUNCTION | ( | name | ) | ftdm_status_t name FIO_SPAN_POLL_EVENT_ARGS |
#define FIO_SPAN_SET_SIG_STATUS_ARGS (ftdm_span_t *span, ftdm_signaling_status_t status) |
#define FIO_SPAN_SET_SIG_STATUS_FUNCTION | ( | name | ) | ftdm_status_t name FIO_SPAN_SET_SIG_STATUS_ARGS |
#define FIO_WAIT_ARGS (ftdm_channel_t *ftdmchan, ftdm_wait_flag_t *flags, int32_t to) |
#define FIO_WAIT_FUNCTION | ( | name | ) | ftdm_status_t name FIO_WAIT_ARGS |
#define FIO_WRITE_ARGS (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen) |
#define FIO_WRITE_FUNCTION | ( | name | ) | ftdm_status_t name FIO_WRITE_ARGS |
#define ftdm_call_place | ( | callerdata, | |||
hunting | ) | _ftdm_call_place(__FILE__, __FUNCTION__, __LINE__, (callerdata), (hunting), NULL) |
Place an outgoing call with the given caller data in a channel according to the hunting scheme provided.
#define ftdm_call_place_ex | ( | callerdata, | |||
hunting, | |||||
usrmsg | ) | _ftdm_call_place(__FILE__, __FUNCTION__, __LINE__, (callerdata), (hunting), (usrmsg)) |
#define ftdm_channel_call_answer | ( | ftdmchan | ) | _ftdm_channel_call_answer(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL) |
Answer call. This can also be accomplished by ftdm_channel_call_indicate with FTDM_CHANNEL_INDICATE_ANSWER, in both cases you will get a FTDM_SIGEVENT_INDICATION_COMPLETED when the indication is sent (or an error occurs). Just as with ftdm_channel_call_indicate you won't receive FTDM_SIGEVENT_INDICATION_COMPLETED when this function returns anything else than FTDM_SUCCESS.
#define ftdm_channel_call_answer_ex | ( | ftdmchan, | |||
usrmsg | ) | _ftdm_channel_call_answer(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg)) |
#define ftdm_channel_call_hangup | ( | ftdmchan | ) | _ftdm_channel_call_hangup(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL) |
Hangup the call without cause.
#define ftdm_channel_call_hangup_ex | ( | ftdmchan, | |||
usrmsg | ) | _ftdm_channel_call_hangup(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg)) |
#define ftdm_channel_call_hangup_with_cause | ( | ftdmchan, | |||
cause | ) | _ftdm_channel_call_hangup_with_cause(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (cause), NULL) |
Hangup the call with cause.
#define ftdm_channel_call_hangup_with_cause_ex | ( | ftdmchan, | |||
cause, | |||||
usrmsg | ) | _ftdm_channel_call_hangup_with_cause(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (cause), (usrmsg)) |
#define ftdm_channel_call_hold | ( | ftdmchan | ) | _ftdm_channel_call_hold(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL) |
Put a call on hold (if supported by the signaling stack).
#define ftdm_channel_call_hold_ex | ( | ftdmchan, | |||
usrmsg | ) | _ftdm_channel_call_hold(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg)) |
#define ftdm_channel_call_indicate | ( | ftdmchan, | |||
indication | ) | _ftdm_channel_call_indicate(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (indication), NULL) |
Indicate a new condition in an incoming call.
#define ftdm_channel_call_indicate_ex | ( | ftdmchan, | |||
indication, | |||||
usrmsg | ) | _ftdm_channel_call_indicate(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (indication), (usrmsg)) |
#define ftdm_channel_call_place | ( | ftdmchan | ) | _ftdm_channel_call_place(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL) |
Place an outgoing call in the given channel.
#define ftdm_channel_call_place_ex | ( | ftdmchan, | |||
usrmsg | ) | _ftdm_channel_call_place_ex(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg)) |
#define ftdm_channel_call_transfer | ( | ftdmchan, | |||
arg | ) | _ftdm_channel_call_transfer(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (arg), NULL) |
Transfer call. This can also be accomplished by ftdm_channel_call_indicate with FTDM_CHANNEL_INDICATE_TRANSFER, in both cases you will get a FTDM_SIGEVENT_INDICATION_COMPLETED when the indication is sent (or an error occurs). Just as with ftdm_channel_call_indicate you won't receive FTDM_SIGEVENT_INDICATION_COMPLETED when this function returns anything else than FTDM_SUCCESS.
#define ftdm_channel_call_transfer_ex | ( | ftdmchan, | |||
arg, | |||||
usrmsg | ) | _ftdm_channel_call_transfer(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (arg), (usrmsg)) |
#define ftdm_channel_call_unhold | ( | ftdmchan | ) | _ftdm_channel_call_unhold(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL) |
Unhold a call.
#define ftdm_channel_call_unhold_ex | ( | ftdmchan, | |||
usrmsg | ) | _ftdm_channel_call_unhold(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg)) |
#define ftdm_channel_reset | ( | ftdmchan | ) | _ftdm_channel_reset(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL) |
Reset the channel.
#define ftdm_channel_reset_ex | ( | ftdmchan, | |||
usrmsg | ) | _ftdm_channel_reset(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), usrmsg) |
#define ftdm_channel_set_sig_status | ( | ftdmchan, | |||
sigstatus | ) | _ftdm_channel_set_sig_status(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (sigstatus), NULL) |
Set the channel signaling status.
#define ftdm_channel_set_sig_status_ex | ( | ftdmchan, | |||
sigstatus, | |||||
usrmsg | ) | _ftdm_channel_set_sig_status(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (sigstatus), usrmsg) |
#define FTDM_DIGITS_LIMIT 25 |
#define FTDM_INVALID_INT_PARM 0xFF |
#define FTDM_IS_DCHAN | ( | fchan | ) | ((fchan)->type == FTDM_CHAN_TYPE_DQ921 || (fchan)->type == FTDM_CHAN_TYPE_DQ931) |
#define FTDM_IS_DIGITAL_CHANNEL | ( | fchan | ) |
((fchan)->span->trunk_type == FTDM_TRUNK_E1 || \ (fchan)->span->trunk_type == FTDM_TRUNK_T1 || \ (fchan)->span->trunk_type == FTDM_TRUNK_J1 || \ (fchan)->span->trunk_type == FTDM_TRUNK_BRI || \ (fchan)->span->trunk_type == FTDM_TRUNK_BRI_PTMP)
#define FTDM_IS_VOICE_CHANNEL | ( | fchan | ) | ((fchan)->type != FTDM_CHAN_TYPE_DQ921 && (fchan)->type != FTDM_CHAN_TYPE_DQ931) |
#define FTDM_LOG_ALERT FTDM_PRE, FTDM_LOG_LEVEL_ALERT |
#define FTDM_LOG_CRIT FTDM_PRE, FTDM_LOG_LEVEL_CRIT |
#define FTDM_LOG_DEBUG FTDM_PRE, FTDM_LOG_LEVEL_DEBUG |
Log levels.
#define FTDM_LOG_EMERG FTDM_PRE, FTDM_LOG_LEVEL_EMERG |
#define FTDM_LOG_ERROR FTDM_PRE, FTDM_LOG_LEVEL_ERROR |
#define FTDM_LOG_INFO FTDM_PRE, FTDM_LOG_LEVEL_INFO |
#define FTDM_LOG_LEVEL_ALERT 1 |
#define FTDM_LOG_LEVEL_CRIT 2 |
#define FTDM_LOG_LEVEL_DEBUG 7 |
#define FTDM_LOG_LEVEL_EMERG 0 |
#define FTDM_LOG_LEVEL_ERROR 3 |
#define FTDM_LOG_LEVEL_INFO 6 |
#define FTDM_LOG_LEVEL_NOTICE 5 |
#define FTDM_LOG_LEVEL_WARNING 4 |
#define FTDM_LOG_NOTICE FTDM_PRE, FTDM_LOG_LEVEL_NOTICE |
#define FTDM_LOG_WARNING FTDM_PRE, FTDM_LOG_LEVEL_WARNING |
#define FTDM_MAX_CHANNELS_GROUP 2048 |
Max number of channels per hunting group.
#define FTDM_MAX_CHANNELS_PHYSICAL_SPAN 32 |
Max number of channels per physical span.
#define FTDM_MAX_CHANNELS_SPAN FTDM_MAX_CHANNELS_PHYSICAL_SPAN * FTDM_MAX_PHYSICAL_SPANS_PER_LOGICAL_SPAN |
Max number of channels a logical span can contain.
#define FTDM_MAX_GROUPS_INTERFACE FTDM_MAX_SPANS_INTERFACE |
Max number of groups.
#define FTDM_MAX_NAME_STR_SZ 80 |
Thread/Mutex OS abstraction API.
Limit to span names
#define FTDM_MAX_NUMBER_STR_SZ 20 |
Limit to channel number strings.
#define FTDM_MAX_PHYSICAL_SPANS_PER_LOGICAL_SPAN 128 |
Max number of physical spans per logical span.
#define FTDM_MAX_SIG_PARAMETERS 30 |
Max number of key=value pairs to be sent as signaling stack parameters.
#define FTDM_MAX_SPANS_INTERFACE 128 |
Max number of logical spans.
#define FTDM_PRE __FILE__, __FUNCTION__, __LINE__ |
#define FTDM_SILENCE_VALUE | ( | fchan | ) | (fchan)->native_codec == FTDM_CODEC_ULAW ? 255 : (fchan)->native_codec == FTDM_CODEC_ALAW ? 0xD5 : 0x00 |
#define FTDM_TAG_END NULL |
#define INDICATION_STRINGS "NONE", "RINGING", "PROCEED", "PROGRESS", "PROGRESS_MEDIA", "BUSY", "ANSWER", "FACILITY", "TRANSFER", "RAW", "INVALID" |
#define NPI_STRINGS "unknown", "ISDN", "data", "telex", "national", "private", "reserved", "invalid" |
#define PRESENTATION_STRINGS "presentation-allowed", "presentation-restricted", "number-not-available", "reserved", "Invalid" |
#define RECONFIG_DBG 1 |
#define SCREENING_STRINGS "user-provided-not-screened", "user-provided-verified-and-passed", "user-provided-verified-and-failed", "network-provided", "invalid" |
#define SIGNAL_STRINGS |
"START", "STOP", "RELEASED", "UP", "FLASH", "PROCEED", "RINGING", "PROGRESS", \ "PROGRESS_MEDIA", "ALARM_TRAP", "ALARM_CLEAR", \ "COLLECTED_DIGIT", "ADD_CALL", "RESTART", "SIGSTATUS_CHANGED", "FACILITY", \ "TRACE", "TRACE_RAW", "INDICATION_COMPLETED", "DIALING", "TRANSFER_COMPLETED", "SMS", "IO_INDATA", "RAW", "INVALID"
#define SIGSTATUS_STRINGS "DOWN", "SUSPENDED", "UP", "INVALID" |
#define TON_STRINGS "unknown", "international", "national", "network-specific", "subscriber-number", "abbreviated-number", "reserved", "invalid" |
#define TRACE_DIR_STRINGS "INCOMING", "OUTGOING", "INVALID" |
#define TRACE_TYPE_STRINGS "Q931", "Q921", "INVALID" |
#define TRANSFER_RESPONSE_STRINGS "transfer-ok", "cp-drop-off", "limits-exceeded", "invalid-num", "invalid-command", "timeout", "invalid" |
#define TRUNK_STRINGS "E1", "T1", "J1", "BRI", "BRI_PTMP", "FXO", "FXS", "EM", "GSM", "NONE" |
#define USER_LAYER1_PROT_STRINGS "V.110", "ulaw", "alaw", "Invalid" |
typedef ftdm_status_t(* fio_api_t)(ftdm_stream_handle_t *stream, const char *data) |
typedef ftdm_status_t(* fio_channel_destroy_t)(ftdm_channel_t *ftdmchan) |
typedef ftdm_status_t(* fio_channel_get_sig_status_t)(ftdm_channel_t *ftdmchan, ftdm_signaling_status_t *status) |
typedef ftdm_status_t(* fio_channel_indicate_t)(ftdm_channel_t *ftdmchan, ftdm_channel_indication_t indication) |
typedef ftdm_status_t(* fio_channel_next_event_t)(ftdm_channel_t *ftdmchan, ftdm_event_t **event) |
typedef ftdm_status_t(* fio_channel_outgoing_call_t)(ftdm_channel_t *ftdmchan) |
typedef ftdm_status_t(* fio_channel_request_t)(ftdm_span_t *span, uint32_t chan_id, ftdm_direction_t direction, ftdm_caller_data_t *caller_data, ftdm_channel_t **ftdmchan) |
FreeTDM I/O layer interface function typedefs You don't need these unless your implementing an I/O interface module (most users don't).
typedef ftdm_status_t(* fio_channel_set_sig_status_t)(ftdm_channel_t *ftdmchan, ftdm_signaling_status_t status) |
typedef ftdm_status_t(* fio_close_t)(ftdm_channel_t *ftdmchan) |
typedef ftdm_status_t(* fio_codec_t)(void *data, ftdm_size_t max, ftdm_size_t *datalen) |
typedef ftdm_status_t(* fio_command_t)(ftdm_channel_t *ftdmchan, ftdm_command_t command, void *obj) |
typedef ftdm_status_t(* fio_configure_span_signaling_t)(ftdm_span_t *span, fio_signal_cb_t sig_cb, ftdm_conf_parameter_t *ftdm_parameters) |
typedef ftdm_status_t(* fio_configure_span_t)(ftdm_span_t *span, const char *str, ftdm_chan_type_t type, char *name, char *number) |
typedef ftdm_status_t(* fio_configure_t)(const char *category, const char *var, const char *val, int lineno) |
typedef ftdm_status_t(* fio_event_cb_t)(ftdm_channel_t *ftdmchan, ftdm_event_t *event) |
typedef ftdm_status_t(* fio_get_alarms_t)(ftdm_channel_t *ftdmchan) |
typedef ftdm_status_t(* fio_io_load_t)(ftdm_io_interface_t **fio) |
typedef ftdm_status_t(* fio_io_unload_t)(void) |
typedef ftdm_status_t(* fio_open_t)(ftdm_channel_t *ftdmchan) |
typedef ftdm_status_t(* fio_read_t)(ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen) |
typedef ftdm_status_t(* fio_sig_configure_t)(ftdm_span_t *span, fio_signal_cb_t sig_cb, va_list ap) |
typedef ftdm_status_t(* fio_sig_load_t)(void) |
typedef ftdm_status_t(* fio_sig_unload_t)(void) |
typedef ftdm_status_t(* fio_signal_cb_t)(ftdm_sigmsg_t *sigmsg) |
Callback for signal delivery (FTDM_SIGEVENT_START and friends).
typedef ftdm_status_t(* fio_span_destroy_t)(ftdm_span_t *span) |
typedef ftdm_status_t(* fio_span_get_sig_status_t)(ftdm_span_t *span, ftdm_signaling_status_t *status) |
typedef ftdm_status_t(* fio_span_next_event_t)(ftdm_span_t *span, ftdm_event_t **event) |
typedef ftdm_status_t(* fio_span_poll_event_t)(ftdm_span_t *span, uint32_t ms, short *poll_events) |
typedef ftdm_status_t(* fio_span_set_sig_status_t)(ftdm_span_t *span, ftdm_signaling_status_t status) |
typedef ftdm_status_t(* fio_wait_t)(ftdm_channel_t *ftdmchan, ftdm_wait_flag_t *flags, int32_t to) |
typedef ftdm_status_t(* fio_write_t)(ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen) |
typedef struct ftdm_caller_data ftdm_caller_data_t |
Caller information.
typedef void*(* ftdm_calloc_func_t)(void *pool, ftdm_size_t elements, ftdm_size_t len) |
typedef struct ftdm_conf_parameter ftdm_conf_parameter_t |
Signaling configuration parameter for the stacks (variable=value pair).
typedef void(* ftdm_free_func_t)(void *pool, void *ptr) |
typedef ftdm_status_t(* ftdm_hunt_result_cb_t)(ftdm_channel_t *fchan, ftdm_caller_data_t *caller_data) |
Function called before placing the call in the hunted channel The user can have a last saying in whether to proceed or abort the call attempt. Be aware that this callback will be called with the channel lock and you must not do any blocking operations during its execution.
fchan | The channel that will be used to place the call | |
caller_data | The caller data provided to ftdm_call_place |
typedef struct ftdm_iterator ftdm_iterator_t |
Opaque general purpose iterator.
typedef void*(* ftdm_malloc_func_t)(void *pool, ftdm_size_t len) |
Custom memory handler hooks. Not recommended to use unless you need memory allocation customizations.
typedef void*(* ftdm_queue_dequeue_func_t)(ftdm_queue_t *queue) |
typedef ftdm_status_t(* ftdm_queue_destroy_func_t)(ftdm_queue_t **queue) |
typedef ftdm_status_t(* ftdm_queue_enqueue_func_t)(ftdm_queue_t *queue, void *obj) |
typedef ftdm_status_t(* ftdm_queue_get_interrupt_func_t)(ftdm_queue_t *queue, ftdm_interrupt_t **interrupt) |
typedef struct ftdm_queue_handler ftdm_queue_handler_t |
typedef ftdm_status_t(* ftdm_queue_wait_func_t)(ftdm_queue_t *queue, int ms) |
typedef void*(* ftdm_realloc_func_t)(void *pool, void *buff, ftdm_size_t len) |
typedef void* ftdm_variable_container_t |
enum ftdm_alarm_flag_t |
FreeTDM supported hardware alarms.
FTDM_ALARM_NONE | |
FTDM_ALARM_RED | |
FTDM_ALARM_YELLOW | |
FTDM_ALARM_RAI | |
FTDM_ALARM_BLUE | |
FTDM_ALARM_AIS | |
FTDM_ALARM_GENERAL |
00917 { 00918 FTDM_ALARM_NONE = 0, 00919 FTDM_ALARM_RED = (1 << 0), 00920 FTDM_ALARM_YELLOW = (1 << 1), 00921 FTDM_ALARM_RAI = (1 << 2), 00922 FTDM_ALARM_BLUE = (1 << 3), 00923 FTDM_ALARM_AIS = (1 << 4), 00924 FTDM_ALARM_GENERAL = (1 << 30) 00925 } ftdm_alarm_flag_t;
enum ftdm_call_cause_t |
Hangup cause codes.
00085 { 00086 FTDM_CAUSE_NONE = 0, 00087 FTDM_CAUSE_UNALLOCATED = 1, 00088 FTDM_CAUSE_NO_ROUTE_TRANSIT_NET = 2, 00089 FTDM_CAUSE_NO_ROUTE_DESTINATION = 3, 00090 FTDM_CAUSE_SEND_SPECIAL_INFO_TONE = 4, 00091 FTDM_CAUSE_MISDIALED_TRUNK_PREFIX = 5, 00092 FTDM_CAUSE_CHANNEL_UNACCEPTABLE = 6, 00093 FTDM_CAUSE_CALL_AWARDED_DELIVERED = 7, 00094 FTDM_CAUSE_PREEMPTION = 8, 00095 FTDM_CAUSE_PREEMPTION_CIRCUIT_RESERVED = 9, 00096 FTDM_CAUSE_NORMAL_CLEARING = 16, 00097 FTDM_CAUSE_USER_BUSY = 17, 00098 FTDM_CAUSE_NO_USER_RESPONSE = 18, 00099 FTDM_CAUSE_NO_ANSWER = 19, 00100 FTDM_CAUSE_SUBSCRIBER_ABSENT = 20, 00101 FTDM_CAUSE_CALL_REJECTED = 21, 00102 FTDM_CAUSE_NUMBER_CHANGED = 22, 00103 FTDM_CAUSE_REDIRECTION_TO_NEW_DESTINATION = 23, 00104 FTDM_CAUSE_EXCHANGE_ROUTING_ERROR = 25, 00105 FTDM_CAUSE_DESTINATION_OUT_OF_ORDER = 27, 00106 FTDM_CAUSE_INVALID_NUMBER_FORMAT = 28, 00107 FTDM_CAUSE_FACILITY_REJECTED = 29, 00108 FTDM_CAUSE_RESPONSE_TO_STATUS_ENQUIRY = 30, 00109 FTDM_CAUSE_NORMAL_UNSPECIFIED = 31, 00110 FTDM_CAUSE_NORMAL_CIRCUIT_CONGESTION = 34, 00111 FTDM_CAUSE_NETWORK_OUT_OF_ORDER = 38, 00112 FTDM_CAUSE_PERMANENT_FRAME_MODE_CONNECTION_OOS = 39, 00113 FTDM_CAUSE_PERMANENT_FRAME_MODE_OPERATIONAL = 40, 00114 FTDM_CAUSE_NORMAL_TEMPORARY_FAILURE = 41, 00115 FTDM_CAUSE_SWITCH_CONGESTION = 42, 00116 FTDM_CAUSE_ACCESS_INFO_DISCARDED = 43, 00117 FTDM_CAUSE_REQUESTED_CHAN_UNAVAIL = 44, 00118 FTDM_CAUSE_PRE_EMPTED = 45, 00119 FTDM_CAUSE_PRECEDENCE_CALL_BLOCKED = 46, 00120 FTDM_CAUSE_RESOURCE_UNAVAILABLE_UNSPECIFIED = 47, 00121 FTDM_CAUSE_QOS_NOT_AVAILABLE = 49, 00122 FTDM_CAUSE_FACILITY_NOT_SUBSCRIBED = 50, 00123 FTDM_CAUSE_OUTGOING_CALL_BARRED = 53, 00124 FTDM_CAUSE_INCOMING_CALL_BARRED = 55, 00125 FTDM_CAUSE_BEARERCAPABILITY_NOTAUTH = 57, 00126 FTDM_CAUSE_BEARERCAPABILITY_NOTAVAIL = 58, 00127 FTDM_CAUSE_INCONSISTENCY_IN_INFO = 62, 00128 FTDM_CAUSE_SERVICE_UNAVAILABLE = 63, 00129 FTDM_CAUSE_BEARERCAPABILITY_NOTIMPL = 65, 00130 FTDM_CAUSE_CHAN_NOT_IMPLEMENTED = 66, 00131 FTDM_CAUSE_FACILITY_NOT_IMPLEMENTED = 69, 00132 FTDM_CAUSE_ONLY_DIGITAL_INFO_BC_AVAIL = 70, 00133 FTDM_CAUSE_SERVICE_NOT_IMPLEMENTED = 79, 00134 FTDM_CAUSE_INVALID_CALL_REFERENCE = 81, 00135 FTDM_CAUSE_IDENTIFIED_CHAN_NOT_EXIST = 82, 00136 FTDM_CAUSE_SUSPENDED_CALL_EXISTS_BUT_CALL_ID_DOES_NOT = 83, 00137 FTDM_CAUSE_CALL_ID_IN_USE = 84, 00138 FTDM_CAUSE_NO_CALL_SUSPENDED = 85, 00139 FTDM_CAUSE_CALL_WITH_CALL_ID_CLEARED = 86, 00140 FTDM_CAUSE_USER_NOT_CUG = 87, 00141 FTDM_CAUSE_INCOMPATIBLE_DESTINATION = 88, 00142 FTDM_CAUSE_NON_EXISTENT_CUG = 90, 00143 FTDM_CAUSE_INVALID_TRANSIT_NETWORK_SELECTION = 91, 00144 FTDM_CAUSE_INVALID_MSG_UNSPECIFIED = 95, 00145 FTDM_CAUSE_MANDATORY_IE_MISSING = 96, 00146 FTDM_CAUSE_MESSAGE_TYPE_NONEXIST = 97, 00147 FTDM_CAUSE_WRONG_MESSAGE = 98, 00148 FTDM_CAUSE_IE_NONEXIST = 99, 00149 FTDM_CAUSE_INVALID_IE_CONTENTS = 100, 00150 FTDM_CAUSE_WRONG_CALL_STATE = 101, 00151 FTDM_CAUSE_RECOVERY_ON_TIMER_EXPIRE = 102, 00152 FTDM_CAUSE_MANDATORY_IE_LENGTH_ERROR = 103, 00153 FTDM_CAUSE_MSG_WITH_UNRECOGNIZED_PARAM_DISCARDED = 110, 00154 FTDM_CAUSE_PROTOCOL_ERROR = 111, 00155 FTDM_CAUSE_INTERWORKING = 127, 00156 FTDM_CAUSE_SUCCESS = 142, 00157 FTDM_CAUSE_ORIGINATOR_CANCEL = 487, 00158 FTDM_CAUSE_CRASH = 500, 00159 FTDM_CAUSE_SYSTEM_SHUTDOWN = 501, 00160 FTDM_CAUSE_LOSE_RACE = 502, 00161 FTDM_CAUSE_MANAGER_REQUEST = 503, 00162 FTDM_CAUSE_BLIND_TRANSFER = 600, 00163 FTDM_CAUSE_ATTENDED_TRANSFER = 601, 00164 FTDM_CAUSE_ALLOTTED_TIMEOUT = 602, 00165 FTDM_CAUSE_USER_CHALLENGE = 603, 00166 FTDM_CAUSE_MEDIA_TIMEOUT = 604 00167 } ftdm_call_cause_t;
enum ftdm_chan_type_t |
I/O channel type.
00178 { 00179 FTDM_CHAN_TYPE_B, 00180 FTDM_CHAN_TYPE_DQ921, 00181 FTDM_CHAN_TYPE_DQ931, 00182 FTDM_CHAN_TYPE_FXS, 00183 FTDM_CHAN_TYPE_FXO, 00184 FTDM_CHAN_TYPE_EM, 00185 FTDM_CHAN_TYPE_CAS, 00186 FTDM_CHAN_TYPE_COUNT 00187 } ftdm_chan_type_t;
FreeTDM supported indications. This is used during incoming calls when you want to request the signaling stack to notify about indications occurring locally. See ftdm_channel_call_indicate for more info.
00576 { 00577 FTDM_CHANNEL_INDICATE_NONE, 00578 FTDM_CHANNEL_INDICATE_RINGING, 00579 FTDM_CHANNEL_INDICATE_PROCEED, 00580 FTDM_CHANNEL_INDICATE_PROGRESS, 00581 FTDM_CHANNEL_INDICATE_PROGRESS_MEDIA, 00582 FTDM_CHANNEL_INDICATE_BUSY, 00583 /* Using this indication is equivalent to call ftdm_channel_call_answer API */ 00584 FTDM_CHANNEL_INDICATE_ANSWER, 00585 FTDM_CHANNEL_INDICATE_FACILITY, 00586 FTDM_CHANNEL_INDICATE_TRANSFER, 00587 /* Signalling specific indications */ 00588 FTDM_CHANNEL_INDICATE_RAW, 00589 FTDM_CHANNEL_INDICATE_INVALID, 00590 } ftdm_channel_indication_t;
enum ftdm_codec_t |
FreeTDM supported I/O codecs.
00909 { 00910 FTDM_CODEC_ULAW = 0, 00911 FTDM_CODEC_ALAW = 8, 00912 FTDM_CODEC_SLIN = 10, 00913 FTDM_CODEC_NONE = (1 << 30) 00914 } ftdm_codec_t;
enum ftdm_command_t |
Channel commands that can be executed through ftdm_channel_command().
00659 { 00660 FTDM_COMMAND_NOOP = 0, 00661 FTDM_COMMAND_SET_INTERVAL = 1, 00662 FTDM_COMMAND_GET_INTERVAL = 2, 00663 FTDM_COMMAND_SET_CODEC = 3, 00664 FTDM_COMMAND_GET_CODEC = 4, 00665 FTDM_COMMAND_SET_NATIVE_CODEC = 5, 00666 FTDM_COMMAND_GET_NATIVE_CODEC = 6, 00667 FTDM_COMMAND_ENABLE_DTMF_DETECT = 7, 00668 FTDM_COMMAND_DISABLE_DTMF_DETECT = 8, 00669 FTDM_COMMAND_SEND_DTMF = 9, 00670 FTDM_COMMAND_SET_DTMF_ON_PERIOD = 10, 00671 FTDM_COMMAND_GET_DTMF_ON_PERIOD = 11, 00672 FTDM_COMMAND_SET_DTMF_OFF_PERIOD = 12, 00673 FTDM_COMMAND_GET_DTMF_OFF_PERIOD = 13, 00674 FTDM_COMMAND_GENERATE_RING_ON = 14, 00675 FTDM_COMMAND_GENERATE_RING_OFF = 15, 00676 FTDM_COMMAND_OFFHOOK = 16, 00677 FTDM_COMMAND_ONHOOK = 17, 00678 FTDM_COMMAND_FLASH = 18, 00679 FTDM_COMMAND_WINK = 19, 00680 FTDM_COMMAND_ENABLE_PROGRESS_DETECT = 20, 00681 FTDM_COMMAND_DISABLE_PROGRESS_DETECT = 21, 00682 00684 FTDM_COMMAND_TRACE_INPUT = 22, 00685 FTDM_COMMAND_TRACE_OUTPUT = 23, 00686 00688 FTDM_COMMAND_TRACE_END_ALL = 24, 00689 00691 FTDM_COMMAND_ENABLE_DEBUG_DTMF = 25, 00692 00694 FTDM_COMMAND_DISABLE_DEBUG_DTMF = 26, 00695 00697 FTDM_COMMAND_ENABLE_INPUT_DUMP = 27, 00698 00700 FTDM_COMMAND_DISABLE_INPUT_DUMP = 28, 00701 00703 FTDM_COMMAND_ENABLE_OUTPUT_DUMP = 29, 00704 00706 FTDM_COMMAND_DISABLE_OUTPUT_DUMP = 30, 00707 00709 FTDM_COMMAND_DUMP_INPUT = 31, 00710 00712 FTDM_COMMAND_DUMP_OUTPUT = 32, 00713 00714 FTDM_COMMAND_ENABLE_CALLERID_DETECT = 33, 00715 FTDM_COMMAND_DISABLE_CALLERID_DETECT = 34, 00716 FTDM_COMMAND_ENABLE_ECHOCANCEL = 35, 00717 FTDM_COMMAND_DISABLE_ECHOCANCEL = 36, 00718 FTDM_COMMAND_ENABLE_ECHOTRAIN = 37, 00719 FTDM_COMMAND_DISABLE_ECHOTRAIN = 38, 00720 FTDM_COMMAND_SET_CAS_BITS = 39, 00721 FTDM_COMMAND_GET_CAS_BITS = 40, 00722 FTDM_COMMAND_SET_RX_GAIN = 41, 00723 FTDM_COMMAND_GET_RX_GAIN = 42, 00724 FTDM_COMMAND_SET_TX_GAIN = 43, 00725 FTDM_COMMAND_GET_TX_GAIN = 44, 00726 FTDM_COMMAND_FLUSH_TX_BUFFERS = 45, 00727 FTDM_COMMAND_FLUSH_RX_BUFFERS = 46, 00728 FTDM_COMMAND_FLUSH_BUFFERS = 47, 00729 00731 FTDM_COMMAND_FLUSH_IOSTATS = 48, 00732 00733 FTDM_COMMAND_SET_PRE_BUFFER_SIZE = 49, 00734 FTDM_COMMAND_SET_LINK_STATUS = 50, 00735 FTDM_COMMAND_GET_LINK_STATUS = 51, 00736 FTDM_COMMAND_ENABLE_LOOP = 52, 00737 FTDM_COMMAND_DISABLE_LOOP = 53, 00738 FTDM_COMMAND_SET_RX_QUEUE_SIZE = 54, 00739 FTDM_COMMAND_SET_TX_QUEUE_SIZE = 55, 00740 FTDM_COMMAND_SET_POLARITY = 56, 00741 FTDM_COMMAND_START_MF_PLAYBACK = 57, 00742 FTDM_COMMAND_STOP_MF_PLAYBACK = 58, 00743 00745 FTDM_COMMAND_GET_IOSTATS = 59, 00747 FTDM_COMMAND_SWITCH_IOSTATS = 60, 00748 00750 FTDM_COMMAND_ENABLE_DTMF_REMOVAL = 61, 00751 FTDM_COMMAND_DISABLE_DTMF_REMOVAL = 62, 00752 00753 FTDM_COMMAND_COUNT, 00754 } ftdm_command_t;
enum ftdm_crash_policy_t |
Crash policy Useful for debugging only, default policy is never, if you wish to crash on asserts then use ftdm_global_set_crash_policy.
00643 { 00644 FTDM_CRASH_NEVER = 0, 00645 FTDM_CRASH_ON_ASSERT 00646 } ftdm_crash_policy_t;
enum ftdm_direction_t |
Hunting direction (when hunting for free channels).
00170 { 00171 FTDM_TOP_DOWN, 00172 FTDM_BOTTOM_UP, 00173 FTDM_RR_DOWN, 00174 FTDM_RR_UP, 00175 } ftdm_direction_t;
enum ftdm_hunt_mode_t |
Hunting mode.
FTDM_HUNT_SPAN |
Hunt channels in a given span |
FTDM_HUNT_GROUP |
Hunt channels in a given group |
FTDM_HUNT_CHAN |
Hunt for a specific channel |
00392 { 00393 FTDM_HUNT_SPAN, 00394 FTDM_HUNT_GROUP, 00395 FTDM_HUNT_CHAN, 00396 } ftdm_hunt_mode_t;
IO Error statistics.
FTDM_IOSTATS_ERROR_CRC | |
FTDM_IOSTATS_ERROR_FRAME | |
FTDM_IOSTATS_ERROR_ABORT | |
FTDM_IOSTATS_ERROR_FIFO | |
FTDM_IOSTATS_ERROR_DMA | |
FTDM_IOSTATS_ERROR_QUEUE_THRES | |
FTDM_IOSTATS_ERROR_QUEUE_FULL |
00938 { 00939 FTDM_IOSTATS_ERROR_CRC = (1 << 0), 00940 FTDM_IOSTATS_ERROR_FRAME = (1 << 1), 00941 FTDM_IOSTATS_ERROR_ABORT = (1 << 2), 00942 FTDM_IOSTATS_ERROR_FIFO = (1 << 3), 00943 FTDM_IOSTATS_ERROR_DMA = (1 << 4), 00944 FTDM_IOSTATS_ERROR_QUEUE_THRES = (1 << 5), /* Queue reached high threshold */ 00945 FTDM_IOSTATS_ERROR_QUEUE_FULL = (1 << 6), /* Queue is full */ 00946 } ftdm_iostats_error_type_t;
MF generation direction flags.
00932 { 00933 FTDM_MF_DIRECTION_FORWARD = (1 << 8), 00934 FTDM_MF_DIRECTION_BACKWARD = (1 << 9) 00935 } ftdm_mf_direction_flag_t;
enum ftdm_polarity_t |
00756 { 00757 FTDM_POLARITY_FORWARD = 0, 00758 FTDM_POLARITY_REVERSE = 1 00759 } ftdm_polarity_t;
enum ftdm_signal_event_t |
Signaling messages sent by the stacks.
00446 { 00447 FTDM_SIGEVENT_START, 00448 FTDM_SIGEVENT_STOP, 00449 FTDM_SIGEVENT_RELEASED, 00450 FTDM_SIGEVENT_UP, 00451 FTDM_SIGEVENT_FLASH, 00452 FTDM_SIGEVENT_PROCEED, 00453 FTDM_SIGEVENT_RINGING, 00454 FTDM_SIGEVENT_ALERTING, 00455 FTDM_SIGEVENT_PROGRESS, 00456 FTDM_SIGEVENT_PROGRESS_MEDIA, 00457 FTDM_SIGEVENT_ALARM_TRAP, 00458 FTDM_SIGEVENT_ALARM_CLEAR, 00459 FTDM_SIGEVENT_COLLECTED_DIGIT, 00460 FTDM_SIGEVENT_ADD_CALL, 00461 FTDM_SIGEVENT_RESTART, 00462 FTDM_SIGEVENT_SIGSTATUS_CHANGED, 00463 FTDM_SIGEVENT_FACILITY, 00464 FTDM_SIGEVENT_TRACE, 00465 FTDM_SIGEVENT_TRACE_RAW, 00466 FTDM_SIGEVENT_INDICATION_COMPLETED, 00467 FTDM_SIGEVENT_DIALING, 00468 FTDM_SIGEVENT_TRANSFER_COMPLETED, 00469 FTDM_SIGEVENT_SMS, 00470 FTDM_SIGEVENT_IO_INDATA, 00471 FTDM_SIGEVENT_RAW, 00472 FTDM_SIGEVENT_INVALID, 00473 } ftdm_signal_event_t;
Signaling status on a given span or specific channel on protocols that support it.
00518 { 00519 /* The signaling link is down (no d-chans up in the span/group, MFC-R2 bit pattern unidentified) */ 00520 FTDM_SIG_STATE_DOWN, 00521 /* The signaling link is suspended (MFC-R2 bit pattern blocked, ss7 blocked?) */ 00522 FTDM_SIG_STATE_SUSPENDED, 00523 /* The signaling link is ready and calls can be placed (ie: d-chan up) */ 00524 FTDM_SIG_STATE_UP, 00525 /* Invalid status */ 00526 FTDM_SIG_STATE_INVALID 00527 } ftdm_signaling_status_t;
enum ftdm_ton_t |
Type Of Number (TON).
FTDM_TON_UNKNOWN | |
FTDM_TON_INTERNATIONAL | |
FTDM_TON_NATIONAL | |
FTDM_TON_NETWORK_SPECIFIC | |
FTDM_TON_SUBSCRIBER_NUMBER | |
FTDM_TON_ABBREVIATED_NUMBER | |
FTDM_TON_RESERVED | |
FTDM_TON_INVALID |
00233 { 00234 FTDM_TON_UNKNOWN = 0, 00235 FTDM_TON_INTERNATIONAL, 00236 FTDM_TON_NATIONAL, 00237 FTDM_TON_NETWORK_SPECIFIC, 00238 FTDM_TON_SUBSCRIBER_NUMBER, 00239 FTDM_TON_ABBREVIATED_NUMBER, 00240 FTDM_TON_RESERVED, 00241 FTDM_TON_INVALID 00242 } ftdm_ton_t;
enum ftdm_tone_type_t |
Tone type.
00441 { 00442 FTDM_TONE_DTMF = (1 << 0) 00443 } ftdm_tone_type_t;
enum ftdm_trace_dir_t |
00539 { 00540 /* This is an received frame */ 00541 FTDM_TRACE_DIR_INCOMING, 00542 /* This is a transmitted frame */ 00543 FTDM_TRACE_DIR_OUTGOING, 00544 /* Invalid */ 00545 FTDM_TRACE_DIR_INVALID, 00546 } ftdm_trace_dir_t;
ftdm_status_t _ftdm_call_place | ( | const char * | file, | |
const char * | func, | |||
int | line, | |||
ftdm_caller_data_t * | caller_data, | |||
ftdm_hunting_scheme_t * | hunting, | |||
ftdm_usrmsg_t * | usrmsg | |||
) |
Place an outgoing call with the given caller data in a channel according to the hunting scheme provided and records the place where it was called. See ftdm_call_place for an easy to use macro.
ftdm_status_t _ftdm_channel_call_answer | ( | const char * | file, | |
const char * | func, | |||
int | line, | |||
ftdm_channel_t * | ftdmchan, | |||
ftdm_usrmsg_t * | usrmsg | |||
) |
Answer call recording the source code point where the it was called (see ftdm_channel_call_answer for an easy to use macro).
ftdm_status_t _ftdm_channel_call_hangup | ( | const char * | file, | |
const char * | func, | |||
int | line, | |||
ftdm_channel_t * | ftdmchan, | |||
ftdm_usrmsg_t * | usrmsg | |||
) |
Hangup the call without cause recording the source code point where it was called (see ftdm_channel_call_hangup for an easy to use macro).
ftdm_status_t _ftdm_channel_call_hangup_with_cause | ( | const char * | file, | |
const char * | func, | |||
int | line, | |||
ftdm_channel_t * | ftdmchan, | |||
ftdm_call_cause_t | , | |||
ftdm_usrmsg_t * | usrmsg | |||
) |
Hangup the call with cause recording the source code point where it was called (see ftdm_channel_call_hangup_with_cause for an easy to use macro).
ftdm_status_t _ftdm_channel_call_hold | ( | const char * | file, | |
const char * | func, | |||
int | line, | |||
ftdm_channel_t * | ftdmchan, | |||
ftdm_usrmsg_t * | usrmsg | |||
) |
Put a call on hold recording the source code point where it was called (see ftdm_channel_call_hold for an easy to use macro).
ftdm_status_t _ftdm_channel_call_indicate | ( | const char * | file, | |
const char * | func, | |||
int | line, | |||
ftdm_channel_t * | ftdmchan, | |||
ftdm_channel_indication_t | indication, | |||
ftdm_usrmsg_t * | usrmsg | |||
) |
Indicate a new condition in an incoming call recording the source code point where it was called (see ftdm_channel_call_indicate for an easy to use macro).
ftdm_status_t _ftdm_channel_call_place | ( | const char * | file, | |
const char * | func, | |||
int | line, | |||
ftdm_channel_t * | ftdmchan, | |||
ftdm_usrmsg_t * | usrmsg | |||
) |
Place an outgoing call recording the source code point where it was called (see ftdm_channel_call_place for an easy to use macro).
ftdm_status_t _ftdm_channel_call_transfer | ( | const char * | file, | |
const char * | func, | |||
int | line, | |||
ftdm_channel_t * | ftdmchan, | |||
const char * | arg, | |||
ftdm_usrmsg_t * | usrmsg | |||
) |
Answer call recording the source code point where the it was called (see ftdm_channel_call_tranasfer for an easy to use macro).
ftdm_status_t _ftdm_channel_call_unhold | ( | const char * | file, | |
const char * | func, | |||
int | line, | |||
ftdm_channel_t * | ftdmchan, | |||
ftdm_usrmsg_t * | usrmsg | |||
) |
Unhold a call recording the source code point where it was called (see ftdm_channel_call_unhold for an easy to use macro).
ftdm_status_t _ftdm_channel_reset | ( | const char * | file, | |
const char * | func, | |||
int | line, | |||
ftdm_channel_t * | ftdmchan, | |||
ftdm_usrmsg_t * | usrmsg | |||
) |
Reset the channel (see _ftdm_channel_reset for an easy to use macro).
ftdm_status_t _ftdm_channel_set_sig_status | ( | const char * | file, | |
const char * | func, | |||
int | line, | |||
ftdm_channel_t * | ftdmchan, | |||
ftdm_signaling_status_t | status, | |||
ftdm_usrmsg_t * | usrmsg | |||
) |
Set channel signaling status (ie: put specific circuit down) only if supported by the signaling (see ftdm_channel_set_sig_stauts for an easy to use macro)
FT_DECLARE_NONSTD | ( | ftdm_status_t | ) |
Basic transcoding functions.
char* ftdm_api_execute | ( | const char * | cmd | ) |
Execute a text command. The text command output will be returned and must be free'd.
cmd | The command to execute |
FTDM_SUCCESS | success | |
FTDM_FAIL | failure |
ftdm_status_t ftdm_channel_add_to_group | ( | const char * | name, | |
ftdm_channel_t * | ftdmchan | |||
) |
Add the channel to a hunt group.
ftdm_status_t ftdm_channel_add_token | ( | ftdm_channel_t * | ftdmchan, | |
char * | token, | |||
int | end | |||
) |
Add a new token to the channel.
ftdmchan | The channel where the token will be added | |
token | The token string to add | |
end | if 0, the token will be added at the beginning of the token list, to the end otherwise |
FTDM_SUCCESS | success | |
FTDM_FAIL | failure |
ftdm_bool_t ftdm_channel_call_check_answered | ( | const ftdm_channel_t * | ftdmchan | ) |
Check if the call is answered already.
ftdm_bool_t ftdm_channel_call_check_busy | ( | const ftdm_channel_t * | ftdmchan | ) |
Check if the call is busy.
ftdm_bool_t ftdm_channel_call_check_done | ( | const ftdm_channel_t * | ftdmchan | ) |
Check if the call is done (final state for a call, just after hangup).
ftdm_bool_t ftdm_channel_call_check_hangup | ( | const ftdm_channel_t * | ftdmchan | ) |
Check if the call is hangup.
ftdm_bool_t ftdm_channel_call_check_hold | ( | const ftdm_channel_t * | ftdmchan | ) |
Check if the call is in hold.
ftdm_status_t ftdm_channel_clear_token | ( | ftdm_channel_t * | ftdmchan, | |
const char * | token | |||
) |
Remove the given token from the channel.
ftdmchan | The channel where the token is | |
token | The token string. If NULL, all tokens in the channel are cleared |
FTDM_SUCCESS | success | |
FTDM_FAIL | failure |
ftdm_status_t ftdm_channel_close | ( | ftdm_channel_t ** | ftdmchan | ) |
Close a previously open channel.
ftdmchan | pointer to the channel to close |
FTDM_SUCCESS | success (a suitable channel was found available) | |
FTDM_FAIL | failure (no suitable channel was found available) |
ftdm_status_t ftdm_channel_command | ( | ftdm_channel_t * | ftdmchan, | |
ftdm_command_t | command, | |||
void * | arg | |||
) |
Execute a command in a channel (same semantics as the ioctl() unix system call).
ftdmchan | The channel to execute the command | |
command | The command to execute | |
arg | The argument for the command |
FTDM_SUCCESS | success (a suitable channel was found available) | |
FTDM_FAIL | failure (no suitable channel was found available) |
ftdm_size_t ftdm_channel_dequeue_dtmf | ( | ftdm_channel_t * | ftdmchan, | |
char * | dtmf, | |||
ftdm_size_t | len | |||
) |
Dequeue DTMF from the given channel.
ftdmchan | The channel to dequeue DTMF from | |
dtmf | DTMF buffer to store the dtmf (you are responsible for its allocation and deallocation) | |
len | The size of the provided DTMF buffer |
The | size of the dequeued DTMF (it might be zero if there is no DTMF in the queue) |
void ftdm_channel_flush_dtmf | ( | ftdm_channel_t * | ftdmchan | ) |
Flush the DTMF queue.
ftdmchan | The channel to flush the dtmf queue of |
ftdm_status_t ftdm_channel_get_alarms | ( | ftdm_channel_t * | ftdmchan, | |
ftdm_alarm_flag_t * | alarmbits | |||
) |
Get the current alarm bitmask for the channel.
ftdmchan | The channel to get the alarm bitmask from | |
alarmbits | The alarm bitmask pointer to store the current alarms (you are responsible for allocation/deallocation) |
FTDM_SUCCESS | success | |
FTDM_FAIL | failure |
int ftdm_channel_get_availability | ( | ftdm_channel_t * | ftdmchan | ) |
Return the availability rate for a channel.
ftdmchan | Channel to get the availability from |
> | 0 if availability is supported | |
-1 | if availability is not supported |
ftdm_caller_data_t* ftdm_channel_get_caller_data | ( | ftdm_channel_t * | channel | ) |
Get the caller data for a channel, typically you need this when receiving FTDM_SIGEVENT_START.
ftdm_codec_t ftdm_channel_get_codec | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the I/O read/write codec.
ftdmchan | The channel to get the codec from |
The | codec type |
char* ftdm_channel_get_history_str | ( | const ftdm_channel_t * | channel | ) |
For display debugging purposes you can display this string which describes the history of the channel.
channel | The channel to get the history from |
uint32_t ftdm_channel_get_id | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the id associated to the channel.
uint32_t ftdm_channel_get_io_interval | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the I/O read/write interval.
ftdmchan | The channel to get the interval from |
The | interval in milliseconds |
uint32_t ftdm_channel_get_io_packet_len | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the I/O read/write packet length per interval.
ftdmchan | The channel to get the packet length from |
The | packet length interval in bytes |
const char* ftdm_channel_get_last_error | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the last error string for the channel.
ftdmchan | The channel to get the error from |
The | error string (not thread-safe, the string is per channel, not per thread) |
int ftdm_channel_get_last_state | ( | const ftdm_channel_t * | ftdmchan | ) |
Get last state of a channel.
const char* ftdm_channel_get_last_state_str | ( | const ftdm_channel_t * | channel | ) |
For display debugging purposes you can display this string which describes the last channel internal state.
const char* ftdm_channel_get_name | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the name associated to the channel.
const char* ftdm_channel_get_number | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the number associated to the channel.
uint32_t ftdm_channel_get_ph_id | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the number physical id associated to the channel.
uint32_t ftdm_channel_get_ph_span_id | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the physical span id associated to the channel.
void* ftdm_channel_get_private | ( | const ftdm_channel_t * | ftdmchan | ) |
Get user private data in the channel.
ftdmchan | The channel to retrieve the private data |
The | private data (if any or NULL if no data has been stored) |
ftdm_status_t ftdm_channel_get_sig_status | ( | ftdm_channel_t * | ftdmchan, | |
ftdm_signaling_status_t * | status | |||
) |
Get channel signaling status (ie: whether protocol layer is up or down).
ftdm_span_t* ftdm_channel_get_span | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the span pointer associated to the channel.
uint32_t ftdm_channel_get_span_id | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the span pointer associated to the channel.
const char* ftdm_channel_get_span_name | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the span name associated to the channel.
int ftdm_channel_get_state | ( | const ftdm_channel_t * | ftdmchan | ) |
Get current state of a channel.
const char* ftdm_channel_get_state_str | ( | const ftdm_channel_t * | channel | ) |
For display debugging purposes you can display this string which describes the current channel internal state.
const char* ftdm_channel_get_token | ( | const ftdm_channel_t * | ftdmchan, | |
uint32_t | tokenid | |||
) |
Get the requested token.
ftdmchan | The channel where the token is | |
tokenid | The id of the token |
The | token character string | |
NULL | token not found |
uint32_t ftdm_channel_get_token_count | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the token count.
ftdmchan | The channel to get the token count from |
The | token count |
ftdm_chan_type_t ftdm_channel_get_type | ( | const ftdm_channel_t * | ftdmchan | ) |
Get the channel type.
ftdmchan | The channel to get the type from |
channel | type (FXO, FXS, B-channel, D-channel, etc) |
ftdm_status_t ftdm_channel_open | ( | uint32_t | span_id, | |
uint32_t | chan_id, | |||
ftdm_channel_t ** | ftdmchan | |||
) |
Open a channel specifying the span id and chan id (required before placing a call on the channel).
span_id | The span id the channel belongs to | |
chan_id | Logical channel id of the channel you want to open | |
ftdmchan | Pointer to store the channel once is open |
FTDM_SUCCESS | success (the channel was found and is available) | |
FTDM_FAIL | failure (channel was not found or not available) |
ftdm_status_t ftdm_channel_open_by_group | ( | uint32_t | group_id, | |
ftdm_direction_t | direction, | |||
ftdm_caller_data_t * | caller_data, | |||
ftdm_channel_t ** | ftdmchan | |||
) |
Hunts and opens a channel specifying group id.
group_id | The group id to hunt for a channel | |
direction | The hunting direction | |
caller_data | The calling party information | |
ftdmchan | The channel pointer to store the available channel |
FTDM_SUCCESS | success (a suitable channel was found available) | |
FTDM_FAIL | failure (no suitable channel was found available) |
ftdm_status_t ftdm_channel_open_by_span | ( | uint32_t | span_id, | |
ftdm_direction_t | direction, | |||
ftdm_caller_data_t * | caller_data, | |||
ftdm_channel_t ** | ftdmchan | |||
) |
Hunts and opens a channel specifying the span id only.
span_id | The span id to hunt for a channel | |
direction | The hunting direction | |
caller_data | The calling party information | |
ftdmchan | The channel pointer to store the available channel |
FTDM_SUCCESS | success (a suitable channel was found available) | |
FTDM_FAIL | failure (no suitable channel was found available) |
ftdm_status_t ftdm_channel_open_ph | ( | uint32_t | span_id, | |
uint32_t | chan_id, | |||
ftdm_channel_t ** | ftdmchan | |||
) |
Open a channel specifying the span id and physical chan id (required before placing a call on the channel).
span_id | The span id the channel belongs to | |
chan_id | Physical channel id of the channel you want to open | |
ftdmchan | Pointer to store the channel once is open |
FTDM_SUCCESS | success (the channel was found and is available) | |
FTDM_FAIL | failure (channel was not found or not available) |
ftdm_status_t ftdm_channel_read | ( | ftdm_channel_t * | ftdmchan, | |
void * | data, | |||
ftdm_size_t * | datalen | |||
) |
Read data from a channel.
ftdmchan | The channel to read data from | |
data | The pointer to the buffer to store the read data | |
datalen | The size in bytes of the provided buffer |
FTDM_SUCCESS | success (a suitable channel was found available) | |
FTDM_FAIL | failure (no suitable channel was found available) |
ftdm_status_t ftdm_channel_read_event | ( | ftdm_channel_t * | ftdmchan, | |
ftdm_event_t ** | event | |||
) |
Retrieves an event from the span.
ftdmchan | The channel to retrieve the event from | |
event | Pointer to store the pointer to the event |
FTDM_SUCCESS | success (at least one event available) | |
FTDM_FAIL | failure |
ftdm_status_t ftdm_channel_remove_from_group | ( | ftdm_group_t * | group, | |
ftdm_channel_t * | ftdmchan | |||
) |
Remove the channel from a hunt group.
void ftdm_channel_replace_token | ( | ftdm_channel_t * | ftdmchan, | |
const char * | old_token, | |||
const char * | new_token | |||
) |
Replace the given token with the new token.
ftdmchan | The channel where the token is | |
old_token | The token to replace | |
new_token | The token to put in place |
ftdm_status_t ftdm_channel_set_caller_data | ( | ftdm_channel_t * | ftdmchan, | |
ftdm_caller_data_t * | caller_data | |||
) |
Set the caller data for a channel. Be sure to call this before ftdm_channel_call_place().
void ftdm_channel_set_private | ( | ftdm_channel_t * | ftdmchan, | |
void * | pvt | |||
) |
Set user private data in the channel.
ftdmchan | The channel where the private data will be stored | |
pvt | The private pointer to store |
ftdm_status_t ftdm_channel_wait | ( | ftdm_channel_t * | ftdmchan, | |
ftdm_wait_flag_t * | flags, | |||
int32_t | timeout | |||
) |
Wait for I/O events in a channel.
ftdmchan | The channel to wait I/O for | |
flags | The wait I/O flags | |
timeout | The timeout in milliseconds |
FTDM_SUCCESS | success (a suitable channel was found available) | |
FTDM_FAIL | failure (no suitable channel was found available) |
ftdm_status_t ftdm_channel_write | ( | ftdm_channel_t * | ftdmchan, | |
void * | data, | |||
ftdm_size_t | datasize, | |||
ftdm_size_t * | datalen | |||
) |
Write data to a channel.
datalen is a pointer to the size of the actual data that you want to write. This pointer will be updated with the number of bytes actually written.
datasize on the other hand is the size of the entire buffer provided in data, whether all of that buffer is in use or not is a different matter. The difference becomes important only if you are using FreeTDM doing transcoding, for example, providing a ulaw frame of 160 bytes but where the I/O device accepts input in signed linear, the data to write will be 320 bytes, therefore datasize is expected to be at least 320 where datalen would be just 160.
ftdmchan | The channel to write data to | |
data | The pointer to the buffer to write | |
datasize | The maximum number of bytes in data that can be used (in case transcoding is necessary) | |
datalen | The size of the actual data |
FTDM_SUCCESS | success (a suitable channel was found available) | |
FTDM_FAIL | failure (no suitable channel was found available) |
ftdm_status_t ftdm_conf_node_add_param | ( | ftdm_conf_node_t * | node, | |
const char * | param, | |||
const char * | val | |||
) |
Adds a new parameter to the specified configuration node.
node | The configuration node to add the param-val pair to | |
param | The parameter name | |
val | The parameter value |
ftdm_status_t ftdm_conf_node_create | ( | const char * | name, | |
ftdm_conf_node_t ** | node, | |||
ftdm_conf_node_t * | parent | |||
) |
Create a configuration node.
name | The name of the configuration node | |
node | The node pointer to store the new node | |
parent | The parent node if any, or NULL if no parent |
ftdm_status_t ftdm_conf_node_destroy | ( | ftdm_conf_node_t * | node | ) |
Destroy the memory allocated for a configuration node (and all of its descendance).
node | The node to destroy |
ftdm_status_t ftdm_configure_span | ( | ftdm_span_t * | span, | |
const char * | type, | |||
fio_signal_cb_t | sig_cb, | |||
... | ||||
) |
Configure span with a signaling type.
span | The span to configure | |
type | The signaling type ("boost", "isdn" and others, this depends on the available signaling modules) | |
sig_cb | The callback that the signaling stack will use to notify about events | |
... | variable argument list with "var", value sequence, the variable and values are signaling type dependant the last argument must be FTDM_TAG_END |
FTDM_SUCCESS | success | |
FTDM_FAIL | failure |
ftdm_status_t ftdm_configure_span_channels | ( | ftdm_span_t * | span, | |
const char * | str, | |||
ftdm_channel_config_t * | chan_config, | |||
unsigned * | configured | |||
) |
Create and configure channels in the given span.
span | The span container | |
str | The channel range null terminated string. "1-10", "24" etc | |
chan_config | The basic channel configuration for each channel within the range | |
configured | Pointer where the number of channels configured will be stored |
ftdm_status_t ftdm_configure_span_signaling | ( | ftdm_span_t * | span, | |
const char * | type, | |||
fio_signal_cb_t | sig_cb, | |||
ftdm_conf_parameter_t * | parameters | |||
) |
Configure span with a signaling type.
span | The span to configure | |
type | The signaling type ("boost", "isdn" and others, this depends on the available signaling modules) | |
sig_cb | The callback that the signaling stack will use to notify about events | |
parameters | The array if signaling-specific parameters (the last member of the array MUST have its var member set to NULL, ie: .var = NULL) |
FTDM_SUCCESS | success | |
FTDM_FAIL | failure |
int ftdm_get_all_span_list | ( | char * | buffer | ) |
get all span details buffer
input | buffer which will be filled by ftdm with span details |
FTDM_SUCCESS | success | |
FTDM_FAIL | failure |
ftdm_status_t ftdm_get_current_var | ( | ftdm_iterator_t * | iter, | |
const char ** | var_name, | |||
const char ** | var_val | |||
) |
Get variable name and value for the current iterator position.
ftdm_status_t ftdm_global_add_io_interface | ( | ftdm_io_interface_t * | io_interface | ) |
Register a custom I/O interface with the FreeTDM core.
io_interface | the Interface to register |
FTDM_SUCCESS | success | |
FTDM_FAIL | failure |
ftdm_status_t ftdm_global_configuration | ( | void | ) |
Create spans and channels reading the freetdm.conf file.
ftdm_status_t ftdm_global_destroy | ( | void | ) |
Shutdown the library.
ftdm_status_t ftdm_global_init | ( | void | ) |
Initialize the library.
ftdm_status_t ftdm_global_reconfiguration | ( | void | ) |
reading freetdm.conf file and create spans and channels , skip already created spans
void ftdm_global_set_config_directory | ( | const char * | path | ) |
Set the directory to look for configs.
void ftdm_global_set_crash_policy | ( | ftdm_crash_policy_t | policy | ) |
Set the crash policy for the library.
void ftdm_global_set_default_logger | ( | int | level | ) |
Set the default logger level.
void ftdm_global_set_logger | ( | ftdm_logger_t | logger | ) |
Set the logger handler for the library.
ftdm_status_t ftdm_global_set_memory_handler | ( | ftdm_memory_handler_t * | handler | ) |
Set memory handler for the library.
void ftdm_global_set_mod_directory | ( | const char * | path | ) |
Set the directory to look for modules.
ftdm_status_t ftdm_global_set_queue_handler | ( | ftdm_queue_handler_t * | handler | ) |
Override the default queue handler.
ftdm_status_t ftdm_group_channel_use_count | ( | ftdm_group_t * | group, | |
uint32_t * | count | |||
) |
Get the number of channels in use on a group.
ftdm_status_t ftdm_group_create | ( | ftdm_group_t ** | group, | |
const char * | name | |||
) |
Create a group with the given name.
ftdm_status_t ftdm_group_find | ( | uint32_t | id, | |
ftdm_group_t ** | group | |||
) |
Find a hunt group by id.
ftdm_status_t ftdm_group_find_by_name | ( | const char * | name, | |
ftdm_group_t ** | group | |||
) |
Find a hunt group by name.
uint32_t ftdm_group_get_id | ( | const ftdm_group_t * | group | ) |
Get the id of a group.
void* ftdm_iterator_current | ( | ftdm_iterator_t * | iter | ) |
Get iterator current value (depends on the iterator type).
ftdm_status_t ftdm_iterator_free | ( | ftdm_iterator_t * | iter | ) |
Free iterator.
ftdm_iterator_t* ftdm_iterator_next | ( | ftdm_iterator_t * | iter | ) |
Advance iterator.
ftdm_bool_t ftdm_running | ( | void | ) |
Check if the FTDM library is initialized and running.
ftdm_status_t ftdm_sigmsg_get_raw_data | ( | ftdm_sigmsg_t * | sigmsg, | |
void ** | data, | |||
ftdm_size_t * | datalen | |||
) |
Get raw data from sigmsg.
sigmsg | The message structure containing the variables | |
data | data will point to available data pointer if available | |
datalen | datalen will be set to length of data available |
FTDM_SUCCESS | data is available | |
FTDM_FAIL | no data available |
ftdm_status_t ftdm_sigmsg_get_raw_data_detached | ( | ftdm_sigmsg_t * | sigmsg, | |
void ** | data, | |||
ftdm_size_t * | datalen | |||
) |
Get raw data from event.
sigmsg | The message structure containing the variables | |
data | data will point to available data pointer if available | |
datalen | datalen will be set to length of data available |
FTDM_SUCCESS | data is available | |
FTDM_FAIL | no data available |
const char* ftdm_sigmsg_get_var | ( | ftdm_sigmsg_t * | sigmsg, | |
const char * | var_name | |||
) |
Get a custom variable from the sigmsg.
ftdm_iterator_t* ftdm_sigmsg_get_var_iterator | ( | const ftdm_sigmsg_t * | sigmsg, | |
ftdm_iterator_t * | iter | |||
) |
Get an iterator to iterate over the sigmsg variables.
sigmsg | The message structure containing the variables | |
iter | Optional iterator. You can reuse an old iterator (not previously freed) to avoid the extra allocation of a new iterator. |
ftdm_status_t ftdm_span_add_channel | ( | ftdm_span_t * | span, | |
ftdm_socket_t | sockfd, | |||
ftdm_chan_type_t | type, | |||
ftdm_channel_t ** | chan | |||
) |
Add a new channel to a span.
span | Where to add the new channel | |
sockfd | The socket device associated to the channel (ie: sangoma device, dahdi device etc) | |
type | Channel type | |
chan | Pointer to store the newly allocated channel |
FTDM_SUCCESS | success (the channel was created) | |
FTDM_FAIL | failure (span was not created) |
ftdm_status_t ftdm_span_channel_use_count | ( | ftdm_span_t * | span, | |
uint32_t * | count | |||
) |
Get the number of channels in use on a span.
ftdm_status_t ftdm_span_create | ( | const char * | iotype, | |
const char * | name, | |||
ftdm_span_t ** | span | |||
) |
Create a new span (not needed if you are using freetdm.conf).
iotype | The I/O interface type this span will use. This depends on the available I/O modules ftmod_wanpipe = "wanpipe" (Sangoma) ftmod_zt = "zt" (DAHDI or Zaptel) ftmod_pika "pika" (this one is most likely broken) | |
name | Name for the span | |
span | Pointer to store the create span |
FTDM_SUCCESS | success (the span was created) | |
FTDM_FAIL | failure (span was not created) |
ftdm_status_t ftdm_span_delete | ( | ftdm_span_t * | span | ) |
delete span from freetdm delete span from global span hash table frees all ftdm resources associated with span invoke signaling cb "ftdm_span_stop" to stop signaling
span | The span to stop |
FTDM_SUCCESS | success | |
FTDM_FAIL | failure |
ftdm_status_t ftdm_span_find | ( | uint32_t | id, | |
ftdm_span_t ** | span | |||
) |
Find a span by its id.
id | The span id | |
span | Pointer to store the span if found |
FTDM_SUCCESS | success (span is valid) | |
FTDM_FAIL | failure (span is not valid) |
ftdm_status_t ftdm_span_find_by_name | ( | const char * | name, | |
ftdm_span_t ** | span | |||
) |
Find a span by name.
uint32_t ftdm_span_get_chan_count | ( | const ftdm_span_t * | span | ) |
Return the channel count number for the given span.
ftdm_iterator_t* ftdm_span_get_chan_iterator | ( | const ftdm_span_t * | span, | |
ftdm_iterator_t * | iter | |||
) |
Get iterator for the span channels.
span | The span containing the channels | |
iter | Optional iterator. You can reuse an old iterator (not previously freed) to avoid the extra allocation of a new iterator. |
ftdm_channel_t* ftdm_span_get_channel | ( | const ftdm_span_t * | span, | |
uint32_t | chanid | |||
) |
Return the channel identified by the provided logical id.
span | The span where the channel belongs | |
chanid | The logical channel id within the span |
ftdm_channel_t* ftdm_span_get_channel_ph | ( | const ftdm_span_t * | span, | |
uint32_t | chanid | |||
) |
Return the channel identified by the provided physical id.
span | The span where the channel belongs | |
chanid | The physical channel id within the span |
uint32_t ftdm_span_get_id | ( | const ftdm_span_t * | span | ) |
Get the span id.
const char* ftdm_span_get_last_error | ( | const ftdm_span_t * | span | ) |
Get the last error string for the given span.
span | The span to get the last error from |
character | string for the last error |
const char* ftdm_span_get_name | ( | const ftdm_span_t * | span | ) |
Get the span name.
ftdm_status_t ftdm_span_get_sig_status | ( | ftdm_span_t * | span, | |
ftdm_signaling_status_t * | status | |||
) |
Get span signaling status (ie: whether protocol layer is up or down).
ftdm_trunk_type_t ftdm_span_get_trunk_type | ( | const ftdm_span_t * | span | ) |
Get the trunk type for a span.
span | The span |
const char* ftdm_span_get_trunk_type_str | ( | const ftdm_span_t * | span | ) |
For display debugging purposes you can display this string which describes the trunk type of a span.
ftdm_status_t ftdm_span_poll_event | ( | ftdm_span_t * | span, | |
uint32_t | ms, | |||
short * | poll_events | |||
) |
Wait for an event in the span.
span | The span to wait events for | |
ms | Milliseconds timeout | |
poll_events | Array of events to poll for, for each channel on the span |
FTDM_SUCCESS | success (at least one event available) | |
FTDM_TIMEOUT | Timed out waiting for events | |
FTDM_FAIL | failure |
ftdm_status_t ftdm_span_register_signal_cb | ( | ftdm_span_t * | span, | |
fio_signal_cb_t | sig_cb | |||
) |
Register callback to listen for incoming events.
span | The span to register to | |
sig_cb | The callback that the signaling stack will use to notify about events |
FTDM_SUCCESS | success | |
FTDM_FAIL | failure |
ftdm_status_t ftdm_span_set_blocking_mode | ( | const ftdm_span_t * | span, | |
ftdm_bool_t | enabled | |||
) |
Enable/disable blocking mode in the channels for this span.
ftdm_status_t ftdm_span_set_sig_status | ( | ftdm_span_t * | span, | |
ftdm_signaling_status_t | status | |||
) |
Set span signaling status (ie: put the whole span protocol layer down) only if supported by the signaling.
void ftdm_span_set_trunk_type | ( | ftdm_span_t * | span, | |
ftdm_trunk_type_t | type | |||
) |
Set the trunk type for a span This must be called before configuring any channels within the span.
span | The span | |
type | The trunk type |
ftdm_status_t ftdm_span_start | ( | ftdm_span_t * | span | ) |
Start the span signaling (must call ftdm_configure_span_signaling first).
span | The span to start |
FTDM_SUCCESS | success | |
FTDM_FAIL | failure |
ftdm_status_t ftdm_span_stop | ( | ftdm_span_t * | span | ) |
Stop the span signaling (must call ftdm_span_start first).
span | The span to stop |
FTDM_SUCCESS | success | |
FTDM_FAIL | failure |
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_channel_indication | , | |
ftdm_channel_indication2str | , | |||
ftdm_channel_indication_t | ||||
) |
Move from string to ftdm_channel_indication_t and viceversa.
00596 { 00597 /* The indication that was completed */ 00598 ftdm_channel_indication_t indication; 00599 /* Completion status of the indication */ 00600 ftdm_status_t status; 00601 } ftdm_event_indication_completed_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_trace_type | , | |
ftdm_trace_type2str | , | |||
ftdm_trace_type_t | ||||
) |
Move string to ftdm_trace_type_t and viceversa.
00562 { 00563 /* Direction - incoming or outgoing */ 00564 ftdm_trace_dir_t dir; 00565 ftdm_trace_type_t type; 00566 } ftdm_event_trace_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_trace_dir | , | |
ftdm_trace_dir2str | , | |||
ftdm_trace_dir_t | ||||
) |
Move string to ftdm_trace_dir_t and viceversa.
00552 { 00553 FTDM_TRACE_TYPE_Q931, 00554 FTDM_TRACE_TYPE_Q921, 00555 FTDM_TRACE_TYPE_INVALID, 00556 } ftdm_trace_type_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_signaling_status | , | |
ftdm_signaling_status2str | , | |||
ftdm_signaling_status_t | ||||
) |
Move from string to ftdm_signaling_status_t and viceversa.
00534 { 00535 ftdm_signaling_status_t status; 00536 uint8_t raw_reason; /* Signalling specific */ 00537 } ftdm_event_sigstatus_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_trunk_type | , | |
ftdm_trunk_type2str | , | |||
ftdm_trunk_type_t | ||||
) |
Move from string to ftdm_trunk_type_t and viceversa.
Basic channel configuration provided to ftdm_configure_span_channels
00500 { 00501 char name[FTDM_MAX_NAME_STR_SZ]; 00502 char number[FTDM_MAX_NUMBER_STR_SZ]; 00503 char group_name[FTDM_MAX_NAME_STR_SZ]; 00504 ftdm_chan_type_t type; 00505 float rxgain; 00506 float txgain; 00507 uint8_t debugdtmf; 00508 uint8_t dtmf_on_start; 00509 uint32_t dtmfdetect_ms; 00510 int prebuffer_size; 00511 uint8_t iostats; 00512 } ftdm_channel_config_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_signal_event | , | |
ftdm_signal_event2str | , | |||
ftdm_signal_event_t | ||||
) |
Move from string to ftdm_signal_event_t and viceversa.
Span trunk types
00482 { 00483 FTDM_TRUNK_E1, 00484 FTDM_TRUNK_T1, 00485 FTDM_TRUNK_J1, 00486 FTDM_TRUNK_BRI, 00487 FTDM_TRUNK_BRI_PTMP, 00488 FTDM_TRUNK_FXO, 00489 FTDM_TRUNK_FXS, 00490 FTDM_TRUNK_EM, 00491 FTDM_TRUNK_GSM, 00492 FTDM_TRUNK_NONE 00493 } ftdm_trunk_type_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_transfer_response | , | |
ftdm_transfer_response2str | , | |||
ftdm_transfer_response_t | ||||
) |
Digit limit used in DNIS/ANI.
Number abstraction
00342 : (fchan)->native_codec == FTDM_CODEC_ALAW ? 0xD5 : 0x00 00343 00345 typedef struct { 00346 char digits[FTDM_DIGITS_LIMIT]; 00347 uint8_t type; 00348 uint8_t plan; 00349 } ftdm_number_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_calling_party_category | , | |
ftdm_calling_party_category2str | , | |||
ftdm_calling_party_category_t | ||||
) |
Network responses to transfer requests
00327 { 00328 FTDM_TRANSFER_RESPONSE_OK, /* Call is being transferred */ 00329 FTDM_TRANSFER_RESPONSE_CP_DROP_OFF, /* Calling Party drop off */ 00330 FTDM_TRANSFER_RESPONSE_LIMITS_EXCEEDED, /* Cannot redirect, limits exceeded */ 00331 FTDM_TRANSFER_RESPONSE_INVALID_NUM, /* Network did not receive or recognize dialed number */ 00332 FTDM_TRANSFER_RESPONSE_INVALID_COMMAND, /* Network received an invalid command */ 00333 FTDM_TRANSFER_RESPONSE_TIMEOUT, /* We did not receive a response from Network */ 00334 FTDM_TRANSFER_RESPONSE_INVALID, 00335 } ftdm_transfer_response_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_usr_layer1_prot | , | |
ftdm_user_layer1_prot2str | , | |||
ftdm_user_layer1_prot_t | ||||
) |
Calling Party Category
00307 { 00308 FTDM_CPC_UNKNOWN, 00309 FTDM_CPC_OPERATOR, 00310 FTDM_CPC_OPERATOR_FRENCH, 00311 FTDM_CPC_OPERATOR_ENGLISH, 00312 FTDM_CPC_OPERATOR_GERMAN, 00313 FTDM_CPC_OPERATOR_RUSSIAN, 00314 FTDM_CPC_OPERATOR_SPANISH, 00315 FTDM_CPC_ORDINARY, 00316 FTDM_CPC_PRIORITY, 00317 FTDM_CPC_DATA, 00318 FTDM_CPC_TEST, 00319 FTDM_CPC_PAYPHONE, 00320 FTDM_CPC_CHINA, 00321 FTDM_CPC_INVALID 00322 } ftdm_calling_party_category_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_bearer_cap | , | |
ftdm_bearer_cap2str | , | |||
ftdm_bearer_cap_t | ||||
) |
user information layer 1 protocol
00297 { 00298 FTDM_USER_LAYER1_PROT_V110 = 0x01, 00299 FTDM_USER_LAYER1_PROT_ULAW = 0x02, 00300 FTDM_USER_LAYER1_PROT_ALAW = 0x03, 00301 FTDM_USER_LAYER1_PROT_INVALID 00302 } ftdm_user_layer1_prot_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_screening | , | |
ftdm_screening2str | , | |||
ftdm_screening_t | ||||
) |
bearer capability
00283 { 00284 FTDM_BEARER_CAP_SPEECH = 0x00, /* Speech */ 00285 FTDM_BEARER_CAP_UNRESTRICTED, /* Unrestricted Digital */ 00286 FTDM_BEARER_CAP_RESTRICTED, /* Restricted Digital */ 00287 FTDM_BEARER_CAP_3_1KHZ_AUDIO, /* 3.1 Khz Audio */ 00288 FTDM_BEARER_CAP_7KHZ_AUDIO, /* 7 Khz Audio or Unrestricted digital w tones */ 00289 FTDM_BEARER_CAP_15KHZ_AUDIO, /* 15 Khz Audio */ 00290 FTDM_BEARER_CAP_VIDEO, /* Video */ 00291 FTDM_BEARER_CAP_INVALID 00292 } ftdm_bearer_cap_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_presentation | , | |
ftdm_presentation2str | , | |||
ftdm_presentation_t | ||||
) |
Screening Ind
00272 { 00273 FTDM_SCREENING_NOT_SCREENED, 00274 FTDM_SCREENING_VERIFIED_PASSED, 00275 FTDM_SCREENING_VERIFIED_FAILED, 00276 FTDM_SCREENING_NETWORK_PROVIDED, 00277 FTDM_SCREENING_INVALID 00278 } ftdm_screening_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_npi | , | |
ftdm_npi2str | , | |||
ftdm_npi_t | ||||
) |
Presentation Ind
00261 { 00262 FTDM_PRES_ALLOWED, 00263 FTDM_PRES_RESTRICTED, 00264 FTDM_PRES_NOT_AVAILABLE, 00265 FTDM_PRES_RESERVED, 00266 FTDM_PRES_INVALID 00267 } ftdm_presentation_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_ton | , | |
ftdm_ton2str | , | |||
ftdm_ton_t | ||||
) |
Numbering Plan Identification (NPI)
00247 { 00248 FTDM_NPI_UNKNOWN = 0, 00249 FTDM_NPI_ISDN, 00250 FTDM_NPI_DATA, 00251 FTDM_NPI_TELEX, 00252 FTDM_NPI_NATIONAL, 00253 FTDM_NPI_PRIVATE, 00254 FTDM_NPI_RESERVED, 00255 FTDM_NPI_INVALID 00256 } ftdm_npi_t;
FTDM_STR2ENUM_P | ( | ftdm_str2ftdm_chan_type | , | |
ftdm_chan_type2str | , | |||
ftdm_chan_type_t | ||||
) | const |
transform from channel type to string and from string to channel type ftdm_str2ftdm_chan_type transforms a channel string (ie: "FXO" to FTDM_CHAN_TYPE_FXO) ftdm_chan_type2str transforms a channel type to string (ie: FTDM_CHAN_TYPE_B to "B")
Test if a channel is a voice channel
Test if a channel is a D-channel
Test if a channel is digital channel
Logging function prototype to be used for all FreeTDM logs you should use ftdm_global_set_logger to set your own logger
ftdm_status_t ftdm_usrmsg_add_var | ( | ftdm_usrmsg_t * | usrmsg, | |
const char * | var_name, | |||
const char * | value | |||
) |
Add a custom variable to the user message.
ftdm_status_t ftdm_usrmsg_set_raw_data | ( | ftdm_usrmsg_t * | usrmsg, | |
void * | data, | |||
ftdm_size_t | datalen | |||
) |
Attach raw data to usrmsg.
usrmsg | The message structure containing the variables | |
data | pointer to data | |
datalen | datalen length of data |
FTDM_SUCCESS | success, data was successfully saved | |
FTDM_FAIL | failed, event already had data attached to it. |
ftdm_size_t ftdm_size_t * datalen |
const char int int const char* fmt |
FT_DECLARE_DATA ftdm_logger_t ftdm_log |
const char int int const char typedef ftdm_status_t(* ftdm_queue_create_func_t)(ftdm_queue_t **queue, ftdm_size_t capacity) |
Data queue operation functions you can use ftdm_global_set_queue_handler if you want to override the default implementation (not recommended).
const char* func |
const char int int level |
const char int line |
ftdm_size_t max |