freetdm: Added dtmfdetect duration option

This commit is contained in:
David Yat Sin
2012-01-04 11:16:29 -05:00
parent 89c639743d
commit badc80ad3e
4 changed files with 26 additions and 5 deletions

View File

@@ -479,7 +479,7 @@ typedef enum {
FTDM_STR2ENUM_P(ftdm_str2ftdm_trunk_type, ftdm_trunk_type2str, ftdm_trunk_type_t)
/*! \brief Basic channel configuration provided to ftdm_configure_span_channels */
typedef struct ftdm_channel_config {
typedef struct ftdm_channel_config {
char name[FTDM_MAX_NAME_STR_SZ];
char number[FTDM_MAX_NUMBER_STR_SZ];
char group_name[FTDM_MAX_NAME_STR_SZ];
@@ -487,6 +487,7 @@ typedef struct ftdm_channel_config {
float rxgain;
float txgain;
uint8_t debugdtmf;
uint32_t dtmfdetect_ms;
uint8_t iostats;
} ftdm_channel_config_t;

View File

@@ -359,6 +359,11 @@ typedef struct {
ftdm_mutex_t *mutex;
} ftdm_dtmf_debug_t;
typedef struct {
uint32_t duration_ms;
ftdm_time_t start_time;
} ftdm_dtmf_detect_t;
/* 2^8 table size, one for each byte (sample) value */
#define FTDM_GAINS_TABLE_SIZE 256
struct ftdm_channel {
@@ -438,6 +443,7 @@ struct ftdm_channel {
ftdm_timer_id_t hangup_timer;
ftdm_channel_iostats_t iostats;
ftdm_dtmf_debug_t dtmfdbg;
ftdm_dtmf_detect_t dtmfdetect;
ftdm_io_dump_t rxdump;
ftdm_io_dump_t txdump;
ftdm_interrupt_t *state_completed_interrupt; /*!< Notify when a state change is completed */