mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-08 20:43:51 +00:00
Merge branch 'master' into smgmaster
This commit is contained in:
commit
132323c534
54 files changed
+4033
-387
No files matched your search
@@ -167,6 +167,7 @@ struct switch_core_session {
|
||||
uint32_t track_id;
|
||||
switch_log_level_t loglevel;
|
||||
uint32_t soft_lock;
|
||||
switch_ivr_dmachine_t *dmachine;
|
||||
};
|
||||
|
||||
struct switch_media_bug {
|
||||
@@ -198,6 +199,7 @@ struct switch_runtime {
|
||||
int64_t offset;
|
||||
switch_event_t *global_vars;
|
||||
switch_hash_t *mime_types;
|
||||
switch_hash_t *ptimes;
|
||||
switch_memory_pool_t *memory_pool;
|
||||
const switch_state_handler_table_t *state_handlers[SWITCH_MAX_STATE_HANDLERS];
|
||||
int state_handler_index;
|
||||
|
||||
@@ -704,7 +704,8 @@ SWITCH_DECLARE(switch_log_level_t) switch_core_session_get_loglevel(switch_core_
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_session_soft_lock(switch_core_session_t *session, uint32_t sec);
|
||||
SWITCH_DECLARE(void) switch_core_session_soft_unlock(switch_core_session_t *session);
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_session_set_dmachine(switch_core_session_t *session, switch_ivr_dmachine_t *dmachine);
|
||||
SWITCH_DECLARE(switch_ivr_dmachine_t *) switch_core_session_get_dmachine(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the unique identifier from the core
|
||||
@@ -2167,6 +2168,7 @@ SWITCH_DECLARE(uint32_t) switch_core_debug_level(void);
|
||||
SWITCH_DECLARE(void) switch_cache_db_flush_handles(void);
|
||||
SWITCH_DECLARE(const char *) switch_core_banner(void);
|
||||
SWITCH_DECLARE(switch_bool_t) switch_core_session_in_thread(switch_core_session_t *session);
|
||||
SWITCH_DECLARE(uint32_t) switch_default_ptime(const char *name, uint32_t number);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
|
||||
@@ -557,6 +557,7 @@ SWITCH_DECLARE(uint32_t) switch_ivr_schedule_broadcast(time_t runtime, const cha
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_broadcast(const char *uuid, const char *path, switch_media_flag_t flags);
|
||||
SWITCH_DECLARE(void) switch_ivr_broadcast_in_thread(switch_core_session_t *session, const char *app, int flags);
|
||||
|
||||
/*!
|
||||
\brief Transfer variables from one session to another
|
||||
@@ -845,24 +846,31 @@ SWITCH_DECLARE(switch_bool_t) switch_ivr_uuid_exists(const char *uuid);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_create(switch_ivr_dmachine_t **dmachine_p,
|
||||
switch_memory_pool_t *pool,
|
||||
uint32_t digit_timeout, uint32_t input_timeout);
|
||||
const char *name,
|
||||
switch_memory_pool_t *pool,
|
||||
uint32_t digit_timeout, uint32_t input_timeout,
|
||||
switch_ivr_dmachine_callback_t match_callback,
|
||||
switch_ivr_dmachine_callback_t nonmatch_callback,
|
||||
void *user_data);
|
||||
|
||||
SWITCH_DECLARE(void) switch_ivr_dmachine_destroy(switch_ivr_dmachine_t **dmachine);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_bind(switch_ivr_dmachine_t *dmachine,
|
||||
const char *digits,
|
||||
int32_t key,
|
||||
switch_ivr_dmachine_callback_t callback,
|
||||
void *user_data);
|
||||
const char *realm,
|
||||
const char *digits,
|
||||
int32_t key,
|
||||
switch_ivr_dmachine_callback_t callback,
|
||||
void *user_data);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_feed(switch_ivr_dmachine_t *dmachine, const char *digits, switch_ivr_dmachine_match_t **match);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_clear(switch_ivr_dmachine_t *dmachine);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_ping(switch_ivr_dmachine_t *dmachine, switch_ivr_dmachine_match_t **match_p);
|
||||
SWITCH_DECLARE(switch_ivr_dmachine_match_t *) switch_ivr_dmachine_get_match(switch_ivr_dmachine_t *dmachine);
|
||||
|
||||
|
||||
|
||||
SWITCH_DECLARE(const char *) switch_ivr_dmachine_get_failed_digits(switch_ivr_dmachine_t *dmachine);
|
||||
SWITCH_DECLARE(void) switch_ivr_dmachine_set_digit_timeout_ms(switch_ivr_dmachine_t *dmachine, uint32_t digit_timeout_ms);
|
||||
SWITCH_DECLARE(void) switch_ivr_dmachine_set_input_timeout_ms(switch_ivr_dmachine_t *dmachine, uint32_t input_timeout_ms);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_clear_realm(switch_ivr_dmachine_t *dmachine, const char *realm);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_set_realm(switch_ivr_dmachine_t *dmachine, const char *realm);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||
#define SWITCH_CURRENT_APPLICATION_VARIABLE "current_application"
|
||||
#define SWITCH_CURRENT_APPLICATION_DATA_VARIABLE "current_application_data"
|
||||
#define SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE "current_application_response"
|
||||
#define SWITCH_PASSTHRU_PTIME_MISMATCH_VARIABLE "passthru_ptime_mismatch"
|
||||
#define SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE "enable_heartbeat_events"
|
||||
#define SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE "bypass_media_after_bridge"
|
||||
#define SWITCH_READ_RESULT_VARIABLE "read_result"
|
||||
@@ -189,9 +190,14 @@ SWITCH_BEGIN_EXTERN_C
|
||||
#define SWITCH_DTMF_LOG_LEN 1000
|
||||
typedef uint8_t switch_byte_t;
|
||||
|
||||
typedef enum {
|
||||
DTMF_FLAG_SKIP_PROCESS = (1 << 0)
|
||||
} dtmf_flag_t;
|
||||
|
||||
typedef struct {
|
||||
char digit;
|
||||
uint32_t duration;
|
||||
int32_t flags;
|
||||
} switch_dtmf_t;
|
||||
|
||||
typedef enum {
|
||||
@@ -1055,6 +1061,8 @@ typedef enum {
|
||||
CF_EARLY_HANGUP,
|
||||
CF_MEDIA_SET,
|
||||
CF_CONSUME_ON_ORIGINATE,
|
||||
CF_PASSTHRU_PTIME_MISMATCH,
|
||||
CF_BRIDGE_NOWRITE,
|
||||
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
|
||||
CF_FLAG_MAX
|
||||
} switch_channel_flag_t;
|
||||
@@ -1686,6 +1694,13 @@ typedef switch_status_t (*switch_input_callback_function_t) (switch_core_session
|
||||
typedef switch_status_t (*switch_read_frame_callback_function_t) (switch_core_session_t *session, switch_frame_t *frame, void *user_data);
|
||||
typedef struct switch_say_interface switch_say_interface_t;
|
||||
|
||||
#define DMACHINE_MAX_DIGIT_LEN 512
|
||||
|
||||
typedef enum {
|
||||
DM_MATCH_POSITIVE,
|
||||
DM_MATCH_NEGATIVE
|
||||
} dm_match_type_t;
|
||||
|
||||
struct switch_ivr_dmachine;
|
||||
typedef struct switch_ivr_dmachine switch_ivr_dmachine_t;
|
||||
|
||||
@@ -1693,6 +1708,7 @@ struct switch_ivr_dmachine_match {
|
||||
switch_ivr_dmachine_t *dmachine;
|
||||
const char *match_digits;
|
||||
int32_t match_key;
|
||||
dm_match_type_t type;
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
|
||||
@@ -376,15 +376,6 @@ switch_mutex_unlock(obj->flag_mutex);
|
||||
#define switch_set_string(_dst, _src) switch_copy_string(_dst, _src, sizeof(_dst))
|
||||
|
||||
|
||||
static inline uint32_t switch_default_ptime(const char *name, uint32_t number)
|
||||
{
|
||||
if (!strcasecmp(name, "G723")) {
|
||||
return 30;
|
||||
}
|
||||
|
||||
return 20;
|
||||
}
|
||||
|
||||
static inline char *switch_sanitize_number(char *number)
|
||||
{
|
||||
char *p = number, *q;
|
||||
|
||||
Reference in new issue
Block a user