indent again
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4799 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
debdfb1aab
commit
c15d7892c0
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
echo -n "-brs -npsl -di0 -br -ce -d0 -cli0 -npcs -nfc1 -ut -i4 -ts4 -l160 -cs -T size_t " > ./.indent.pro
|
||||
echo -n "-brs -npsl -di0 -br -ce -d0 -cli0 -npcs -nfc1 -ut -i4 -ts4 -l155 -cs -T size_t " > ./.indent.pro
|
||||
grep typedef ./src/include/*.h | grep switch_ | grep -v "\*\|{" | sed -e s/struct// | perl -ne '@l = split; $l[2] =~ s/;//g ; print "-T $l[2] "' >> ./.indent.pro
|
||||
grep "} switch_" ./src/include/*.h | perl -ne '@l = split; $l[1] =~ s/;//g ; print " -T $l[1] "' >> ./.indent.pro
|
||||
|
|
|
@ -676,7 +676,8 @@ SWITCH_DECLARE(switch_status_t) switch_queue_trypush(switch_queue_t * queue, voi
|
|||
* @remark If perm is SWITCH_FPROT_OS_DEFAULT and the file is being created,
|
||||
* appropriate default permissions will be used.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_open(switch_file_t ** newf, const char *fname, int32_t flag, switch_fileperms_t perm, switch_memory_pool_t * pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_open(switch_file_t ** newf, const char *fname, int32_t flag, switch_fileperms_t perm,
|
||||
switch_memory_pool_t *pool);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_seek(switch_file_t * thefile, switch_seek_where_t where, int64_t *offset);
|
||||
|
@ -963,7 +964,8 @@ SWITCH_DECLARE(switch_status_t) switch_socket_send(switch_socket_t * sock, const
|
|||
* @param buf The data to send
|
||||
* @param len The length of the data to send
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_sendto(switch_socket_t * sock, switch_sockaddr_t * where, int32_t flags, const char *buf, switch_size_t *len);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_sendto(switch_socket_t * sock, switch_sockaddr_t * where, int32_t flags, const char *buf,
|
||||
switch_size_t *len);
|
||||
|
||||
/**
|
||||
* @param from The apr_sockaddr_t to fill in the recipient info
|
||||
|
|
|
@ -73,7 +73,8 @@ static const uint8_t SWITCH_REVERSE_BITPACKED_MASKS[] = { 255, 254, 252, 248, 24
|
|||
\param mode RFC3551 or AAL2 mode (curse you backwards folks)
|
||||
*/
|
||||
DoxyDefine(void switch_bitpack_init(switch_bitpack_t *pack, int32_t bitlen, switch_byte_t *buf, uint32_t buflen, switch_bitpack_mode_t mode))
|
||||
static inline int8_t switch_bitpack_init(switch_bitpack_t *pack, switch_byte_t bitlen, switch_byte_t * buf, uint32_t buflen, switch_bitpack_mode_t mode)
|
||||
static inline int8_t switch_bitpack_init(switch_bitpack_t *pack, switch_byte_t bitlen, switch_byte_t *buf, uint32_t buflen,
|
||||
switch_bitpack_mode_t mode)
|
||||
{
|
||||
if (!pack || (bitlen > SWITCH_BITS_PER_BYTE) || !buf || !buflen) {
|
||||
return -1;
|
||||
|
|
|
@ -67,7 +67,8 @@ SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t * pool
|
|||
* \param max_len length the buffer is allowed to grow to
|
||||
* \return status
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_buffer_create_dynamic(switch_buffer_t **buffer, switch_size_t blocksize, switch_size_t start_len, switch_size_t max_len);
|
||||
SWITCH_DECLARE(switch_status_t) switch_buffer_create_dynamic(switch_buffer_t **buffer, switch_size_t blocksize, switch_size_t start_len,
|
||||
switch_size_t max_len);
|
||||
|
||||
/*! \brief Get the length of a switch_buffer_t
|
||||
* \param buffer any buffer of type switch_buffer_t
|
||||
|
|
|
@ -172,7 +172,8 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor
|
|||
const char *network_addr,
|
||||
const char *ani,
|
||||
const char *aniii,
|
||||
const char *rdnis, const char *source, const char *context, const char *destination_number);
|
||||
const char *rdnis, const char *source, const char *context,
|
||||
const char *destination_number);
|
||||
|
||||
/*!
|
||||
\brief Clone an existing caller profile object
|
||||
|
|
|
@ -127,7 +127,8 @@ SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel,
|
|||
\param state the initial state of the channel
|
||||
\param flags the initial channel flags
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel, switch_core_session_t *session, switch_channel_state_t state, uint32_t flags);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel, switch_core_session_t *session, switch_channel_state_t state,
|
||||
uint32_t flags);
|
||||
|
||||
/*!
|
||||
\brief Fire A presence event for the channel
|
||||
|
|
|
@ -177,7 +177,8 @@ extern switch_io_event_hooks_t switch_core_session_get_event_hooks(switch_core_s
|
|||
\param outgoing_channel hook to bind
|
||||
\return SWITCH_STATUS_SUCCESS on suceess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_outgoing_channel(switch_core_session_t *session, switch_outgoing_channel_hook_t outgoing_channel);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_outgoing_channel(switch_core_session_t *session,
|
||||
switch_outgoing_channel_hook_t outgoing_channel);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session answers a channel
|
||||
|
|
|
@ -208,7 +208,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *fun
|
|||
\param user_data optional user specific data to pass whenever the callback is invoked
|
||||
\return SWITCH_STATUS_SUCCESS if the event was binded
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback, void *user_data);
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback,
|
||||
void *user_data);
|
||||
|
||||
/*!
|
||||
\brief Render the name of an event id enumeration
|
||||
|
|
|
@ -227,7 +227,8 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
|
|||
uint32_t timeout,
|
||||
char *valid_terminators,
|
||||
char *audio_file,
|
||||
char *bad_input_audio_file, void *digit_buffer, uint32_t digit_buffer_length, char *digits_regex);
|
||||
char *bad_input_audio_file, void *digit_buffer, uint32_t digit_buffer_length,
|
||||
char *digits_regex);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session_t *session,
|
||||
switch_speech_handle_t *sh,
|
||||
|
@ -280,7 +281,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
|
||||
switch_core_session_t *peer_session,
|
||||
switch_input_callback_function_t dtmf_callback, void *session_data, void *peer_session_data);
|
||||
switch_input_callback_function_t dtmf_callback, void *session_data,
|
||||
void *peer_session_data);
|
||||
|
||||
/*!
|
||||
\brief Bridge Signalling from one session to another
|
||||
|
@ -615,7 +617,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_add_custom(switch_ivr_
|
|||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_init(switch_ivr_menu_xml_ctx_t ** xml_menu_ctx, switch_memory_pool_t *pool);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *session, char *macro_name, char *data, char *lang, switch_input_args_t *args);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *session, char *macro_name, char *data, char *lang,
|
||||
switch_input_args_t *args);
|
||||
/** @} */
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
|
|
|
@ -42,7 +42,8 @@ SWITCH_BEGIN_EXTERN_C
|
|||
*/
|
||||
typedef struct real_pcre switch_regex_t;
|
||||
|
||||
SWITCH_DECLARE(switch_regex_t *) switch_regex_compile(const char *pattern, int options, const char **errorptr, int *erroroffset, const unsigned char *tables);
|
||||
SWITCH_DECLARE(switch_regex_t *) switch_regex_compile(const char *pattern, int options, const char **errorptr, int *erroroffset,
|
||||
const unsigned char *tables);
|
||||
|
||||
SWITCH_DECLARE(int) switch_regex_copy_substring(const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int size);
|
||||
|
||||
|
|
|
@ -76,7 +76,8 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session
|
|||
switch_payload_t payload,
|
||||
uint32_t samples_per_interval,
|
||||
uint32_t ms_per_packet,
|
||||
switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err, switch_memory_pool_t * pool);
|
||||
switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err,
|
||||
switch_memory_pool_t *pool);
|
||||
|
||||
|
||||
/*!
|
||||
|
|
|
@ -63,16 +63,14 @@ typedef sqlite3_stmt switch_core_db_stmt_t;
|
|||
*
|
||||
* The buffer allocated is freed automatically by SQLite.
|
||||
*/
|
||||
DoxyDefine(void *switch_core_db_aggregate_context(sqlite3_context *, int nBytes);
|
||||
)
|
||||
DoxyDefine(void *switch_core_db_aggregate_context(sqlite3_context *, int nBytes);)
|
||||
#define switch_core_db_aggregate_context sqlite3_aggregate_context
|
||||
/**
|
||||
* /return the number of calls to xStep for a particular
|
||||
* aggregate function instance. The current call to xStep counts so this
|
||||
* routine always returns at least 1.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_aggregate_count(sqlite3_context *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_aggregate_count(sqlite3_context *);)
|
||||
#define switch_core_db_aggregate_count sqlite3_aggregate_count
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
|
@ -102,8 +100,7 @@ DoxyDefine(int switch_core_db_aggregate_count(sqlite3_context *);
|
|||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_blob(sqlite3_stmt *, int, const void *, int n, void (*)(void *));
|
||||
)
|
||||
DoxyDefine(int switch_core_db_bind_blob(sqlite3_stmt *, int, const void *, int n, void (*)(void *));)
|
||||
#define switch_core_db_bind_blob sqlite3_bind_blob
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
|
@ -125,8 +122,7 @@ DoxyDefine(int switch_core_db_bind_blob(sqlite3_stmt *, int, const void *, int n
|
|||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_double(sqlite3_stmt *, int, double);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_bind_double(sqlite3_stmt *, int, double);)
|
||||
#define switch_core_db_bind_double sqlite3_bind_double
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
|
@ -148,8 +144,7 @@ DoxyDefine(int switch_core_db_bind_double(sqlite3_stmt *, int, double);
|
|||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_int(sqlite3_stmt *, int, int);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_bind_int(sqlite3_stmt *, int, int);)
|
||||
#define switch_core_db_bind_int sqlite3_bind_int
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
|
@ -171,8 +166,7 @@ DoxyDefine(int switch_core_db_bind_int(sqlite3_stmt *, int, int);
|
|||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_int64(sqlite3_stmt *, int, sqlite_int64);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_bind_int64(sqlite3_stmt *, int, sqlite_int64);)
|
||||
#define switch_core_db_bind_int64 sqlite3_bind_int64
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
|
@ -194,8 +188,7 @@ DoxyDefine(int switch_core_db_bind_int64(sqlite3_stmt *, int, sqlite_int64);
|
|||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_null(sqlite3_stmt *, int);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_bind_null(sqlite3_stmt *, int);)
|
||||
#define switch_core_db_bind_null sqlite3_bind_null
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
|
@ -225,8 +218,7 @@ DoxyDefine(int switch_core_db_bind_null(sqlite3_stmt *, int);
|
|||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_text(sqlite3_stmt *, int, const char *, int n, void (*)(void *));
|
||||
)
|
||||
DoxyDefine(int switch_core_db_bind_text(sqlite3_stmt *, int, const char *, int n, void (*)(void *));)
|
||||
#define switch_core_db_bind_text sqlite3_bind_text
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
|
@ -256,8 +248,7 @@ DoxyDefine(int switch_core_db_bind_text(sqlite3_stmt *, int, const char *, int n
|
|||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_text16(sqlite3_stmt *, int, const void *, int, void (*)(void *));
|
||||
)
|
||||
DoxyDefine(int switch_core_db_bind_text16(sqlite3_stmt *, int, const void *, int, void (*)(void *));)
|
||||
#define switch_core_db_bind_text16 sqlite3_bind_text16
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
|
@ -279,23 +270,20 @@ DoxyDefine(int switch_core_db_bind_text16(sqlite3_stmt *, int, const void *, int
|
|||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_value(sqlite3_stmt *, int, const sqlite3_value *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_bind_value(sqlite3_stmt *, int, const sqlite3_value *);)
|
||||
#define switch_core_db_bind_value sqlite3_bind_value
|
||||
/**
|
||||
* @return The number of parameters in a compiled SQL statement.
|
||||
* @remark This routine was added to support DBD::SQLite.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_parameter_count(sqlite3_stmt *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_bind_parameter_count(sqlite3_stmt *);)
|
||||
#define switch_core_db_bind_parameter_count sqlite3_bind_parameter_count
|
||||
/**
|
||||
* @return the index of a parameter with the given name. If no parameter with the
|
||||
* given name is found, return 0.
|
||||
* @remark The name must match exactly.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_parameter_index(sqlite3_stmt *, const char *zName);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_bind_parameter_index(sqlite3_stmt *, const char *zName);)
|
||||
#define switch_core_db_bind_parameter_index sqlite3_bind_parameter_index
|
||||
/**
|
||||
* @return the name of the i-th parameter.
|
||||
|
@ -304,8 +292,7 @@ DoxyDefine(int switch_core_db_bind_parameter_index(sqlite3_stmt *, const char *z
|
|||
* $VVV the complete text of the parameter name is returned, including
|
||||
* the initial ":" or "$". NULL is returned if the index is out of range.
|
||||
*/
|
||||
DoxyDefine(const char *switch_core_db_bind_parameter_name(sqlite3_stmt *, int);
|
||||
)
|
||||
DoxyDefine(const char *switch_core_db_bind_parameter_name(sqlite3_stmt *, int);)
|
||||
#define switch_core_db_bind_parameter_name sqlite3_bind_parameter_name
|
||||
/**
|
||||
* This routine identifies a callback function that is invoked
|
||||
|
@ -329,8 +316,7 @@ DoxyDefine(const char *switch_core_db_bind_parameter_name(sqlite3_stmt *, int);
|
|||
* data structures out from under the executing query and will
|
||||
* probably result in a coredump.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_busy_handler(switch_core_db *, int (*)(void *, int), void *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_busy_handler(switch_core_db *, int (*)(void *, int), void *);)
|
||||
#define switch_core_db_busy_handler sqlite3_busy_handler
|
||||
/**
|
||||
* This routine sets a busy handler that sleeps for a while when a
|
||||
|
@ -342,8 +328,7 @@ DoxyDefine(int switch_core_db_busy_handler(switch_core_db *, int (*)(void *, int
|
|||
* Calling this routine with an argument less than or equal to zero
|
||||
* turns off all busy handlers.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_busy_timeout(switch_core_db *, int ms);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_busy_timeout(switch_core_db *, int ms);)
|
||||
#define switch_core_db_busy_timeout sqlite3_busy_timeout
|
||||
/**
|
||||
* This function returns the number of database rows that were changed
|
||||
|
@ -365,8 +350,7 @@ DoxyDefine(int switch_core_db_busy_timeout(switch_core_db *, int ms);
|
|||
* table. To get an accurate count of the number of rows deleted, use
|
||||
* "DELETE FROM table WHERE 1" instead.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_changes(switch_core_db *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_changes(switch_core_db *);)
|
||||
#define switch_core_db_changes sqlite3_changes
|
||||
/**
|
||||
* A function to close the database.
|
||||
|
@ -379,8 +363,7 @@ DoxyDefine(int switch_core_db_changes(switch_core_db *);
|
|||
* this routine is called. Otherwise, SQLITE_BUSY is returned and the
|
||||
* database connection remains open.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_close(switch_core_db *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_close(switch_core_db *);)
|
||||
#define switch_core_db_close sqlite3_close
|
||||
/**
|
||||
* To avoid having to register all collation sequences before a database
|
||||
|
@ -402,8 +385,7 @@ DoxyDefine(int switch_core_db_close(switch_core_db *);
|
|||
* callback using the sqlite3_create_collation() API, described above.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_collation_needed(switch_core_db *, void *, void (*)(void *, switch_core_db *, int eTextRep, const char *)
|
||||
);
|
||||
)
|
||||
);)
|
||||
#define switch_core_db_collation_needed sqlite3_collation_needed
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
|
@ -446,8 +428,7 @@ DoxyDefine(int switch_core_db_collation_needed(switch_core_db *, void *, void (*
|
|||
*
|
||||
* @return the value of a BLOB.
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_column_blob(sqlite3_stmt * stmt, int iCol);
|
||||
)
|
||||
DoxyDefine(const void *switch_core_db_column_blob(sqlite3_stmt * stmt, int iCol);)
|
||||
#define switch_core_db_column_blob sqlite3_column_blob
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
|
@ -490,8 +471,7 @@ DoxyDefine(const void *switch_core_db_column_blob(sqlite3_stmt * stmt, int iCol)
|
|||
* TEXT value represented as UTF-8. The "\000" terminator is included in the
|
||||
* byte count for TEXT values.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_column_bytes(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_column_bytes(sqlite3_stmt *, int iCol);)
|
||||
#define switch_core_db_column_bytes sqlite3_column_bytes
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
|
@ -534,8 +514,7 @@ DoxyDefine(int switch_core_db_column_bytes(sqlite3_stmt *, int iCol);
|
|||
* TEXT value represented as UTF-16. The "\u0000" terminator is included in
|
||||
* the byte count for TEXT values.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_column_bytes16(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_column_bytes16(sqlite3_stmt *, int iCol);)
|
||||
#define switch_core_db_column_bytes16 sqlite3_column_bytes16
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
|
@ -576,8 +555,7 @@ DoxyDefine(int switch_core_db_column_bytes16(sqlite3_stmt *, int iCol);
|
|||
*
|
||||
* Return a FLOAT value.
|
||||
*/
|
||||
DoxyDefine(double switch_core_db_column_double(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
DoxyDefine(double switch_core_db_column_double(sqlite3_stmt *, int iCol);)
|
||||
#define switch_core_db_column_double sqlite3_column_double
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
|
@ -619,8 +597,7 @@ DoxyDefine(double switch_core_db_column_double(sqlite3_stmt *, int iCol);
|
|||
* Return an INTEGER value in the host computer's native integer representation.
|
||||
* This might be either a 32- or 64-bit integer depending on the host.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_column_int(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_column_int(sqlite3_stmt *, int iCol);)
|
||||
#define switch_core_db_column_int sqlite3_column_int
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
|
@ -661,8 +638,7 @@ DoxyDefine(int switch_core_db_column_int(sqlite3_stmt *, int iCol);
|
|||
*
|
||||
* Return an INTEGER value as a 64-bit signed integer.
|
||||
*/
|
||||
DoxyDefine(sqlite_int64 switch_core_db_column_int64(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
DoxyDefine(sqlite_int64 switch_core_db_column_int64(sqlite3_stmt *, int iCol);)
|
||||
#define switch_core_db_column_int64 sqlite3_column_int64
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
|
@ -703,8 +679,7 @@ DoxyDefine(int switch_core_db_column_int(sqlite3_stmt *, int iCol);
|
|||
*
|
||||
* Return the value as UTF-8 text.
|
||||
*/
|
||||
DoxyDefine(const unsigned char *switch_core_db_column_text(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
DoxyDefine(const unsigned char *switch_core_db_column_text(sqlite3_stmt *, int iCol);)
|
||||
#define switch_core_db_column_text sqlite3_column_text
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
|
@ -745,8 +720,7 @@ DoxyDefine(const unsigned char *switch_core_db_column_text(sqlite3_stmt *, int i
|
|||
*
|
||||
* Return the value as UTF-16 text.
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_column_text16(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
DoxyDefine(const void *switch_core_db_column_text16(sqlite3_stmt *, int iCol);)
|
||||
#define switch_core_db_column_text16 sqlite3_column_text16
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
|
@ -788,24 +762,21 @@ DoxyDefine(const void *switch_core_db_column_text16(sqlite3_stmt *, int iCol);
|
|||
* ReturnS the datatype of the result. This is one of
|
||||
* SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, SQLITE_BLOB, or SQLITE_NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_column_type(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_column_type(sqlite3_stmt *, int iCol);)
|
||||
#define switch_core_db_column_type sqlite3_column_type
|
||||
/**
|
||||
* The first parameter is a compiled SQL statement. This function returns
|
||||
* the column heading for the Nth column of that statement, where N is the
|
||||
* second function parameter. The string returned is UTF-8.
|
||||
*/
|
||||
DoxyDefine(const char *switch_core_db_column_name(sqlite3_stmt *, int);
|
||||
)
|
||||
DoxyDefine(const char *switch_core_db_column_name(sqlite3_stmt *, int);)
|
||||
#define switch_core_db_column_name sqlite3_column_name
|
||||
/**
|
||||
* Return the number of columns in the result set returned by the compiled
|
||||
* SQL statement. This routine returns 0 if pStmt is an SQL statement
|
||||
* that does not return data (for example an UPDATE).
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_column_count(sqlite3_stmt * pStmt);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_column_count(sqlite3_stmt * pStmt);)
|
||||
#define switch_core_db_column_count sqlite3_column_count
|
||||
/**
|
||||
* The first parameter is a compiled SQL statement. If this statement
|
||||
|
@ -825,8 +796,7 @@ DoxyDefine(int switch_core_db_column_count(sqlite3_stmt * pStmt);
|
|||
* result column (i==1), and a NULL pointer for the first result column
|
||||
* (i==0).
|
||||
*/
|
||||
DoxyDefine(const char *switch_core_db_column_decltype(sqlite3_stmt *, int i);
|
||||
)
|
||||
DoxyDefine(const char *switch_core_db_column_decltype(sqlite3_stmt *, int i);)
|
||||
#define switch_core_db_column_decltype sqlite3_column_decltype
|
||||
/**
|
||||
* The first parameter is a compiled SQL statement. If this statement
|
||||
|
@ -846,8 +816,7 @@ DoxyDefine(const char *switch_core_db_column_decltype(sqlite3_stmt *, int i);
|
|||
* result column (i==1), and a NULL pointer for the first result column
|
||||
* (i==0).
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_column_decltype16(sqlite3_stmt *, int);
|
||||
)
|
||||
DoxyDefine(const void *switch_core_db_column_decltype16(sqlite3_stmt *, int);)
|
||||
#define switch_core_db_column_decltype16 sqlite3_column_decltype16
|
||||
/**
|
||||
* Register a callback function to be invoked whenever a new transaction
|
||||
|
@ -862,8 +831,7 @@ DoxyDefine(const void *switch_core_db_column_decltype16(sqlite3_stmt *, int);
|
|||
*
|
||||
****** THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******
|
||||
*/
|
||||
DoxyDefine(void *switch_core_db_commit_hook(switch_core_db *, int (*)(void *), void *);
|
||||
)
|
||||
DoxyDefine(void *switch_core_db_commit_hook(switch_core_db *, int (*)(void *), void *);)
|
||||
#define switch_core_db_commit_hook sqlite3_commit_hook
|
||||
/**
|
||||
* This functions return true if the given input string comprises
|
||||
|
@ -874,8 +842,7 @@ DoxyDefine(void *switch_core_db_commit_hook(switch_core_db *, int (*)(void *), v
|
|||
* and comments is a semicolon, then return true. otherwise return
|
||||
* false.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_complete(const char *sql);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_complete(const char *sql);)
|
||||
#define switch_core_db_complete sqlite3_complete
|
||||
/**
|
||||
* This function is used to add new collation sequences to the
|
||||
|
@ -904,8 +871,7 @@ DoxyDefine(int switch_core_db_complete(const char *sql);
|
|||
*/
|
||||
DoxyDefine(int switch_core_db_create_collation(switch_core_db *,
|
||||
const char *zName, int eTextRep, void *, int (*xCompare) (void *, int, const void *, int, const void *)
|
||||
);
|
||||
)
|
||||
);)
|
||||
#define switch_core_db_create_collation sqlite3_create_collation
|
||||
/**
|
||||
* The following function is used to add user functions or aggregates
|
||||
|
@ -947,8 +913,7 @@ DoxyDefine(int switch_core_db_create_function(switch_core_db *,
|
|||
void *,
|
||||
void (*xFunc) (sqlite3_context *, int, sqlite3_value **),
|
||||
void (*xStep) (sqlite3_context *, int, sqlite3_value **), void (*xFinal) (sqlite3_context *)
|
||||
);
|
||||
)
|
||||
);)
|
||||
#define switch_core_db_create_function sqlite3_create_function
|
||||
/**
|
||||
* Return the number of values in the current row of the result set.
|
||||
|
@ -959,8 +924,7 @@ DoxyDefine(int switch_core_db_create_function(switch_core_db *,
|
|||
* error code, or before switch_core_db_step() has been called on a
|
||||
* compiled SQL statement, this routine returns zero.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_data_count(sqlite3_stmt * pStmt);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_data_count(sqlite3_stmt * pStmt);)
|
||||
#define switch_core_db_data_count sqlite3_data_count
|
||||
/**
|
||||
* Return the sqlite3* database handle to which the prepared statement given
|
||||
|
@ -968,8 +932,7 @@ DoxyDefine(int switch_core_db_data_count(sqlite3_stmt * pStmt);
|
|||
* the first argument to the switch_core_db_prepare() that was used to create
|
||||
* the statement in the first place.
|
||||
*/
|
||||
DoxyDefine(switch_core_db * switch_core_db_db_handle(sqlite3_stmt *);
|
||||
)
|
||||
DoxyDefine(switch_core_db * switch_core_db_db_handle(sqlite3_stmt *);)
|
||||
#define switch_core_db_db_handle sqlite3_db_handle
|
||||
/**
|
||||
** Return the error code for the most recent switch_core_db_* API call associated
|
||||
|
@ -986,8 +949,7 @@ DoxyDefine(int switch_core_db_data_count(sqlite3_stmt * pStmt);
|
|||
** code returned by this function is associated with the same error as
|
||||
** the strings returned by sqlite3_errmsg() and sqlite3_errmsg16().
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_errcode(switch_core_db * db);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_errcode(switch_core_db * db);)
|
||||
#define switch_core_db_errcode sqlite3_errcode
|
||||
/**
|
||||
* Return a pointer to a UTF-8 encoded string describing in english the
|
||||
|
@ -997,8 +959,7 @@ DoxyDefine(int switch_core_db_errcode(switch_core_db * db);
|
|||
* The string "not an error" is returned when the most recent API call was
|
||||
* successful.
|
||||
*/
|
||||
DoxyDefine(const char *switch_core_db_errmsg(switch_core_db *);
|
||||
)
|
||||
DoxyDefine(const char *switch_core_db_errmsg(switch_core_db *);)
|
||||
#define switch_core_db_errmsg sqlite3_errmsg
|
||||
/**
|
||||
* A function to executes one or more statements of SQL.
|
||||
|
@ -1045,8 +1006,7 @@ DoxyDefine(int switch_core_db_exec(switch_core_db *, /* An open database */
|
|||
sqlite3_callback, /* Callback function */
|
||||
void *, /* 1st argument to callback function */
|
||||
char **errmsg /* Error msg written here */
|
||||
);
|
||||
)
|
||||
);)
|
||||
#define switch_core_db_exec sqlite3_exec
|
||||
/**
|
||||
* Return TRUE (non-zero) if the statement supplied as an argument needs
|
||||
|
@ -1057,8 +1017,7 @@ DoxyDefine(int switch_core_db_exec(switch_core_db *, /* An open database */
|
|||
* added or changed.
|
||||
*
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_expired(sqlite3_stmt *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_expired(sqlite3_stmt *);)
|
||||
#define switch_core_db_expired sqlite3_expired
|
||||
/**
|
||||
* This function is called to delete a compiled
|
||||
|
@ -1074,14 +1033,12 @@ DoxyDefine(int switch_core_db_expired(sqlite3_stmt *);
|
|||
* rolled back and transactions cancelled, depending on the circumstances,
|
||||
* and the result code returned will be SQLITE_ABORT.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_finalize(sqlite3_stmt * pStmt);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_finalize(sqlite3_stmt * pStmt);)
|
||||
#define switch_core_db_finalize sqlite3_finalize
|
||||
/**
|
||||
* Call this routine to free the memory that sqlite3_get_table() allocated.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_free_table(char **result);
|
||||
)
|
||||
DoxyDefine(void switch_core_db_free_table(char **result);)
|
||||
#define switch_core_db_free_table sqlite3_free_table
|
||||
/**
|
||||
* Test to see whether or not the database connection is in autocommit
|
||||
|
@ -1089,8 +1046,7 @@ DoxyDefine(void switch_core_db_free_table(char **result);
|
|||
* by default. Autocommit is disabled by a BEGIN statement and reenabled
|
||||
* by the next COMMIT or ROLLBACK.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_get_autocommit(switch_core_db *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_get_autocommit(switch_core_db *);)
|
||||
#define switch_core_db_get_autocommit sqlite3_get_autocommit
|
||||
/**
|
||||
* The following function may be used by scalar user functions to
|
||||
|
@ -1111,8 +1067,7 @@ DoxyDefine(int switch_core_db_get_autocommit(switch_core_db *);
|
|||
* expressions that are constant at compile time. This includes literal
|
||||
* values and SQL variables.
|
||||
*/
|
||||
DoxyDefine(void *switch_core_db_get_auxdata(sqlite3_context *, int);
|
||||
)
|
||||
DoxyDefine(void *switch_core_db_get_auxdata(sqlite3_context *, int);)
|
||||
#define switch_core_db_get_auxdata sqlite3_get_auxdata
|
||||
/**
|
||||
* The following function may be used by scalar user functions to
|
||||
|
@ -1135,8 +1090,7 @@ DoxyDefine(void *switch_core_db_get_auxdata(sqlite3_context *, int);
|
|||
* expressions that are constant at compile time. This includes literal
|
||||
* values and SQL variables.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_set_auxdata(sqlite3_context *, int, void *, void (*)(void *));
|
||||
)
|
||||
DoxyDefine(void switch_core_db_set_auxdata(sqlite3_context *, int, void *, void (*)(void *));)
|
||||
#define switch_core_db_set_auxdata sqlite3_set_auxdata
|
||||
/**
|
||||
* This next routine is really just a wrapper around sqlite3_exec().
|
||||
|
@ -1185,8 +1139,7 @@ DoxyDefine(int switch_core_db_get_table(switch_core_db *, /* An open database */
|
|||
int *nrow, /* Number of result rows written here */
|
||||
int *ncolumn, /* Number of result columns written here */
|
||||
char **errmsg /* Error msg written here */
|
||||
);
|
||||
)
|
||||
);)
|
||||
#define switch_core_db_get_table sqlite3_get_table
|
||||
/**
|
||||
* This function is called to recover from a malloc() failure that occured
|
||||
|
@ -1207,8 +1160,7 @@ DoxyDefine(int switch_core_db_get_table(switch_core_db *, /* An open database */
|
|||
* This functionality can be omitted from a build by defining the
|
||||
* SQLITE_OMIT_GLOBALRECOVER at compile time.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_global_recover();
|
||||
)
|
||||
DoxyDefine(int switch_core_db_global_recover();)
|
||||
#define switch_core_db_global_recover sqlite3_global_recover
|
||||
/** This function causes any pending database operation to abort and
|
||||
* return at its earliest opportunity. This routine is typically
|
||||
|
@ -1216,8 +1168,7 @@ DoxyDefine(int switch_core_db_global_recover();
|
|||
* or Ctrl-C where the user wants a long query operation to halt
|
||||
* immediately.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_interrupt(switch_core_db *);
|
||||
)
|
||||
DoxyDefine(void switch_core_db_interrupt(switch_core_db *);)
|
||||
#define switch_core_db_interrupt sqlite3_interrupt
|
||||
/**
|
||||
* Each entry in an SQLite table has a unique integer key. (The key is
|
||||
|
@ -1228,8 +1179,7 @@ DoxyDefine(void switch_core_db_interrupt(switch_core_db *);
|
|||
*
|
||||
* This function is similar to the mysql_insert_id() function from MySQL.
|
||||
*/
|
||||
DoxyDefine(sqlite_int64 switch_core_db_last_insert_rowid(switch_core_db *);
|
||||
)
|
||||
DoxyDefine(sqlite_int64 switch_core_db_last_insert_rowid(switch_core_db *);)
|
||||
#define switch_core_db_last_insert_rowid sqlite3_last_insert_rowid
|
||||
/**
|
||||
* Open the sqlite database file "filename". The "filename" is UTF-8
|
||||
|
@ -1248,8 +1198,7 @@ DoxyDefine(void switch_core_db_interrupt(switch_core_db *);
|
|||
*/
|
||||
DoxyDefine(int switch_core_db_open(const char *filename, /* Database filename (UTF-8) */
|
||||
switch_core_db ** ppDb /* OUT: SQLite db handle */
|
||||
);
|
||||
)
|
||||
);)
|
||||
#define switch_core_db_open sqlite3_open
|
||||
/**
|
||||
* To execute an SQL query, it must first be compiled into a byte-code
|
||||
|
@ -1278,8 +1227,7 @@ DoxyDefine(int switch_core_db_prepare(sqlite3 *db, /* Database handle */
|
|||
int nBytes, /* Length of zSql in bytes. */
|
||||
sqlite3_stmt ** ppStmt, /* OUT: Statement handle */
|
||||
const char **pzTail /* OUT: Pointer to unused portion of zSql */
|
||||
);
|
||||
)
|
||||
);)
|
||||
#define switch_core_db_prepare sqlite3_prepare
|
||||
/**
|
||||
* Register a function for tracing SQL command evaluation. The function registered by
|
||||
|
@ -1289,8 +1237,7 @@ DoxyDefine(int switch_core_db_prepare(sqlite3 *db, /* Database handle */
|
|||
* The sqlite3_profile() API is currently considered experimental and
|
||||
* is subject to change.
|
||||
*/
|
||||
DoxyDefine(void *switch_core_db_profile(switch_core_db *, void (*xProfile) (void *, const char *, sqlite_uint64), void *);
|
||||
)
|
||||
DoxyDefine(void *switch_core_db_profile(switch_core_db *, void (*xProfile) (void *, const char *, sqlite_uint64), void *);)
|
||||
#define switch_core_db_profile sqlite3_profile
|
||||
/**
|
||||
* This routine configures a callback function - the progress callback - that
|
||||
|
@ -1318,8 +1265,7 @@ DoxyDefine(void *switch_core_db_profile(switch_core_db *, void (*xProfile) (void
|
|||
*
|
||||
****** THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_progress_handler(switch_core_db *, int, int (*)(void *), void *);
|
||||
)
|
||||
DoxyDefine(void switch_core_db_progress_handler(switch_core_db *, int, int (*)(void *), void *);)
|
||||
#define switch_core_db_progress_handler sqlite3_progress_handler
|
||||
/**
|
||||
* The switch_core_db_reset() function is called to reset a compiled SQL
|
||||
|
@ -1328,92 +1274,79 @@ DoxyDefine(void switch_core_db_progress_handler(switch_core_db *, int, int (*)(v
|
|||
* Any SQL statement variables that had values bound to them using
|
||||
* the switch_core_db_bind_*() API retain their values.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_reset(sqlite3_stmt * pStmt);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_reset(sqlite3_stmt * pStmt);)
|
||||
#define switch_core_db_reset sqlite3_reset
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_blob(sqlite3_context *, const void *, int, void (*)(void *));
|
||||
)
|
||||
DoxyDefine(void switch_core_db_result_blob(sqlite3_context *, const void *, int, void (*)(void *));)
|
||||
#define switch_core_db_result_blob sqlite3_result_blob
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_double(sqlite3_context *, double);
|
||||
)
|
||||
DoxyDefine(void switch_core_db_result_double(sqlite3_context *, double);)
|
||||
#define switch_core_db_result_double sqlite3_result_double
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_error(sqlite3_context *, const char *, int);
|
||||
)
|
||||
DoxyDefine(void switch_core_db_result_error(sqlite3_context *, const char *, int);)
|
||||
#define switch_core_db_result_error sqlite3_result_error
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_error16(sqlite3_context *, const void *, int);
|
||||
)
|
||||
DoxyDefine(void switch_core_db_result_error16(sqlite3_context *, const void *, int);)
|
||||
#define switch_core_db_result_error16 sqlite3_result_error16
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_int(sqlite3_context *, int);
|
||||
)
|
||||
DoxyDefine(void switch_core_db_result_int(sqlite3_context *, int);)
|
||||
#define switch_core_db_result_int sqlite3_result_int
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_int64(sqlite3_context *, sqlite_int64);
|
||||
)
|
||||
DoxyDefine(void switch_core_db_result_int64(sqlite3_context *, sqlite_int64);)
|
||||
#define switch_core_db_result_int64 sqlite3_result_int64
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_null(sqlite3_context *);
|
||||
)
|
||||
DoxyDefine(void switch_core_db_result_null(sqlite3_context *);)
|
||||
#define switch_core_db_result_null sqlite3_result_null
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_text(sqlite3_context *, const char *, int, void (*)(void *));
|
||||
)
|
||||
DoxyDefine(void switch_core_db_result_text(sqlite3_context *, const char *, int, void (*)(void *));)
|
||||
#define switch_core_db_result_text sqlite3_result_text
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_text16(sqlite3_context *, const void *, int, void (*)(void *));
|
||||
)
|
||||
DoxyDefine(void switch_core_db_result_text16(sqlite3_context *, const void *, int, void (*)(void *));)
|
||||
#define switch_core_db_result_text16 sqlite3_result_text16
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_text16le(sqlite3_context *, const void *, int, void (*)(void *));
|
||||
)
|
||||
DoxyDefine(void switch_core_db_result_text16le(sqlite3_context *, const void *, int, void (*)(void *));)
|
||||
#define switch_core_db_result_text16le sqlite3_result_text16le
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_text16be(sqlite3_context *, const void *, int, void (*)(void *));
|
||||
)
|
||||
DoxyDefine(void switch_core_db_result_text16be(sqlite3_context *, const void *, int, void (*)(void *));)
|
||||
#define switch_core_db_result_text16be sqlite3_result_text16be
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_value(sqlite3_context *, sqlite3_value *);
|
||||
)
|
||||
DoxyDefine(void switch_core_db_result_value(sqlite3_context *, sqlite3_value *);)
|
||||
#define switch_core_db_result_value sqlite3_result_value
|
||||
/**
|
||||
* This routine registers a callback with the SQLite library. The
|
||||
|
@ -1424,8 +1357,7 @@ DoxyDefine(void switch_core_db_result_value(sqlite3_context *, sqlite3_value *);
|
|||
* if the column should be treated as a NULL value.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_set_authorizer(switch_core_db *,
|
||||
int (*xAuth) (void *, int, const char *, const char *, const char *, const char *), void *pUserData);
|
||||
)
|
||||
int (*xAuth) (void *, int, const char *, const char *, const char *, const char *), void *pUserData);)
|
||||
#define switch_core_db_set_authorizer sqlite3_set_authorizer
|
||||
/**
|
||||
* After an SQL query has been compiled with a call to either
|
||||
|
@ -1459,8 +1391,7 @@ DoxyDefine(int switch_core_db_set_authorizer(switch_core_db *,
|
|||
* SQLITE_DONE. Or it could be the case the the same database connection
|
||||
* is being used simulataneously by two or more threads.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_step(sqlite3_stmt *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_step(sqlite3_stmt *);)
|
||||
#define switch_core_db_step sqlite3_step
|
||||
/**
|
||||
* If the following global variable is made to point to a
|
||||
|
@ -1472,8 +1403,7 @@ DoxyDefine(int switch_core_db_step(sqlite3_stmt *);
|
|||
* Once switch_core_db_open() has been called, changing this variable will invalidate
|
||||
* the current temporary database, if any.
|
||||
*/
|
||||
DoxyDefine(extern char *switch_core_db_temp_directory;
|
||||
)
|
||||
DoxyDefine(extern char *switch_core_db_temp_directory;)
|
||||
#define switch_core_db_temp_directory sqlite3_temp_directory
|
||||
/**
|
||||
* This function returns the number of database rows that have been
|
||||
|
@ -1491,16 +1421,14 @@ DoxyDefine(int switch_core_db_step(sqlite3_stmt *);
|
|||
* table. To get an accurate count of the number of rows deleted, use
|
||||
* "DELETE FROM table WHERE 1" instead.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_total_changes(switch_core_db *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_total_changes(switch_core_db *);)
|
||||
#define switch_core_db_total_changes sqlite3_total_changes
|
||||
/**
|
||||
* Register a function for tracing SQL command evaluation. The function
|
||||
* registered is invoked at the first switch_core_db_step()
|
||||
* for the evaluation of an SQL statement.
|
||||
*/
|
||||
DoxyDefine(void *switch_core_db_trace(switch_core_db *, void (*xTrace) (void *, const char *), void *);
|
||||
)
|
||||
DoxyDefine(void *switch_core_db_trace(switch_core_db *, void (*xTrace) (void *, const char *), void *);)
|
||||
#define switch_core_db_trace sqlite3_trace
|
||||
/**
|
||||
* Move all bindings from the first prepared statement over to the second.
|
||||
|
@ -1509,16 +1437,14 @@ DoxyDefine(void *switch_core_db_trace(switch_core_db *, void (*xTrace) (void *,
|
|||
* the second prepared statement then all of the bindings transfered over
|
||||
* to the second statement before the first statement is finalized.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_transfer_bindings(sqlite3_stmt *, sqlite3_stmt *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_transfer_bindings(sqlite3_stmt *, sqlite3_stmt *);)
|
||||
#define switch_core_db_transfer_bindings sqlite3_transfer_bindings
|
||||
/**
|
||||
* The pUserData parameter to the switch_core_db_create_function()
|
||||
* routine used to register user functions is available to
|
||||
* the implementation of the function using this call.
|
||||
*/
|
||||
DoxyDefine(void *switch_core_db_user_data(sqlite3_context *);
|
||||
)
|
||||
DoxyDefine(void *switch_core_db_user_data(sqlite3_context *);)
|
||||
#define switch_core_db_user_data sqlite3_user_data
|
||||
/**
|
||||
* returns information about parameters to
|
||||
|
@ -1528,8 +1454,7 @@ DoxyDefine(void *switch_core_db_user_data(sqlite3_context *);
|
|||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_value_blob(sqlite3_value *);
|
||||
)
|
||||
DoxyDefine(const void *switch_core_db_value_blob(sqlite3_value *);)
|
||||
#define switch_core_db_value_blob sqlite3_value_blob
|
||||
/**
|
||||
* returns information about parameters to
|
||||
|
@ -1539,8 +1464,7 @@ DoxyDefine(const void *switch_core_db_value_blob(sqlite3_value *);
|
|||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_value_bytes(sqlite3_value *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_value_bytes(sqlite3_value *);)
|
||||
#define switch_core_db_value_bytes sqlite3_value_bytes
|
||||
/**
|
||||
* returns information about parameters to
|
||||
|
@ -1550,8 +1474,7 @@ DoxyDefine(int switch_core_db_value_bytes(sqlite3_value *);
|
|||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_value_bytes16(sqlite3_value *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_value_bytes16(sqlite3_value *);)
|
||||
#define switch_core_db_value_bytes16 sqlite3_value_bytes16
|
||||
/**
|
||||
* returns information about parameters to
|
||||
|
@ -1561,8 +1484,7 @@ DoxyDefine(int switch_core_db_value_bytes16(sqlite3_value *);
|
|||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(double switch_core_db_value_double(sqlite3_value *);
|
||||
)
|
||||
DoxyDefine(double switch_core_db_value_double(sqlite3_value *);)
|
||||
#define switch_core_db_value_double sqlite3_value_double
|
||||
/**
|
||||
* returns information about parameters to
|
||||
|
@ -1572,8 +1494,7 @@ DoxyDefine(double switch_core_db_value_double(sqlite3_value *);
|
|||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_value_int(sqlite3_value *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_value_int(sqlite3_value *);)
|
||||
#define switch_core_db_value_int sqlite3_value_int
|
||||
/**
|
||||
* returns information about parameters to
|
||||
|
@ -1583,8 +1504,7 @@ DoxyDefine(int switch_core_db_value_int(sqlite3_value *);
|
|||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(sqlite_int64 switch_core_db_value_int64(sqlite3_value *);
|
||||
)
|
||||
DoxyDefine(sqlite_int64 switch_core_db_value_int64(sqlite3_value *);)
|
||||
#define switch_core_db_value_int64 sqlite3_value_int64
|
||||
/**
|
||||
* returns information about parameters to
|
||||
|
@ -1594,8 +1514,7 @@ DoxyDefine(int switch_core_db_value_int(sqlite3_value *);
|
|||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(const unsigned char *switch_core_db_value_text(sqlite3_value *);
|
||||
)
|
||||
DoxyDefine(const unsigned char *switch_core_db_value_text(sqlite3_value *);)
|
||||
#define switch_core_db_value_text sqlite3_value_text
|
||||
/**
|
||||
* returns information about parameters to
|
||||
|
@ -1605,8 +1524,7 @@ DoxyDefine(const unsigned char *switch_core_db_value_text(sqlite3_value *);
|
|||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_value_text16(sqlite3_value *);
|
||||
)
|
||||
DoxyDefine(const void *switch_core_db_value_text16(sqlite3_value *);)
|
||||
#define switch_core_db_value_text16 sqlite3_value_text16
|
||||
/**
|
||||
* returns information about parameters to
|
||||
|
@ -1616,8 +1534,7 @@ DoxyDefine(const void *switch_core_db_value_text16(sqlite3_value *);
|
|||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_value_text16be(sqlite3_value *);
|
||||
)
|
||||
DoxyDefine(const void *switch_core_db_value_text16be(sqlite3_value *);)
|
||||
#define switch_core_db_value_text16be sqlite3_value_text16be
|
||||
/**
|
||||
* returns information about parameters to
|
||||
|
@ -1627,8 +1544,7 @@ DoxyDefine(const void *switch_core_db_value_text16be(sqlite3_value *);
|
|||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_value_text16le(sqlite3_value *);
|
||||
)
|
||||
DoxyDefine(const void *switch_core_db_value_text16le(sqlite3_value *);)
|
||||
#define switch_core_db_value_text16le sqlite3_value_text16le
|
||||
/**
|
||||
* returns information about parameters to
|
||||
|
@ -1638,8 +1554,7 @@ DoxyDefine(const void *switch_core_db_value_text16le(sqlite3_value *);
|
|||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_value_type(sqlite3_value *);
|
||||
)
|
||||
DoxyDefine(int switch_core_db_value_type(sqlite3_value *);)
|
||||
#define switch_core_db_value_type sqlite3_value_type
|
||||
/**
|
||||
* This routine is a variant of the "sprintf()" from the
|
||||
|
@ -1682,8 +1597,7 @@ DoxyDefine(int switch_core_db_value_type(sqlite3_value *);
|
|||
* should always use %q instead of %s when inserting text into a string
|
||||
* literal.
|
||||
*/
|
||||
DoxyDefine(char *switch_core_db_mprintf(const char *, ...);
|
||||
)
|
||||
DoxyDefine(char *switch_core_db_mprintf(const char *, ...);)
|
||||
#define switch_core_db_mprintf sqlite3_mprintf
|
||||
#define switch_mprintf sqlite3_mprintf
|
||||
/**
|
||||
|
@ -1727,8 +1641,7 @@ DoxyDefine(char *switch_core_db_mprintf(const char *, ...);
|
|||
* should always use %q instead of %s when inserting text into a string
|
||||
* literal.
|
||||
*/
|
||||
DoxyDefine(char *switch_core_db_vmprintf(const char *, va_list);
|
||||
)
|
||||
DoxyDefine(char *switch_core_db_vmprintf(const char *, va_list);)
|
||||
#define switch_core_db_vmprintf sqlite3_vmprintf
|
||||
/**
|
||||
* This routine is a variant of the "sprintf()" from the
|
||||
|
@ -1771,14 +1684,12 @@ DoxyDefine(char *switch_core_db_vmprintf(const char *, va_list);
|
|||
* should always use %q instead of %s when inserting text into a string
|
||||
* literal.
|
||||
*/
|
||||
DoxyDefine(char *switch_core_db_snprintf(int, char *, const char *, ...);
|
||||
)
|
||||
DoxyDefine(char *switch_core_db_snprintf(int, char *, const char *, ...);)
|
||||
#define switch_core_db_snprintf sqlite3_snprintf
|
||||
/**
|
||||
* call this routine to free memory malloced by a call to switch_core_db_mprintf, switch_core_db_vmprintf, or switch_core_db_snprintf
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_free(char *z);
|
||||
)
|
||||
DoxyDefine(void switch_core_db_free(char *z);)
|
||||
#define switch_core_db_free sqlite3_free
|
||||
/** @} */
|
||||
/** @} */
|
||||
|
|
|
@ -997,7 +997,8 @@ typedef switch_status_t (*switch_module_shutdown_t) (void);
|
|||
typedef struct switch_xml *switch_xml_t;
|
||||
typedef struct switch_core_time_duration switch_core_time_duration_t;
|
||||
typedef switch_xml_t(*switch_xml_search_function_t) (const char *section,
|
||||
const char *tag_name, const char *key_name, const char *key_value, const char *params, void *user_data);
|
||||
const char *tag_name, const char *key_name, const char *key_value, const char *params,
|
||||
void *user_data);
|
||||
|
||||
/* things we don't deserve to know about */
|
||||
/*! \brief A channel */
|
||||
|
|
|
@ -312,7 +312,8 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_root(void);
|
|||
///\return SWITCH_STATUS_SUCCESS if successful root and node will be assigned
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_locate(const char *section,
|
||||
const char *tag_name,
|
||||
const char *key_name, const char *key_value, switch_xml_t * root, switch_xml_t * node, const char *params);
|
||||
const char *key_name, const char *key_value, switch_xml_t * root, switch_xml_t * node,
|
||||
const char *params);
|
||||
|
||||
///\brief open a config in the core registry
|
||||
///\param file_path the name of the config section e.g. modules.conf
|
||||
|
|
|
@ -80,7 +80,8 @@ static switch_status_t status_function(char *cmd, switch_core_session_t *session
|
|||
"UP %u year%s, %u day%s, %u hour%s, %u minute%s, %u second%s, %u millisecond%s, %u microsecond%s\n",
|
||||
duration.yr, duration.yr == 1 ? "" : "s", duration.day, duration.day == 1 ? "" : "s",
|
||||
duration.hr, duration.hr == 1 ? "" : "s", duration.min, duration.min == 1 ? "" : "s",
|
||||
duration.sec, duration.sec == 1 ? "" : "s", duration.ms, duration.ms == 1 ? "" : "s", duration.mms, duration.mms == 1 ? "" : "s");
|
||||
duration.sec, duration.sec == 1 ? "" : "s", duration.ms, duration.ms == 1 ? "" : "s", duration.mms,
|
||||
duration.mms == 1 ? "" : "s");
|
||||
|
||||
stream->write_function(stream, "%d sessions\n", switch_core_session_count());
|
||||
|
||||
|
|
|
@ -1457,7 +1457,8 @@ static void conference_loop_output(conference_member_t * member)
|
|||
launch_conference_loop_input(member, switch_core_session_get_pool(member->session));
|
||||
|
||||
/* build a digit stream object */
|
||||
if (member->conference->dtmf_parser != NULL && switch_ivr_digit_stream_new(member->conference->dtmf_parser, &member->digit_stream) != SWITCH_STATUS_SUCCESS) {
|
||||
if (member->conference->dtmf_parser != NULL
|
||||
&& switch_ivr_digit_stream_new(member->conference->dtmf_parser, &member->digit_stream) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Warning Will Robinson, there is no digit parser stream object\n");
|
||||
}
|
||||
|
||||
|
@ -1748,7 +1749,8 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t * t
|
|||
}
|
||||
|
||||
if (switch_core_file_open(&fh,
|
||||
rec->path, (uint8_t) 1, conference->rate, SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT, rec->pool) != SWITCH_STATUS_SUCCESS) {
|
||||
rec->path, (uint8_t) 1, conference->rate, SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT,
|
||||
rec->pool) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening File [%s]\n", rec->path);
|
||||
goto end;
|
||||
}
|
||||
|
@ -1954,7 +1956,8 @@ static switch_status_t conference_play_file(conference_obj_t * conference, char
|
|||
fnode->leadin = leadin;
|
||||
|
||||
/* Open the file */
|
||||
if (switch_core_file_open(&fnode->fh, file, (uint8_t) 1, conference->rate, SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, pool) != SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_core_file_open(&fnode->fh, file, (uint8_t) 1, conference->rate, SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, pool) !=
|
||||
SWITCH_STATUS_SUCCESS) {
|
||||
switch_core_destroy_memory_pool(&pool);
|
||||
status = SWITCH_STATUS_NOTFOUND;
|
||||
goto done;
|
||||
|
@ -2054,7 +2057,8 @@ static switch_status_t conference_member_play_file(conference_member_t * member,
|
|||
|
||||
/* Open the file */
|
||||
if (switch_core_file_open(&fnode->fh,
|
||||
file, (uint8_t) 1, member->conference->rate, SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, pool) != SWITCH_STATUS_SUCCESS) {
|
||||
file, (uint8_t) 1, member->conference->rate, SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT,
|
||||
pool) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_core_destroy_memory_pool(&pool);
|
||||
status = SWITCH_STATUS_NOTFOUND;
|
||||
goto done;
|
||||
|
@ -2120,7 +2124,8 @@ static switch_status_t conference_member_say(conference_member_t * member, char
|
|||
fnode->pool = pool;
|
||||
|
||||
memset(&fnode->sh, 0, sizeof(fnode->sh));
|
||||
if (switch_core_speech_open(&fnode->sh, conference->tts_engine, conference->tts_voice, conference->rate, &flags, fnode->pool) != SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_core_speech_open(&fnode->sh, conference->tts_engine, conference->tts_voice, conference->rate, &flags, fnode->pool) !=
|
||||
SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid TTS module [%s]!\n", conference->tts_engine);
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
@ -2191,7 +2196,8 @@ static switch_status_t conference_say(conference_obj_t * conference, const char
|
|||
fnode->leadin = leadin;
|
||||
|
||||
memset(&fnode->sh, 0, sizeof(fnode->sh));
|
||||
if (switch_core_speech_open(&fnode->sh, conference->tts_engine, conference->tts_voice, conference->rate, &flags, conference->pool) != SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_core_speech_open(&fnode->sh, conference->tts_engine, conference->tts_voice, conference->rate, &flags, conference->pool) !=
|
||||
SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid TTS module [%s]!\n", conference->tts_engine);
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
@ -3519,7 +3525,8 @@ static switch_status_t conference_outcall(conference_obj_t * conference,
|
|||
|
||||
/* establish an outbound call leg */
|
||||
if (switch_ivr_originate(session,
|
||||
&peer_session, cause, bridgeto, timeout, &audio_bridge_peer_state_handlers, cid_name, cid_num, NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
&peer_session, cause, bridgeto, timeout, &audio_bridge_peer_state_handlers, cid_name, cid_num,
|
||||
NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot create outgoing channel, cause: %s\n", switch_channel_cause2str(*cause));
|
||||
if (caller_channel) {
|
||||
switch_channel_hangup(caller_channel, *cause);
|
||||
|
|
|
@ -272,7 +272,8 @@ static void asrtest_function(switch_core_session_t *session, char *data)
|
|||
|
||||
|
||||
if (switch_core_asr_open(&ah, "lumenvox",
|
||||
read_codec->implementation->iananame, 8000, "127.0.0.1", &flags, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
|
||||
read_codec->implementation->iananame, 8000, "127.0.0.1", &flags,
|
||||
switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
|
||||
if (strcmp(ah.codec, read_codec->implementation->iananame)) {
|
||||
if (switch_core_codec_init(&codec,
|
||||
ah.codec,
|
||||
|
|
|
@ -254,7 +254,8 @@ static void rss_function(switch_core_session_t *session, char *data)
|
|||
NULL,
|
||||
(int) rate,
|
||||
interval,
|
||||
1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
|
||||
1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
|
||||
switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activated\n");
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Failed L16@%uhz 1 channel %dms\n", rate, interval);
|
||||
|
|
|
@ -243,7 +243,8 @@ static switch_status_t switch_amr_encode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag)
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
#ifdef AMR_PASSTHROUGH
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n");
|
||||
|
@ -265,7 +266,8 @@ static switch_status_t switch_amr_decode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag)
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
#ifdef AMR_PASSTHROUGH
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n");
|
||||
|
|
|
@ -55,7 +55,8 @@ static switch_status_t switch_g711u_encode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag)
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
short *dbuf;
|
||||
unsigned char *ebuf;
|
||||
|
@ -77,7 +78,8 @@ static switch_status_t switch_g711u_decode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag)
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
short *dbuf;
|
||||
unsigned char *ebuf;
|
||||
|
@ -125,7 +127,8 @@ static switch_status_t switch_g711a_encode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag)
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
short *dbuf;
|
||||
unsigned char *ebuf;
|
||||
|
@ -147,7 +150,8 @@ static switch_status_t switch_g711a_decode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag)
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
short *dbuf;
|
||||
unsigned char *ebuf;
|
||||
|
|
|
@ -76,7 +76,8 @@ static switch_status_t switch_g722_encode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag)
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct g722_context *context = codec->private_info;
|
||||
|
||||
|
@ -93,7 +94,8 @@ static switch_status_t switch_g722_decode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag)
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct g722_context *context = codec->private_info;
|
||||
|
||||
|
|
|
@ -109,7 +109,8 @@ static switch_status_t switch_g723_encode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag)
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
#ifdef G723_PASSTHROUGH
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n");
|
||||
|
@ -139,7 +140,8 @@ static switch_status_t switch_g723_decode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag)
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
#ifdef G723_PASSTHROUGH
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n");
|
||||
|
|
|
@ -114,7 +114,8 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag)
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
|
||||
g726_handle_t *handle = codec->private_info;
|
||||
|
@ -160,7 +161,8 @@ static switch_status_t switch_g726_decode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag)
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
|
||||
g726_handle_t *handle = codec->private_info;
|
||||
|
|
|
@ -95,7 +95,8 @@ static switch_status_t switch_g729_encode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag)
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
#ifdef G729_PASSTHROUGH
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n");
|
||||
|
@ -137,7 +138,8 @@ static switch_status_t switch_g729_decode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag)
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
#ifdef G729_PASSTHROUGH
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n");
|
||||
|
|
|
@ -98,7 +98,8 @@ static switch_status_t switch_ilbc_encode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag)
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct ilbc_context *context = codec->private_info;
|
||||
|
||||
|
@ -137,7 +138,8 @@ static switch_status_t switch_ilbc_decode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag)
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct ilbc_context *context = codec->private_info;
|
||||
|
||||
|
|
|
@ -52,7 +52,8 @@ static switch_status_t switch_raw_encode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag)
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
/* NOOP indicates that the audio in is already the same as the audio out, so no conversion was necessary. */
|
||||
if (codec && other_codec && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
|
||||
|
@ -67,7 +68,8 @@ static switch_status_t switch_raw_decode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag)
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
if (codec && other_codec && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
|
||||
memcpy(decoded_data, encoded_data, encoded_data_len);
|
||||
|
|
|
@ -87,7 +87,8 @@ static switch_status_t switch_lpc10_encode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag)
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct lpc10_context *context = codec->private_info;
|
||||
uint8_t i;
|
||||
|
@ -120,7 +121,8 @@ static switch_status_t switch_lpc10_decode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag)
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct lpc10_context *context = codec->private_info;
|
||||
int i;
|
||||
|
|
|
@ -157,7 +157,8 @@ static switch_status_t switch_speex_encode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag)
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct speex_context *context = codec->private_info;
|
||||
short *buf;
|
||||
|
@ -208,7 +209,8 @@ static switch_status_t switch_speex_decode(switch_codec_t *codec,
|
|||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag)
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct speex_context *context = codec->private_info;
|
||||
short *buf;
|
||||
|
|
|
@ -99,7 +99,8 @@ static switch_caller_extension_t *directory_dialplan_hunt(switch_core_session_t
|
|||
|
||||
caller_profile = switch_channel_get_caller_profile(channel);
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Hello %s You Dialed %s!\n", caller_profile->caller_id_name, caller_profile->destination_number);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Hello %s You Dialed %s!\n", caller_profile->caller_id_name,
|
||||
caller_profile->destination_number);
|
||||
|
||||
|
||||
if (!(globals.directory_name && globals.host && globals.dn && globals.base && globals.pass)) {
|
||||
|
|
|
@ -188,7 +188,8 @@ static int parse_exten(switch_core_session_t *session, switch_xml_t xexten, swit
|
|||
return proceed;
|
||||
}
|
||||
|
||||
static switch_status_t dialplan_xml_locate(switch_core_session_t *session, switch_caller_profile_t *caller_profile, switch_xml_t * root, switch_xml_t * node)
|
||||
static switch_status_t dialplan_xml_locate(switch_core_session_t *session, switch_caller_profile_t *caller_profile, switch_xml_t * root,
|
||||
switch_xml_t * node)
|
||||
{
|
||||
switch_status_t status = SWITCH_STATUS_GENERR;
|
||||
switch_channel_t *channel;
|
||||
|
|
|
@ -46,7 +46,8 @@ static switch_memory_pool_t *module_pool = NULL;
|
|||
|
||||
static char sub_sql[] =
|
||||
"CREATE TABLE subscriptions (\n"
|
||||
" sub_from VARCHAR(255),\n" " sub_to VARCHAR(255),\n" " show VARCHAR(255),\n" " status VARCHAR(255)\n" ");\n";
|
||||
" sub_from VARCHAR(255),\n" " sub_to VARCHAR(255),\n" " show VARCHAR(255),\n" " status VARCHAR(255)\n"
|
||||
");\n";
|
||||
|
||||
|
||||
typedef enum {
|
||||
|
@ -957,7 +958,8 @@ static switch_status_t negotiate_media(switch_core_session_t *session)
|
|||
|
||||
while (!(switch_test_flag(tech_pvt, TFLAG_CODEC_READY) &&
|
||||
switch_test_flag(tech_pvt, TFLAG_RTP_READY) &&
|
||||
switch_test_flag(tech_pvt, TFLAG_ANSWER) && switch_test_flag(tech_pvt, TFLAG_TRANSPORT_ACCEPT) && switch_test_flag(tech_pvt, TFLAG_TRANSPORT))) {
|
||||
switch_test_flag(tech_pvt, TFLAG_ANSWER) && switch_test_flag(tech_pvt, TFLAG_TRANSPORT_ACCEPT)
|
||||
&& switch_test_flag(tech_pvt, TFLAG_TRANSPORT))) {
|
||||
now = switch_time_now();
|
||||
elapsed = (unsigned int) ((now - started) / 1000);
|
||||
|
||||
|
@ -1758,7 +1760,8 @@ static switch_status_t init_profile(struct mdl_profile *profile, uint8_t login)
|
|||
"message[%s]\n"
|
||||
"rtp-ip[%s]\n"
|
||||
"name[%s]\n"
|
||||
"exten[%s]\n", profile->login, profile->password, profile->dialplan, profile->message, profile->ip, profile->name, profile->exten);
|
||||
"exten[%s]\n", profile->login, profile->password, profile->dialplan, profile->message, profile->ip, profile->name,
|
||||
profile->exten);
|
||||
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
@ -2129,7 +2132,8 @@ static void do_vcard(ldl_handle_t * handle, char *to, char *from, char *id)
|
|||
switch_safe_free(xmlstr);
|
||||
}
|
||||
|
||||
static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlsession, ldl_signal_t dl_signal, char *to, char *from, char *subject, char *msg)
|
||||
static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlsession, ldl_signal_t dl_signal, char *to, char *from, char *subject,
|
||||
char *msg)
|
||||
{
|
||||
struct mdl_profile *profile = NULL;
|
||||
switch_core_session_t *session = NULL;
|
||||
|
@ -2267,7 +2271,8 @@ static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlses
|
|||
|
||||
if (profile->auto_reply) {
|
||||
ldl_handle_send_msg(handle,
|
||||
(profile->user_flags & LDL_FLAG_COMPONENT) ? to : ldl_handle_get_login(profile->handle), from, "", profile->auto_reply);
|
||||
(profile->user_flags & LDL_FLAG_COMPONENT) ? to : ldl_handle_get_login(profile->handle), from, "",
|
||||
profile->auto_reply);
|
||||
}
|
||||
|
||||
if (strchr(to, '+')) {
|
||||
|
@ -2482,7 +2487,8 @@ static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlses
|
|||
|
||||
if (match && payloads[x].rate == tech_pvt->codecs[y]->samples_per_second) {
|
||||
tech_pvt->codec_index = y;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Choosing Payload index %u %s %u\n", y, payloads[x].name, payloads[x].id);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Choosing Payload index %u %s %u\n", y, payloads[x].name,
|
||||
payloads[x].id);
|
||||
tech_pvt->codec_name = tech_pvt->codecs[y]->iananame;
|
||||
tech_pvt->codec_num = tech_pvt->codecs[y]->ianacode;
|
||||
tech_pvt->r_codec_num = (switch_payload_t) (payloads[x].id);
|
||||
|
@ -2636,7 +2642,8 @@ static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlses
|
|||
ldl_session_get_value(dlsession,
|
||||
"aniii"),
|
||||
ldl_session_get_value(dlsession,
|
||||
"rdnis"), (char *) modname, context, exten)) != 0) {
|
||||
"rdnis"), (char *) modname, context,
|
||||
exten)) != 0) {
|
||||
char name[128];
|
||||
snprintf(name, sizeof(name), "DingaLing/%s", tech_pvt->caller_profile->destination_number);
|
||||
switch_channel_set_name(channel, name);
|
||||
|
|
|
@ -1248,7 +1248,8 @@ static int dump_info(void)
|
|||
if (inputParameters.channelCount > 0 && outputParameters.channelCount > 0) {
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,
|
||||
"full-duplex 16 bit %d channel input, %d channel output rates:", inputParameters.channelCount, outputParameters.channelCount);
|
||||
"full-duplex 16 bit %d channel input, %d channel output rates:", inputParameters.channelCount,
|
||||
outputParameters.channelCount);
|
||||
PrintSupportedStandardSampleRates(&inputParameters, &outputParameters);
|
||||
}
|
||||
}
|
||||
|
@ -1281,14 +1282,16 @@ static switch_status_t engage_device(int sample_rate, int codec_ms)
|
|||
|
||||
if (switch_core_codec_init(&globals.read_codec,
|
||||
"L16",
|
||||
NULL, sample_rate, codec_ms, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
NULL, sample_rate, codec_ms, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
|
||||
NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
|
||||
return SWITCH_STATUS_FALSE;
|
||||
} else {
|
||||
if (switch_core_codec_init(&globals.write_codec,
|
||||
"L16",
|
||||
NULL,
|
||||
sample_rate, codec_ms, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
sample_rate, codec_ms, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
|
||||
NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
|
||||
switch_core_codec_destroy(&globals.read_codec);
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
@ -1296,7 +1299,8 @@ static switch_status_t engage_device(int sample_rate, int codec_ms)
|
|||
}
|
||||
|
||||
if (switch_core_timer_init(&globals.timer,
|
||||
globals.timer_name, codec_ms, globals.read_codec.implementation->samples_per_frame, module_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
globals.timer_name, codec_ms, globals.read_codec.implementation->samples_per_frame,
|
||||
module_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "setup timer failed!\n");
|
||||
switch_core_codec_destroy(&globals.read_codec);
|
||||
switch_core_codec_destroy(&globals.write_codec);
|
||||
|
@ -1674,9 +1678,11 @@ static switch_status_t place_call(char **argv, int argc, switch_stream_handle_t
|
|||
|
||||
if ((tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
|
||||
NULL,
|
||||
dialplan, cid_name, cid_num, NULL, NULL, NULL, NULL, (char *) modname, NULL, dest)) != 0) {
|
||||
dialplan, cid_name, cid_num, NULL, NULL, NULL, NULL, (char *) modname, NULL,
|
||||
dest)) != 0) {
|
||||
char name[128];
|
||||
snprintf(name, sizeof(name), "PortAudio/%s", tech_pvt->caller_profile->destination_number ? tech_pvt->caller_profile->destination_number : modname);
|
||||
snprintf(name, sizeof(name), "PortAudio/%s",
|
||||
tech_pvt->caller_profile->destination_number ? tech_pvt->caller_profile->destination_number : modname);
|
||||
switch_channel_set_name(channel, name);
|
||||
|
||||
switch_channel_set_caller_profile(channel, tech_pvt->caller_profile);
|
||||
|
|
|
@ -191,7 +191,8 @@ static unsigned long RoundUpToNextPowerOf2(unsigned long n)
|
|||
*
|
||||
*/
|
||||
PaError OpenAudioStream(PABLIO_Stream ** rwblPtr,
|
||||
const PaStreamParameters * inputParameters, const PaStreamParameters * outputParameters, double sampleRate, PaStreamFlags streamFlags)
|
||||
const PaStreamParameters * inputParameters, const PaStreamParameters * outputParameters, double sampleRate,
|
||||
PaStreamFlags streamFlags)
|
||||
{
|
||||
long bytesPerSample;
|
||||
PaError err;
|
||||
|
|
|
@ -108,7 +108,8 @@ static char sub_sql[] =
|
|||
static char auth_sql[] =
|
||||
"CREATE TABLE sip_authentication (\n"
|
||||
" user VARCHAR(255),\n"
|
||||
" host VARCHAR(255),\n" " passwd VARCHAR(255),\n" " nonce VARCHAR(255),\n" " expires INTEGER(8)" ");\n";
|
||||
" host VARCHAR(255),\n" " passwd VARCHAR(255),\n" " nonce VARCHAR(255),\n" " expires INTEGER(8)"
|
||||
");\n";
|
||||
|
||||
static const char modname[] = "mod_sofia";
|
||||
#define STRLEN 15
|
||||
|
@ -331,7 +332,8 @@ static switch_status_t sofia_on_loopback(switch_core_session_t *session);
|
|||
static switch_status_t sofia_on_transmit(switch_core_session_t *session);
|
||||
|
||||
static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session,
|
||||
switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session, switch_memory_pool_t ** pool);
|
||||
switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session,
|
||||
switch_memory_pool_t **pool);
|
||||
|
||||
static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
|
||||
|
||||
|
@ -956,7 +958,8 @@ static switch_status_t tech_choose_port(private_object_t * tech_pvt)
|
|||
sdp_port = tech_pvt->local_sdp_audio_port;
|
||||
|
||||
if (tech_pvt->profile->extrtpip) {
|
||||
if (sofia_ext_address_lookup(&ip, &sdp_port, tech_pvt->profile->extrtpip, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
|
||||
if (sofia_ext_address_lookup(&ip, &sdp_port, tech_pvt->profile->extrtpip, switch_core_session_get_pool(tech_pvt->session)) !=
|
||||
SWITCH_STATUS_SUCCESS) {
|
||||
terminate_session(&tech_pvt->session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, __LINE__);
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
@ -1065,7 +1068,8 @@ static switch_status_t do_invite(switch_core_session_t *session)
|
|||
char *url = get_url_from_contact(tech_pvt->dest, 1);
|
||||
tech_pvt->nh = nua_handle(tech_pvt->profile->nua, NULL,
|
||||
NUTAG_URL(url),
|
||||
SIPTAG_TO_STR(tech_pvt->dest_to), SIPTAG_FROM_STR(tech_pvt->from_str), SIPTAG_CONTACT_STR(tech_pvt->profile->url), TAG_END());
|
||||
SIPTAG_TO_STR(tech_pvt->dest_to), SIPTAG_FROM_STR(tech_pvt->from_str), SIPTAG_CONTACT_STR(tech_pvt->profile->url),
|
||||
TAG_END());
|
||||
switch_safe_free(url);
|
||||
|
||||
if (!(tech_pvt->sofia_private = malloc(sizeof(*tech_pvt->sofia_private)))) {
|
||||
|
@ -1158,7 +1162,8 @@ static void do_xfer_invite(switch_core_session_t *session)
|
|||
char *rep = switch_channel_get_variable(channel, SOFIA_REPLACES_HEADER);
|
||||
|
||||
tech_pvt->nh2 = nua_handle(tech_pvt->profile->nua, NULL,
|
||||
SIPTAG_TO_STR(tech_pvt->dest), SIPTAG_FROM_STR(tech_pvt->from_str), SIPTAG_CONTACT_STR(tech_pvt->profile->url), TAG_END());
|
||||
SIPTAG_TO_STR(tech_pvt->dest), SIPTAG_FROM_STR(tech_pvt->from_str), SIPTAG_CONTACT_STR(tech_pvt->profile->url),
|
||||
TAG_END());
|
||||
|
||||
|
||||
nua_handle_bind(tech_pvt->nh2, tech_pvt->sofia_private);
|
||||
|
@ -1557,7 +1562,8 @@ static switch_status_t activate_rtp(private_object_t * tech_pvt)
|
|||
if (tech_pvt->rtp_session && switch_test_flag(tech_pvt, TFLAG_REINVITE)) {
|
||||
switch_clear_flag_locked(tech_pvt, TFLAG_REINVITE);
|
||||
|
||||
if (switch_rtp_set_remote_address(tech_pvt->rtp_session, tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port, &err) != SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_rtp_set_remote_address(tech_pvt->rtp_session, tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port, &err) !=
|
||||
SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP REPORTS ERROR: [%s]\n", err);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "RTP CHANGING DEST TO: [%s:%d]\n",
|
||||
|
@ -1694,7 +1700,8 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session)
|
|||
|
||||
if (tech_pvt->nh) {
|
||||
if (tech_pvt->local_sdp_str) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Local SDP %s:\n%s\n", switch_channel_get_name(channel), tech_pvt->local_sdp_str);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Local SDP %s:\n%s\n", switch_channel_get_name(channel),
|
||||
tech_pvt->local_sdp_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2233,7 +2240,8 @@ static void logger(void *logarg, char const *fmt, va_list ap)
|
|||
|
||||
|
||||
static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session,
|
||||
switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session, switch_memory_pool_t ** pool)
|
||||
switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session,
|
||||
switch_memory_pool_t **pool)
|
||||
{
|
||||
switch_call_cause_t cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
|
||||
switch_core_session_t *nsession;
|
||||
|
@ -2621,7 +2629,8 @@ static switch_call_cause_t sip_cause_to_freeswitch(int status)
|
|||
static void set_hash_key(char *hash_key, int32_t len, sip_t const *sip)
|
||||
{
|
||||
|
||||
snprintf(hash_key, len, "%s%s%s", (char *) sip->sip_from->a_url->url_user, (char *) sip->sip_from->a_url->url_host, (char *) sip->sip_to->a_url->url_user);
|
||||
snprintf(hash_key, len, "%s%s%s", (char *) sip->sip_from->a_url->url_user, (char *) sip->sip_from->a_url->url_host,
|
||||
(char *) sip->sip_to->a_url->url_user);
|
||||
|
||||
|
||||
#if 0
|
||||
|
@ -3227,7 +3236,8 @@ typedef enum {
|
|||
REG_INVITE
|
||||
} sofia_regtype_t;
|
||||
|
||||
static uint8_t handle_register(nua_t * nua, sofia_profile_t * profile, nua_handle_t * nh, sip_t const *sip, sofia_regtype_t regtype, char *key, uint32_t keylen)
|
||||
static uint8_t handle_register(nua_t * nua, sofia_profile_t * profile, nua_handle_t * nh, sip_t const *sip, sofia_regtype_t regtype, char *key,
|
||||
uint32_t keylen)
|
||||
{
|
||||
sip_from_t const *from = NULL;
|
||||
sip_expires_t const *expires = NULL;
|
||||
|
@ -3389,7 +3399,8 @@ static uint8_t handle_register(nua_t * nua, sofia_profile_t * profile, nua_handl
|
|||
sql = switch_mprintf("delete from sip_authentication where user='%q' and host='%q';\n"
|
||||
"insert into sip_authentication values('%q','%q','%q','%q', %ld)",
|
||||
from_user, from_host, from_user, from_host, a1_hash, uuid_str, time(NULL) + profile->nonce_ttl);
|
||||
auth_str = switch_mprintf("Digest realm=\"%q\", nonce=\"%q\",%s algorithm=MD5, qop=\"auth\"", from_host, uuid_str, stale ? " stale=\"true\"," : "");
|
||||
auth_str =
|
||||
switch_mprintf("Digest realm=\"%q\", nonce=\"%q\",%s algorithm=MD5, qop=\"auth\"", from_host, uuid_str, stale ? " stale=\"true\"," : "");
|
||||
|
||||
|
||||
if (regtype == REG_REGISTER) {
|
||||
|
@ -3980,7 +3991,8 @@ static void sip_i_refer(nua_t * nua, sofia_profile_t * profile, nua_handle_t * n
|
|||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Transfer! [%s]\n", br_a);
|
||||
switch_channel_set_variable(channel_a, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "ATTENDED_TRANSFER_ERROR");
|
||||
nua_notify(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("message/sipfrag"),
|
||||
NUTAG_SUBSTATE(nua_substate_terminated), SIPTAG_PAYLOAD_STR("SIP/2.0 403 Forbidden"), SIPTAG_EVENT_STR(etmp), TAG_END());
|
||||
NUTAG_SUBSTATE(nua_substate_terminated), SIPTAG_PAYLOAD_STR("SIP/2.0 403 Forbidden"), SIPTAG_EVENT_STR(etmp),
|
||||
TAG_END());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -30,7 +30,8 @@ int tdmv_api_ioctl(HANDLE fd, wanpipe_tdm_api_cmd_t * tdm_api_cmd)
|
|||
|
||||
if (DeviceIoControl(fd,
|
||||
IoctlManagementCommand,
|
||||
(LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPDWORD) (&ln), (LPOVERLAPPED) NULL) == FALSE) {
|
||||
(LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPDWORD) (&ln),
|
||||
(LPOVERLAPPED) NULL) == FALSE) {
|
||||
//actual ioctl failed
|
||||
err = 1;
|
||||
prn(1, "Error: tdmv_api_ioctl(): DeviceIoControl failed!!\n");
|
||||
|
@ -68,7 +69,8 @@ int wanpipe_api_ioctl(HANDLE fd, wan_cmd_api_t * api_cmd)
|
|||
|
||||
if (DeviceIoControl(fd,
|
||||
IoctlManagementCommand,
|
||||
(LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPDWORD) (&ln), (LPOVERLAPPED) NULL) == FALSE) {
|
||||
(LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPDWORD) (&ln),
|
||||
(LPOVERLAPPED) NULL) == FALSE) {
|
||||
err = 1;
|
||||
prn(1, "Error: wanpipe_api_ioctl(): DeviceIoControl failed!!\n");
|
||||
return err;
|
||||
|
@ -108,7 +110,8 @@ static UCHAR DoWriteCommand(HANDLE drv, TX_DATA_STRUCT * pTx)
|
|||
|
||||
if (DeviceIoControl(drv,
|
||||
IoctlWriteCommand,
|
||||
(LPVOID) pTx, (ULONG) sizeof(TX_DATA_STRUCT), (LPVOID) pTx, sizeof(TX_DATA_STRUCT), (LPDWORD) (&ln), (LPOVERLAPPED) NULL) == FALSE) {
|
||||
(LPVOID) pTx, (ULONG) sizeof(TX_DATA_STRUCT), (LPVOID) pTx, sizeof(TX_DATA_STRUCT), (LPDWORD) (&ln),
|
||||
(LPOVERLAPPED) NULL) == FALSE) {
|
||||
//check messages log
|
||||
prn(1, "Error: DoWriteCommand(): DeviceIoControl failed!\n");
|
||||
return 1;
|
||||
|
@ -122,7 +125,8 @@ static USHORT DoApiPollCommand(HANDLE drv, API_POLL_STRUCT * api_poll_ptr)
|
|||
{
|
||||
DWORD ln;
|
||||
|
||||
if (DeviceIoControl(drv, IoctlApiPoll, (LPVOID) NULL, 0L, (LPVOID) api_poll_ptr, sizeof(API_POLL_STRUCT), (LPDWORD) (&ln), (LPOVERLAPPED) NULL) == FALSE) {
|
||||
if (DeviceIoControl(drv, IoctlApiPoll, (LPVOID) NULL, 0L, (LPVOID) api_poll_ptr, sizeof(API_POLL_STRUCT), (LPDWORD) (&ln), (LPOVERLAPPED) NULL) ==
|
||||
FALSE) {
|
||||
//check messages log
|
||||
prn(1, "Error: DoApiPollCommand(): DeviceIoControl failed!\n");
|
||||
return 1;
|
||||
|
|
|
@ -580,7 +580,8 @@ static switch_status_t wanpipe_on_init(switch_core_session_t *session)
|
|||
switch_core_session_get_uuid(session), sizeof(tech_pvt->ss7boost_handle->setup_array[tech_pvt->setup_index]));
|
||||
|
||||
|
||||
ss7boost_client_call_init(&event, tech_pvt->caller_profile->caller_id_number, tech_pvt->caller_profile->destination_number, tech_pvt->setup_index);
|
||||
ss7boost_client_call_init(&event, tech_pvt->caller_profile->caller_id_number, tech_pvt->caller_profile->destination_number,
|
||||
tech_pvt->setup_index);
|
||||
|
||||
if (ss7boost_client_connection_write(&tech_pvt->ss7boost_handle->mcon, &event) <= 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Critical System Error: Failed to tx on ISUP socket [%s]\n", strerror(errno));
|
||||
|
@ -1194,8 +1195,10 @@ static switch_call_cause_t wanpipe_outgoing_channel(switch_core_session_t *sessi
|
|||
pri_sr_set_bearer(sr, 0, SPANS[span]->l1);
|
||||
pri_sr_set_called(sr, caller_profile->destination_number, SPANS[span]->dp, 1);
|
||||
pri_sr_set_caller(sr,
|
||||
caller_profile->caller_id_number, caller_profile->caller_id_name, SPANS[span]->dp, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN);
|
||||
pri_sr_set_redirecting(sr, caller_profile->caller_id_number, SPANS[span]->dp, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, PRI_REDIR_UNCONDITIONAL);
|
||||
caller_profile->caller_id_number, caller_profile->caller_id_name, SPANS[span]->dp,
|
||||
PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN);
|
||||
pri_sr_set_redirecting(sr, caller_profile->caller_id_number, SPANS[span]->dp, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN,
|
||||
PRI_REDIR_UNCONDITIONAL);
|
||||
|
||||
if (pri_setup(spri->pri, tech_pvt->call, sr)) {
|
||||
switch_core_session_destroy(new_session);
|
||||
|
@ -1432,7 +1435,8 @@ static int on_ringing(struct sangoma_pri *spri, sangoma_pri_event_t event_type,
|
|||
switch_core_session_rwunlock(session);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||
"-- Ringing on channel s%dc%d %s but it's not in use?\n", spri->span, pevent->ringing.channel, chanmap->map[pevent->ringing.channel]);
|
||||
"-- Ringing on channel s%dc%d %s but it's not in use?\n", spri->span, pevent->ringing.channel,
|
||||
chanmap->map[pevent->ringing.channel]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1982,7 +1986,8 @@ static int parse_ss7_event(ss7boost_handle_t * ss7boost_handle, ss7boost_client_
|
|||
event->chan + 1,
|
||||
(event->called_number_digits_count ? (char *) event->called_number_digits : "N/A"),
|
||||
(event->calling_number_digits_count ? (char *) event->calling_number_digits : "N/A"),
|
||||
switch_channel_cause2str(event->release_cause), event->span + 1, event->chan + 1, event->event_id, event->call_setup_id, event->seqno);
|
||||
switch_channel_cause2str(event->release_cause), event->span + 1, event->chan + 1, event->event_id, event->call_setup_id,
|
||||
event->seqno);
|
||||
|
||||
|
||||
switch (event->event_id) {
|
||||
|
@ -2012,7 +2017,8 @@ static int parse_ss7_event(ss7boost_handle_t * ss7boost_handle, ss7boost_client_
|
|||
handle_call_stop_ack(ss7boost_handle, event);
|
||||
break;
|
||||
default:
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Warning no handler implemented for [%s]\n", ss7boost_client_event_id_name(event->event_id));
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Warning no handler implemented for [%s]\n",
|
||||
ss7boost_client_event_id_name(event->event_id));
|
||||
break;
|
||||
}
|
||||
switch_mutex_unlock(ss7boost_handle->mutex);
|
||||
|
|
|
@ -557,7 +557,8 @@ static switch_status_t shout_file_open(switch_file_handle_t *handle, char *path)
|
|||
context->stream_url = switch_core_sprintf(context->memory_pool, "http://%s", path);
|
||||
launch_read_stream_thread(context);
|
||||
} else {
|
||||
if (switch_file_open(&context->fd, path, SWITCH_FOPEN_READ, SWITCH_FPROT_UREAD | SWITCH_FPROT_UWRITE, handle->memory_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_file_open(&context->fd, path, SWITCH_FOPEN_READ, SWITCH_FPROT_UREAD | SWITCH_FPROT_UWRITE, handle->memory_pool) !=
|
||||
SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error opening %s\n", path);
|
||||
goto error;
|
||||
}
|
||||
|
|
|
@ -468,7 +468,8 @@ extern "C" {
|
|||
if (s->next) {
|
||||
s->next->prev = s->prev;
|
||||
}
|
||||
/* Insert s as second element in the list */ s->next = ty->next;
|
||||
/* Insert s as second element in the list */
|
||||
s-> next = ty->next;
|
||||
if (ty->next)
|
||||
ty->next->prev = s;
|
||||
ty->next = s;
|
||||
|
@ -1697,13 +1698,15 @@ extern "C" {
|
|||
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
||||
|
||||
static swig_type_info _swigt__p_switch_channel_t[] = { {"_p_switch_channel_t", 0, "switch_channel_t *", 0}, {"_p_switch_channel_t"}, {0} };
|
||||
static swig_type_info _swigt__p_switch_file_handle_t[] = { {"_p_switch_file_handle_t", 0, "switch_file_handle_t *", 0}, {"_p_switch_file_handle_t"}, {0} };
|
||||
static swig_type_info _swigt__p_switch_file_handle_t[] =
|
||||
{ {"_p_switch_file_handle_t", 0, "switch_file_handle_t *", 0}, {"_p_switch_file_handle_t"}, {0} };
|
||||
static swig_type_info _swigt__p_switch_core_session_t[] =
|
||||
{ {"_p_switch_core_session_t", 0, "switch_core_session_t *", 0}, {"_p_switch_core_session_t"}, {0} };
|
||||
static swig_type_info _swigt__p_p_switch_core_session_t[] =
|
||||
{ {"_p_p_switch_core_session_t", 0, "switch_core_session_t **", 0}, {"_p_p_switch_core_session_t"}, {0} };
|
||||
static swig_type_info _swigt__p_uint32_t[] = { {"_p_uint32_t", 0, "uint32_t *", 0}, {"_p_uint32_t"}, {0} };
|
||||
static swig_type_info _swigt__p_switch_input_callback_function_t[] = { {"_p_switch_input_callback_function_t", 0, "switch_input_callback_function_t *", 0},
|
||||
static swig_type_info _swigt__p_switch_input_callback_function_t[] =
|
||||
{ {"_p_switch_input_callback_function_t", 0, "switch_input_callback_function_t *", 0},
|
||||
{"_p_switch_input_callback_function_t"}, {0}
|
||||
};
|
||||
|
||||
|
|
|
@ -1538,7 +1538,8 @@ extern "C" {
|
|||
resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:return NULL;
|
||||
} static PyObject *_wrap_fs_core_init(PyObject * self, PyObject * args) {
|
||||
}
|
||||
static PyObject *_wrap_fs_core_init(PyObject * self, PyObject * args) {
|
||||
PyObject *resultobj = NULL;
|
||||
char *arg1 = (char *) 0;
|
||||
int result;
|
||||
|
@ -2448,11 +2449,13 @@ extern "C" {
|
|||
|
||||
static swig_type_info _swigt__p_char = { "_p_char", "char *", 0, 0, 0 };
|
||||
static swig_type_info _swigt__p_p_switch_core_session_t = { "_p_p_switch_core_session_t", "switch_core_session_t **", 0, 0, 0 };
|
||||
static swig_type_info _swigt__p_switch_channel_state_t = { "_p_switch_channel_state_t", "enum switch_channel_state_t *|switch_channel_state_t *", 0, 0, 0 };
|
||||
static swig_type_info _swigt__p_switch_channel_state_t =
|
||||
{ "_p_switch_channel_state_t", "enum switch_channel_state_t *|switch_channel_state_t *", 0, 0, 0 };
|
||||
static swig_type_info _swigt__p_switch_channel_t = { "_p_switch_channel_t", "switch_channel_t *", 0, 0, 0 };
|
||||
static swig_type_info _swigt__p_switch_core_session_t = { "_p_switch_core_session_t", "switch_core_session_t *", 0, 0, 0 };
|
||||
static swig_type_info _swigt__p_switch_file_handle_t = { "_p_switch_file_handle_t", "switch_file_handle_t *", 0, 0, 0 };
|
||||
static swig_type_info _swigt__p_switch_input_callback_function_t = { "_p_switch_input_callback_function_t", "switch_input_callback_function_t *", 0, 0, 0 };
|
||||
static swig_type_info _swigt__p_switch_input_callback_function_t =
|
||||
{ "_p_switch_input_callback_function_t", "switch_input_callback_function_t *", 0, 0, 0 };
|
||||
static swig_type_info _swigt__ptrdiff_t = { "_ptrdiff_t", "ptrdiff_t", 0, 0, 0 };
|
||||
static swig_type_info _swigt__size_t = { "_size_t", "size_t", 0, 0, 0 };
|
||||
|
||||
|
@ -2680,7 +2683,8 @@ extern "C" {
|
|||
SWIGINTERN PyObject *swig_varlink_repr(swig_varlinkobject * v) {
|
||||
v = v;
|
||||
return PyString_FromString("<Swig global variables>");
|
||||
} SWIGINTERN int swig_varlink_print(swig_varlinkobject * v, FILE * fp, int flags) {
|
||||
}
|
||||
SWIGINTERN int swig_varlink_print(swig_varlinkobject * v, FILE * fp, int flags) {
|
||||
swig_globalvar *var;
|
||||
flags = flags;
|
||||
fprintf(fp, "Swig global variables { ");
|
||||
|
|
|
@ -1337,7 +1337,8 @@ static JSBool session_speak(JSContext * cx, JSObject * obj, uintN argc, jsval *
|
|||
args.input_callback = dtmf_func;
|
||||
args.buf = bp;
|
||||
args.buflen = len;
|
||||
switch_ivr_speak_text(jss->session, tts_name, voice_name && strlen(voice_name) ? voice_name : NULL, codec->implementation->samples_per_second, text, &args);
|
||||
switch_ivr_speak_text(jss->session, tts_name, voice_name
|
||||
&& strlen(voice_name) ? voice_name : NULL, codec->implementation->samples_per_second, text, &args);
|
||||
JS_ResumeRequest(cx, cb_state.saveDepth);
|
||||
*rval = cb_state.ret;
|
||||
|
||||
|
@ -2135,7 +2136,8 @@ static JSBool session_originate(JSContext * cx, JSObject * obj, uintN argc, jsva
|
|||
}
|
||||
|
||||
caller_profile = switch_caller_profile_new(pool,
|
||||
username, dialplan, cid_name, cid_num, network_addr, ani, aniii, rdnis, (char *) modname, context, dest);
|
||||
username, dialplan, cid_name, cid_num, network_addr, ani, aniii, rdnis, (char *) modname, context,
|
||||
dest);
|
||||
|
||||
if (switch_ivr_originate(session, &peer_session, &jss->cause, dest, to ? atoi(to) : 60, NULL, NULL, NULL, caller_profile) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot Create Outgoing Channel! [%s]\n", dest);
|
||||
|
|
|
@ -407,7 +407,8 @@ int send_message(char *data, size_t len, char **rcpts)
|
|||
/* recipients */
|
||||
for (r = rcpts; *r != NULL; r++) {
|
||||
if ((ret = (esmtp ?
|
||||
mailesmtp_rcpt(smtp, *r, MAILSMTP_DSN_NOTIFY_FAILURE | MAILSMTP_DSN_NOTIFY_DELAY, NULL) : mailsmtp_rcpt(smtp, *r))) != MAILSMTP_NO_ERROR) {
|
||||
mailesmtp_rcpt(smtp, *r, MAILSMTP_DSN_NOTIFY_FAILURE | MAILSMTP_DSN_NOTIFY_DELAY, NULL) : mailsmtp_rcpt(smtp,
|
||||
*r))) != MAILSMTP_NO_ERROR) {
|
||||
fprintf(stderr, "mailsmtp_rcpt: %s: %s\n", *r, mailsmtp_strerror(ret));
|
||||
goto error;
|
||||
}
|
||||
|
|
|
@ -256,7 +256,8 @@ static switch_status_t en_ip(switch_core_session_t *session, char *tosay, switch
|
|||
}
|
||||
|
||||
|
||||
static switch_status_t en_say_time(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
|
||||
static switch_status_t en_say_time(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
|
||||
switch_input_args_t *args)
|
||||
{
|
||||
int32_t t;
|
||||
switch_time_t target = 0;
|
||||
|
@ -402,7 +403,8 @@ static switch_status_t en_say_time(switch_core_session_t *session, char *tosay,
|
|||
}
|
||||
|
||||
|
||||
static switch_status_t en_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
|
||||
static switch_status_t en_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
|
||||
switch_input_args_t *args)
|
||||
{
|
||||
switch_channel_t *channel;
|
||||
|
||||
|
|
|
@ -56,7 +56,8 @@ static size_t file_callback(void *ptr, size_t size, size_t nmemb, void *data)
|
|||
}
|
||||
|
||||
|
||||
static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, const char *key_name, const char *key_value, const char *params, void *user_data)
|
||||
static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, const char *key_name, const char *key_value, const char *params,
|
||||
void *user_data)
|
||||
{
|
||||
char filename[512] = "";
|
||||
CURL *curl_handle = NULL;
|
||||
|
|
|
@ -300,7 +300,8 @@ SWITCH_DECLARE(switch_status_t) switch_thread_cond_destroy(switch_thread_cond_t
|
|||
|
||||
/* file i/o stubs */
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_open(switch_file_t ** newf, const char *fname, int32_t flag, switch_fileperms_t perm, switch_memory_pool_t * pool)
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_open(switch_file_t ** newf, const char *fname, int32_t flag, switch_fileperms_t perm,
|
||||
switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_file_open(newf, fname, flag, perm, pool);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,8 @@ SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t * pool
|
|||
return SWITCH_STATUS_MEMERR;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_buffer_create_dynamic(switch_buffer_t **buffer, switch_size_t blocksize, switch_size_t start_len, switch_size_t max_len)
|
||||
SWITCH_DECLARE(switch_status_t) switch_buffer_create_dynamic(switch_buffer_t **buffer, switch_size_t blocksize, switch_size_t start_len,
|
||||
switch_size_t max_len)
|
||||
{
|
||||
switch_buffer_t *new_buffer;
|
||||
|
||||
|
|
|
@ -40,7 +40,8 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor
|
|||
const char *network_addr,
|
||||
const char *ani,
|
||||
const char *aniii,
|
||||
const char *rdnis, const char *source, const char *context, const char *destination_number)
|
||||
const char *rdnis, const char *source, const char *context,
|
||||
const char *destination_number)
|
||||
{
|
||||
|
||||
|
||||
|
|
|
@ -259,7 +259,8 @@ SWITCH_DECLARE(void) switch_channel_uninit(switch_channel_t *channel)
|
|||
switch_buffer_destroy(&channel->dtmf_buffer);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel, switch_core_session_t *session, switch_channel_state_t state, uint32_t flags)
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel, switch_core_session_t *session, switch_channel_state_t state,
|
||||
uint32_t flags)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
channel->state = state;
|
||||
|
|
|
@ -581,7 +581,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_init_and_modload(char *console, cons
|
|||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE,
|
||||
"\nFreeSWITCH Version %s Started.\nCrash Protection [%s]\nMax Sessions[%u]\n\n", SWITCH_VERSION_FULL, __CP, switch_core_session_limit(0));
|
||||
"\nFreeSWITCH Version %s Started.\nCrash Protection [%s]\nMax Sessions[%u]\n\n", SWITCH_VERSION_FULL, __CP,
|
||||
switch_core_session_limit(0));
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
}
|
||||
|
|
|
@ -151,7 +151,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec, ch
|
|||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Codec %s Exists but not at the desired implementation. %dhz %dms\n", codec_name, rate, ms);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Codec %s Exists but not at the desired implementation. %dhz %dms\n", codec_name, rate,
|
||||
ms);
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_NOTIMPL;
|
||||
|
@ -180,7 +181,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_encode(switch_codec_t *codec,
|
|||
}
|
||||
|
||||
|
||||
return codec->implementation->encode(codec, other_codec, decoded_data, decoded_data_len, decoded_rate, encoded_data, encoded_data_len, encoded_rate, flag);
|
||||
return codec->implementation->encode(codec, other_codec, decoded_data, decoded_data_len, decoded_rate, encoded_data, encoded_data_len, encoded_rate,
|
||||
flag);
|
||||
|
||||
}
|
||||
|
||||
|
@ -209,7 +211,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_decode(switch_codec_t *codec,
|
|||
}
|
||||
|
||||
|
||||
return codec->implementation->decode(codec, other_codec, encoded_data, encoded_data_len, encoded_rate, decoded_data, decoded_data_len, decoded_rate, flag);
|
||||
return codec->implementation->decode(codec, other_codec, encoded_data, encoded_data_len, encoded_rate, decoded_data, decoded_data_len, decoded_rate,
|
||||
flag);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
|
|||
}
|
||||
|
||||
if (session->endpoint_interface->io_routines->read_frame) {
|
||||
if ((status = session->endpoint_interface->io_routines->read_frame(session, frame, timeout, SWITCH_IO_FLAG_NOOP, stream_id)) == SWITCH_STATUS_SUCCESS) {
|
||||
if ((status =
|
||||
session->endpoint_interface->io_routines->read_frame(session, frame, timeout, SWITCH_IO_FLAG_NOOP, stream_id)) == SWITCH_STATUS_SUCCESS) {
|
||||
for (ptr = session->event_hooks.read_frame; ptr; ptr = ptr->next) {
|
||||
if ((status = ptr->read_frame(session, frame, timeout, SWITCH_IO_FLAG_NOOP, stream_id)) != SWITCH_STATUS_SUCCESS) {
|
||||
break;
|
||||
|
@ -246,7 +247,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
|
|||
status = SWITCH_STATUS_SUCCESS;
|
||||
break;
|
||||
default:
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec %s encoder error!\n", session->read_codec->codec_interface->interface_name);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec %s encoder error!\n",
|
||||
session->read_codec->codec_interface->interface_name);
|
||||
*frame = NULL;
|
||||
status = SWITCH_STATUS_GENERR;
|
||||
break;
|
||||
|
@ -500,7 +502,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
|
|||
status = SWITCH_STATUS_SUCCESS;
|
||||
break;
|
||||
default:
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec %s encoder error!\n", session->read_codec->codec_interface->interface_name);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec %s encoder error!\n",
|
||||
session->read_codec->codec_interface->interface_name);
|
||||
write_frame = NULL;
|
||||
return status;
|
||||
}
|
||||
|
@ -580,7 +583,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
|
|||
if (session->read_resampler) {
|
||||
short *data = write_frame->data;
|
||||
|
||||
session->read_resampler->from_len = switch_short_to_float(data, session->read_resampler->from, (int) write_frame->datalen / 2);
|
||||
session->read_resampler->from_len =
|
||||
switch_short_to_float(data, session->read_resampler->from, (int) write_frame->datalen / 2);
|
||||
session->read_resampler->to_len = (uint32_t)
|
||||
switch_resample_process(session->read_resampler, session->read_resampler->from,
|
||||
session->read_resampler->from_len,
|
||||
|
@ -628,7 +632,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_kill_channel(switch_
|
|||
switch_io_event_hook_kill_channel_t *ptr;
|
||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_INFO, "Kill %s [%s]\n", switch_channel_get_name(session->channel), SIG_NAMES[sig]);
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_INFO, "Kill %s [%s]\n", switch_channel_get_name(session->channel),
|
||||
SIG_NAMES[sig]);
|
||||
|
||||
if (session->endpoint_interface->io_routines->kill_channel) {
|
||||
if ((status = session->endpoint_interface->io_routines->kill_channel(session, sig)) == SWITCH_STATUS_SUCCESS) {
|
||||
|
|
|
@ -51,7 +51,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_lock(switch_core_sessio
|
|||
} else {
|
||||
status = (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock);
|
||||
#ifdef SWITCH_DEBUG_RWLOCKS
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "%s Read lock AQUIRED\n", switch_channel_get_name(session->channel));
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "%s Read lock AQUIRED\n",
|
||||
switch_channel_get_name(session->channel));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +75,8 @@ SWITCH_DECLARE(void) switch_core_session_write_lock(switch_core_session_t *sessi
|
|||
#ifdef SWITCH_DEBUG_RWLOCKS
|
||||
SWITCH_DECLARE(void) switch_core_session_perform_rwunlock(switch_core_session_t *session, const char *file, const char *func, int line)
|
||||
{
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "%s Read/Write lock CLEARED\n", switch_channel_get_name(session->channel));
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "%s Read/Write lock CLEARED\n",
|
||||
switch_channel_get_name(session->channel));
|
||||
#else
|
||||
SWITCH_DECLARE(void) switch_core_session_rwunlock(switch_core_session_t *session)
|
||||
{
|
||||
|
|
|
@ -145,7 +145,8 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
|
|||
if ((expanded =
|
||||
switch_channel_expand_variables(session->channel,
|
||||
extension->current_application->application_data)) != extension->current_application->application_data) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Expanded String %s(%s)\n", extension->current_application->application_name, expanded);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Expanded String %s(%s)\n", extension->current_application->application_name,
|
||||
expanded);
|
||||
}
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE) == SWITCH_STATUS_SUCCESS) {
|
||||
|
@ -343,7 +344,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
|
|||
while (proceed && (application_state_handler = switch_core_get_state_handler(index++)) != 0) {
|
||||
if (!application_state_handler || !application_state_handler->on_init ||
|
||||
(application_state_handler->on_init &&
|
||||
application_state_handler->on_init(session) == SWITCH_STATUS_SUCCESS && midstate == switch_channel_get_state(session->channel))) {
|
||||
application_state_handler->on_init(session) == SWITCH_STATUS_SUCCESS
|
||||
&& midstate == switch_channel_get_state(session->channel))) {
|
||||
proceed++;
|
||||
continue;
|
||||
} else {
|
||||
|
@ -377,7 +379,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
|
|||
while (proceed && (application_state_handler = switch_core_get_state_handler(index++)) != 0) {
|
||||
if (!application_state_handler || !application_state_handler->on_ring ||
|
||||
(application_state_handler->on_ring &&
|
||||
application_state_handler->on_ring(session) == SWITCH_STATUS_SUCCESS && midstate == switch_channel_get_state(session->channel))) {
|
||||
application_state_handler->on_ring(session) == SWITCH_STATUS_SUCCESS
|
||||
&& midstate == switch_channel_get_state(session->channel))) {
|
||||
proceed++;
|
||||
continue;
|
||||
} else {
|
||||
|
@ -429,7 +432,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
|
|||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State LOOPBACK\n", switch_channel_get_name(session->channel));
|
||||
if (!driver_state_handler->on_loopback
|
||||
|| (driver_state_handler->on_loopback
|
||||
&& driver_state_handler->on_loopback(session) == SWITCH_STATUS_SUCCESS && midstate == switch_channel_get_state(session->channel))) {
|
||||
&& driver_state_handler->on_loopback(session) == SWITCH_STATUS_SUCCESS
|
||||
&& midstate == switch_channel_get_state(session->channel))) {
|
||||
while ((application_state_handler = switch_channel_get_state_handler(session->channel, index++)) != 0) {
|
||||
if (!application_state_handler || !application_state_handler->on_loopback
|
||||
|| (application_state_handler->on_loopback
|
||||
|
@ -464,7 +468,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
|
|||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State TRANSMIT\n", switch_channel_get_name(session->channel));
|
||||
if (!driver_state_handler->on_transmit
|
||||
|| (driver_state_handler->on_transmit
|
||||
&& driver_state_handler->on_transmit(session) == SWITCH_STATUS_SUCCESS && midstate == switch_channel_get_state(session->channel))) {
|
||||
&& driver_state_handler->on_transmit(session) == SWITCH_STATUS_SUCCESS
|
||||
&& midstate == switch_channel_get_state(session->channel))) {
|
||||
|
||||
while ((application_state_handler = switch_channel_get_state_handler(session->channel, index++)) != 0) {
|
||||
if (!application_state_handler || !application_state_handler->on_transmit
|
||||
|
@ -518,7 +523,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
|
|||
while (proceed && (application_state_handler = switch_core_get_state_handler(index++)) != 0) {
|
||||
if (!application_state_handler || !application_state_handler->on_hold ||
|
||||
(application_state_handler->on_hold &&
|
||||
application_state_handler->on_hold(session) == SWITCH_STATUS_SUCCESS && midstate == switch_channel_get_state(session->channel))) {
|
||||
application_state_handler->on_hold(session) == SWITCH_STATUS_SUCCESS
|
||||
&& midstate == switch_channel_get_state(session->channel))) {
|
||||
proceed++;
|
||||
continue;
|
||||
} else {
|
||||
|
@ -535,7 +541,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
|
|||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State HIBERNATE\n", switch_channel_get_name(session->channel));
|
||||
if (!driver_state_handler->on_hibernate
|
||||
|| (driver_state_handler->on_hibernate
|
||||
&& driver_state_handler->on_hibernate(session) == SWITCH_STATUS_SUCCESS && midstate == switch_channel_get_state(session->channel))) {
|
||||
&& driver_state_handler->on_hibernate(session) == SWITCH_STATUS_SUCCESS
|
||||
&& midstate == switch_channel_get_state(session->channel))) {
|
||||
|
||||
while ((application_state_handler = switch_channel_get_state_handler(session->channel, index++)) != 0) {
|
||||
if (!application_state_handler || !application_state_handler->on_hibernate
|
||||
|
|
|
@ -865,7 +865,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *fun
|
|||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback, void *user_data)
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback,
|
||||
void *user_data)
|
||||
{
|
||||
switch_event_node_t *event_node;
|
||||
switch_event_subclass_t *subclass = NULL;
|
||||
|
|
|
@ -577,7 +577,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_
|
|||
msg.from = __FILE__;
|
||||
switch_core_session_receive_message(session, &msg);
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Transfer %s to %s[%s@%s]\n", switch_channel_get_name(channel), dialplan, extension, context);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Transfer %s to %s[%s@%s]\n", switch_channel_get_name(channel), dialplan, extension,
|
||||
context);
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -512,7 +512,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech(switch_core_session_t *
|
|||
if (switch_core_asr_open(ah,
|
||||
mod_name,
|
||||
"L16",
|
||||
read_codec->implementation->samples_per_second, dest, &flags, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
|
||||
read_codec->implementation->samples_per_second, dest, &flags,
|
||||
switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
|
||||
|
||||
if (switch_core_asr_load_grammar(ah, grammar, path) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error loading Grammar\n");
|
||||
|
|
|
@ -419,7 +419,8 @@ static switch_status_t signal_bridge_on_hangup(switch_core_session_t *session)
|
|||
switch_channel_set_variable(channel, SWITCH_BRIDGE_VARIABLE, NULL);
|
||||
switch_channel_set_variable(other_channel, SWITCH_BRIDGE_VARIABLE, NULL);
|
||||
|
||||
if (switch_channel_get_state(other_channel) < CS_HANGUP && switch_true(switch_channel_get_variable(other_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) {
|
||||
if (switch_channel_get_state(other_channel) < CS_HANGUP
|
||||
&& switch_true(switch_channel_get_variable(other_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) {
|
||||
switch_channel_hangup(other_channel, switch_channel_get_cause(channel));
|
||||
} else {
|
||||
switch_channel_set_state(other_channel, CS_EXECUTE);
|
||||
|
@ -508,7 +509,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_signal_bridge(switch_core_session_t *
|
|||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
|
||||
switch_core_session_t *peer_session,
|
||||
switch_input_callback_function_t input_callback, void *session_data, void *peer_session_data)
|
||||
switch_input_callback_function_t input_callback, void *session_data,
|
||||
void *peer_session_data)
|
||||
{
|
||||
switch_core_thread_session_t *this_audio_thread, *other_audio_thread;
|
||||
switch_channel_t *caller_channel, *peer_channel;
|
||||
|
@ -635,7 +637,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
|
|||
|
||||
done:
|
||||
|
||||
if (switch_channel_get_state(caller_channel) < CS_HANGUP && switch_true(switch_channel_get_variable(caller_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) {
|
||||
if (switch_channel_get_state(caller_channel) < CS_HANGUP
|
||||
&& switch_true(switch_channel_get_variable(caller_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) {
|
||||
switch_channel_hangup(caller_channel, switch_channel_get_cause(peer_channel));
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t ** new_me
|
|||
const char *invalid_sound,
|
||||
const char *exit_sound,
|
||||
const char *tts_engine,
|
||||
const char *tts_voice, const char *phrase_lang, int timeout, int max_failures, switch_memory_pool_t * pool)
|
||||
const char *tts_voice, const char *phrase_lang, int timeout, int max_failures,
|
||||
switch_memory_pool_t *pool)
|
||||
{
|
||||
switch_ivr_menu_t *menu;
|
||||
uint8_t newpool = 0;
|
||||
|
@ -488,7 +489,8 @@ static switch_ivr_menu_xml_map_t *switch_ivr_menu_stack_xml_find(switch_ivr_menu
|
|||
return (rc == 0 ? map : NULL);
|
||||
}
|
||||
|
||||
static switch_status_t switch_ivr_menu_stack_xml_add(switch_ivr_menu_xml_ctx_t * xml_ctx, char *name, int action, switch_ivr_menu_action_function_t * function)
|
||||
static switch_status_t switch_ivr_menu_stack_xml_add(switch_ivr_menu_xml_ctx_t * xml_ctx, char *name, int action,
|
||||
switch_ivr_menu_action_function_t * function)
|
||||
{
|
||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||
|
||||
|
|
|
@ -340,7 +340,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||
for (x = 0; x < var_count; x++) {
|
||||
char *inner_var_array[2];
|
||||
int inner_var_count;
|
||||
if ((inner_var_count = switch_separate_string(var_array[x], '=', inner_var_array, (sizeof(inner_var_array) / sizeof(inner_var_array[0])))) == 2) {
|
||||
if ((inner_var_count =
|
||||
switch_separate_string(var_array[x], '=', inner_var_array, (sizeof(inner_var_array) / sizeof(inner_var_array[0])))) == 2) {
|
||||
|
||||
switch_event_add_header(var_event, SWITCH_STACK_BOTTOM, inner_var_array[0], "%s", inner_var_array[1]);
|
||||
if (caller_channel) {
|
||||
|
@ -515,12 +516,15 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||
caller_profiles[i] = switch_caller_profile_new(pool,
|
||||
NULL,
|
||||
NULL,
|
||||
cid_name_override, cid_num_override, NULL, NULL, NULL, NULL, __FILE__, NULL, chan_data);
|
||||
cid_name_override, cid_num_override, NULL, NULL, NULL, NULL, __FILE__, NULL,
|
||||
chan_data);
|
||||
}
|
||||
}
|
||||
|
||||
if ((reason = switch_core_session_outgoing_channel(session, chan_type, caller_profiles[i], &peer_sessions[i], &pool)) != SWITCH_CAUSE_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel! cause: %s\n", switch_channel_cause2str(reason));
|
||||
if ((reason =
|
||||
switch_core_session_outgoing_channel(session, chan_type, caller_profiles[i], &peer_sessions[i], &pool)) != SWITCH_CAUSE_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel! cause: %s\n",
|
||||
switch_channel_cause2str(reason));
|
||||
if (pool) {
|
||||
switch_core_destroy_memory_pool(&pool);
|
||||
}
|
||||
|
|
|
@ -90,7 +90,8 @@ static switch_say_method_t get_say_type_by_name(char *name)
|
|||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *session, char *macro_name, char *data, char *lang, switch_input_args_t *args)
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *session, char *macro_name, char *data, char *lang,
|
||||
switch_input_args_t *args)
|
||||
{
|
||||
switch_xml_t cfg, xml = NULL, language, macros, macro, input, action;
|
||||
char *lname = NULL, *mname = NULL, hint_data[1024] = "", enc_hint[1024] = "";
|
||||
|
@ -365,7 +366,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
|
|||
read_codec->implementation->samples_per_second,
|
||||
read_codec->implementation->microseconds_per_frame / 1000,
|
||||
read_codec->implementation->number_of_channels,
|
||||
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
|
||||
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
|
||||
switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activated\n");
|
||||
switch_core_session_set_read_codec(session, &codec);
|
||||
} else {
|
||||
|
@ -879,7 +881,8 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
|
|||
uint32_t timeout,
|
||||
char *valid_terminators,
|
||||
char *prompt_audio_file,
|
||||
char *bad_input_audio_file, void *digit_buffer, uint32_t digit_buffer_length, char *digits_regex)
|
||||
char *bad_input_audio_file, void *digit_buffer, uint32_t digit_buffer_length,
|
||||
char *digits_regex)
|
||||
{
|
||||
|
||||
char terminator; //used to hold terminator recieved from
|
||||
|
|
|
@ -73,7 +73,8 @@ SWITCH_DECLARE(switch_status_t) switch_resample_create(switch_audio_resampler_t
|
|||
resampler->factor = (lto_rate / lfrom_rate);
|
||||
|
||||
resampler->resampler = resample_open(QUALITY, resampler->factor, resampler->factor);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Activate Resampler %d->%d %f\n", resampler->from_rate, resampler->to_rate, resampler->factor);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Activate Resampler %d->%d %f\n", resampler->from_rate, resampler->to_rate,
|
||||
resampler->factor);
|
||||
resampler->from_size = from_size;
|
||||
resampler->from = (float *) switch_core_alloc(pool, resampler->from_size);
|
||||
resampler->to_size = to_size;
|
||||
|
|
|
@ -357,7 +357,8 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session
|
|||
switch_payload_t payload,
|
||||
uint32_t samples_per_interval,
|
||||
uint32_t ms_per_packet,
|
||||
switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err, switch_memory_pool_t * pool)
|
||||
switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err,
|
||||
switch_memory_pool_t *pool)
|
||||
{
|
||||
switch_rtp_t *rtp_session = NULL;
|
||||
srtp_policy_t policy;
|
||||
|
@ -478,8 +479,10 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session
|
|||
}
|
||||
|
||||
if (!switch_strlen_zero(timer_name)) {
|
||||
if (switch_core_timer_init(&rtp_session->timer, timer_name, ms_per_packet / 1000, samples_per_interval, rtp_session->pool) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Starting timer [%s] %d bytes per %dms\n", timer_name, samples_per_interval, ms_per_packet);
|
||||
if (switch_core_timer_init(&rtp_session->timer, timer_name, ms_per_packet / 1000, samples_per_interval, rtp_session->pool) ==
|
||||
SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Starting timer [%s] %d bytes per %dms\n", timer_name, samples_per_interval,
|
||||
ms_per_packet);
|
||||
} else {
|
||||
memset(&rtp_session->timer, 0, sizeof(rtp_session->timer));
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error starting timer [%s], async RTP disabled\n", timer_name);
|
||||
|
@ -689,10 +692,10 @@ static void do_2833(switch_rtp_t *rtp_session)
|
|||
4,
|
||||
0,
|
||||
rtp_session->te,
|
||||
rtp_session->dtmf_data.timestamp_dtmf, rtp_session->dtmf_data.out_digit_seq, rtp_session->dtmf_data.out_digit_ssrc, &flags);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||
"Send %s packet for [%c] ts=%d sofar=%u dur=%d seq=%d\n", loops == 1 ? "middle" : "end",
|
||||
rtp_session->dtmf_data.out_digit, rtp_session->dtmf_data.timestamp_dtmf,
|
||||
rtp_session->dtmf_data.timestamp_dtmf, rtp_session->dtmf_data.out_digit_seq, rtp_session->dtmf_data.out_digit_ssrc,
|
||||
&flags);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Send %s packet for [%c] ts=%d sofar=%u dur=%d seq=%d\n",
|
||||
loops == 1 ? "middle" : "end", rtp_session->dtmf_data.out_digit, rtp_session->dtmf_data.timestamp_dtmf,
|
||||
rtp_session->dtmf_data.out_digit_sofar, duration, rtp_session->dtmf_data.out_digit_seq);
|
||||
|
||||
}
|
||||
|
@ -860,7 +863,8 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
|||
|
||||
if (!switch_strlen_zero(tx_host) && switch_sockaddr_get_port(rtp_session->from_addr) > 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
|
||||
"Auto Changing port from %s:%u to %s:%u\n", old_host, old, tx_host, switch_sockaddr_get_port(rtp_session->from_addr));
|
||||
"Auto Changing port from %s:%u to %s:%u\n", old_host, old, tx_host,
|
||||
switch_sockaddr_get_port(rtp_session->from_addr));
|
||||
switch_rtp_set_remote_address(rtp_session, tx_host, switch_sockaddr_get_port(rtp_session->from_addr), &err);
|
||||
}
|
||||
}
|
||||
|
@ -1332,7 +1336,8 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_disable_vad(switch_rtp_t *rtp_session
|
|||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_rtp_enable_vad(switch_rtp_t *rtp_session, switch_core_session_t *session, switch_codec_t *codec, switch_vad_flag_t flags)
|
||||
SWITCH_DECLARE(switch_status_t) switch_rtp_enable_vad(switch_rtp_t *rtp_session, switch_core_session_t *session, switch_codec_t *codec,
|
||||
switch_vad_flag_t flags)
|
||||
{
|
||||
|
||||
if (!switch_rtp_ready(rtp_session)) {
|
||||
|
|
|
@ -198,7 +198,8 @@ int fs_switch_ivr_collect_digits_callback(switch_core_session_t *session, switch
|
|||
}
|
||||
|
||||
int fs_switch_ivr_collect_digits_count(switch_core_session_t *session,
|
||||
char *buf, unsigned int buflen, unsigned int maxdigits, const char *terminators, char *terminator, unsigned int timeout)
|
||||
char *buf, unsigned int buflen, unsigned int maxdigits, const char *terminators, char *terminator,
|
||||
unsigned int timeout)
|
||||
{
|
||||
switch_status_t status;
|
||||
|
||||
|
|
|
@ -1081,7 +1081,8 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_parse_file(const char *file)
|
|||
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_locate(const char *section,
|
||||
const char *tag_name,
|
||||
const char *key_name, const char *key_value, switch_xml_t * root, switch_xml_t * node, const char *params)
|
||||
const char *key_name, const char *key_value, switch_xml_t * root, switch_xml_t * node,
|
||||
const char *params)
|
||||
{
|
||||
switch_xml_t conf = NULL;
|
||||
switch_xml_t tag = NULL;
|
||||
|
|
Loading…
Reference in New Issue