indent again

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4799 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-03-30 00:15:25 +00:00
parent debdfb1aab
commit c15d7892c0
91 changed files with 546 additions and 491 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/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 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 grep "} switch_" ./src/include/*.h | perl -ne '@l = split; $l[1] =~ s/;//g ; print " -T $l[1] "' >> ./.indent.pro

View File

@ -143,7 +143,7 @@ struct switch_media_bug {
struct switch_media_bug *next; struct switch_media_bug *next;
}; };
SWITCH_DECLARE(void) switch_core_sqldb_start(switch_memory_pool_t * pool); SWITCH_DECLARE(void) switch_core_sqldb_start(switch_memory_pool_t *pool);
SWITCH_DECLARE(void) switch_core_sqldb_stop(void); SWITCH_DECLARE(void) switch_core_sqldb_stop(void);
SWITCH_DECLARE(void) switch_core_session_init(switch_memory_pool_t * pool); SWITCH_DECLARE(void) switch_core_session_init(switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_memory_pool_t *) switch_core_memory_init(void); SWITCH_DECLARE(switch_memory_pool_t *) switch_core_memory_init(void);

View File

@ -55,7 +55,7 @@ SWITCH_BEGIN_EXTERN_C
* @{ * @{
*/ */
/** The fundamental pool type */ /** The fundamental pool type */
typedef struct apr_pool_t switch_memory_pool_t; typedef struct apr_pool_t switch_memory_pool_t;
/** /**
@ -66,7 +66,7 @@ typedef struct apr_pool_t switch_memory_pool_t;
* to re-use this memory for the next allocation. * to re-use this memory for the next allocation.
* @see apr_pool_destroy() * @see apr_pool_destroy()
*/ */
SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t * p); SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t *p);
/** @} */ /** @} */
@ -93,7 +93,7 @@ SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t * p);
* @bug We aught to provide an alternative to RTLD_GLOBAL, which * @bug We aught to provide an alternative to RTLD_GLOBAL, which
* is the only supported method of loading DSOs today. * is the only supported method of loading DSOs today.
*/ */
SWITCH_DECLARE(switch_status_t) switch_dso_load(switch_dso_handle_t ** res_handle, const char *path, switch_memory_pool_t * ctx); SWITCH_DECLARE(switch_status_t) switch_dso_load(switch_dso_handle_t ** res_handle, const char *path, switch_memory_pool_t *ctx);
/** /**
* Close a DSO library. * Close a DSO library.
@ -163,7 +163,7 @@ SWITCH_DECLARE(char *) switch_copy_string(char *dst, const char *src, switch_siz
* progress at the same time. * progress at the same time.
*/ */
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t * p, switch_hash_t * ht); SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t *p, switch_hash_t * ht);
/** /**
* Continue iterating over the entries in a hash table. * Continue iterating over the entries in a hash table.
@ -333,7 +333,7 @@ SWITCH_DECLARE(void) switch_sleep(switch_interval_time_t t);
* it will behave as either a nested or an unnested lock. * it will behave as either a nested or an unnested lock.
* *
*/ */
SWITCH_DECLARE(switch_status_t) switch_mutex_init(switch_mutex_t ** lock, unsigned int flags, switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_mutex_init(switch_mutex_t ** lock, unsigned int flags, switch_memory_pool_t *pool);
/** /**
@ -375,7 +375,7 @@ SWITCH_DECLARE(switch_status_t) switch_mutex_trylock(switch_mutex_t * lock);
/** Opaque structure used for the rwlock */ /** Opaque structure used for the rwlock */
typedef struct apr_thread_rwlock_t switch_thread_rwlock_t; typedef struct apr_thread_rwlock_t switch_thread_rwlock_t;
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_create(switch_thread_rwlock_t ** rwlock, switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_create(switch_thread_rwlock_t ** rwlock, switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_destroy(switch_thread_rwlock_t * rwlock); SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_destroy(switch_thread_rwlock_t * rwlock);
SWITCH_DECLARE(switch_memory_pool_t *) switch_thread_rwlock_pool_get(switch_thread_rwlock_t * rwlock); SWITCH_DECLARE(switch_memory_pool_t *) switch_thread_rwlock_pool_get(switch_thread_rwlock_t * rwlock);
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_rdlock(switch_thread_rwlock_t * rwlock); SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_rdlock(switch_thread_rwlock_t * rwlock);
@ -408,7 +408,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_unlock(switch_thread_rwlock
* will be stored. * will be stored.
* @param pool the pool from which to allocate the mutex. * @param pool the pool from which to allocate the mutex.
*/ */
SWITCH_DECLARE(switch_status_t) switch_thread_cond_create(switch_thread_cond_t ** cond, switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_thread_cond_create(switch_thread_cond_t ** cond, switch_memory_pool_t *pool);
/** /**
* Put the active calling thread to sleep until signaled to wake up. Each * Put the active calling thread to sleep until signaled to wake up. Each
@ -522,7 +522,7 @@ SWITCH_DECLARE(switch_status_t) switch_uuid_parse(switch_uuid_t * uuid, const ch
* @param queue_capacity maximum size of the queue * @param queue_capacity maximum size of the queue
* @param a pool to allocate queue from * @param a pool to allocate queue from
*/ */
SWITCH_DECLARE(switch_status_t) switch_queue_create(switch_queue_t ** queue, unsigned int queue_capacity, switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_queue_create(switch_queue_t ** queue, unsigned int queue_capacity, switch_memory_pool_t *pool);
/** /**
* pop/get an object from the queue, blocking if the queue is already empty * pop/get an object from the queue, blocking if the queue is already empty
@ -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, * @remark If perm is SWITCH_FPROT_OS_DEFAULT and the file is being created,
* appropriate default permissions will be used. * 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); SWITCH_DECLARE(switch_status_t) switch_file_seek(switch_file_t * thefile, switch_seek_where_t where, int64_t *offset);
@ -694,7 +695,7 @@ SWITCH_DECLARE(switch_status_t) switch_file_close(switch_file_t * thefile);
* @remark If the file is open, it won't be removed until all * @remark If the file is open, it won't be removed until all
* instances are closed. * instances are closed.
*/ */
SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memory_pool_t *pool);
/** /**
* Read data from the specified file. * Read data from the specified file.
@ -762,7 +763,7 @@ SWITCH_DECLARE(switch_status_t) switch_threadattr_stacksize_set(switch_threadatt
* @param new_attr The newly created threadattr. * @param new_attr The newly created threadattr.
* @param cont The pool to use * @param cont The pool to use
*/ */
SWITCH_DECLARE(switch_status_t) switch_threadattr_create(switch_threadattr_t ** new_attr, switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_threadattr_create(switch_threadattr_t ** new_attr, switch_memory_pool_t *pool);
/** /**
* Set if newly created threads should be created in detached state. * Set if newly created threads should be created in detached state.
@ -780,7 +781,7 @@ SWITCH_DECLARE(switch_status_t) switch_threadattr_detach_set(switch_threadattr_t
* @param cont The pool to use * @param cont The pool to use
*/ */
SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t ** new_thread, switch_threadattr_t * attr, SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t ** new_thread, switch_threadattr_t * attr,
switch_thread_start_t func, void *data, switch_memory_pool_t * cont); switch_thread_start_t func, void *data, switch_memory_pool_t *cont);
/** @} */ /** @} */
@ -846,7 +847,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t ** new_thre
* @param protocol The protocol of the socket (e.g., SWITCH_PROTO_TCP). * @param protocol The protocol of the socket (e.g., SWITCH_PROTO_TCP).
* @param pool The pool to use * @param pool The pool to use
*/ */
SWITCH_DECLARE(switch_status_t) switch_socket_create(switch_socket_t ** new_sock, int family, int type, int protocol, switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_socket_create(switch_socket_t ** new_sock, int family, int type, int protocol, switch_memory_pool_t *pool);
/** /**
* Shutdown either reading, writing, or both sides of a socket. * Shutdown either reading, writing, or both sides of a socket.
@ -895,7 +896,7 @@ SWITCH_DECLARE(switch_status_t) switch_socket_listen(switch_socket_t * sock, int
* @param sock The socket we are listening on. * @param sock The socket we are listening on.
* @param connection_pool The pool for the new socket. * @param connection_pool The pool for the new socket.
*/ */
SWITCH_DECLARE(switch_status_t) switch_socket_accept(switch_socket_t ** new_sock, switch_socket_t * sock, switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_socket_accept(switch_socket_t ** new_sock, switch_socket_t * sock, switch_memory_pool_t *pool);
/** /**
* Issue a connection request to a socket either on the same machine * Issue a connection request to a socket either on the same machine
@ -935,7 +936,7 @@ SWITCH_DECLARE(switch_status_t) switch_sockaddr_ip_get(char **addr, switch_socka
* @param p The pool for the apr_sockaddr_t and associated storage. * @param p The pool for the apr_sockaddr_t and associated storage.
*/ */
SWITCH_DECLARE(switch_status_t) switch_sockaddr_info_get(switch_sockaddr_t ** sa, const char *hostname, SWITCH_DECLARE(switch_status_t) switch_sockaddr_info_get(switch_sockaddr_t ** sa, const char *hostname,
int32_t family, switch_port_t port, int32_t flags, switch_memory_pool_t * pool); int32_t family, switch_port_t port, int32_t flags, switch_memory_pool_t *pool);
/** /**
* Send data over a network. * Send data over a network.
@ -963,7 +964,8 @@ SWITCH_DECLARE(switch_status_t) switch_socket_send(switch_socket_t * sock, const
* @param buf The data to send * @param buf The data to send
* @param len The length of 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 * @param from The apr_sockaddr_t to fill in the recipient info
@ -1084,7 +1086,7 @@ SWITCH_DECLARE(switch_status_t) switch_mcast_join(switch_socket_t * sock, switch
* platforms; the apr_pollset_create() call will fail with * platforms; the apr_pollset_create() call will fail with
* APR_ENOTIMPL on platforms where it is not supported. * APR_ENOTIMPL on platforms where it is not supported.
*/ */
SWITCH_DECLARE(switch_status_t) switch_pollset_create(switch_pollset_t ** pollset, uint32_t size, switch_memory_pool_t * p, uint32_t flags); SWITCH_DECLARE(switch_status_t) switch_pollset_create(switch_pollset_t ** pollset, uint32_t size, switch_memory_pool_t *p, uint32_t flags);
/** /**
* Add a socket or file descriptor to a pollset * Add a socket or file descriptor to a pollset
@ -1128,7 +1130,7 @@ SWITCH_DECLARE(switch_status_t) switch_poll(switch_pollfd_t * aprset, int32_t nu
\param pool the memory pool to use \param pool the memory pool to use
\return SWITCH_STATUS_SUCCESS when successful \return SWITCH_STATUS_SUCCESS when successful
*/ */
SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t ** poll, switch_socket_t * sock, int16_t flags, switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t ** poll, switch_socket_t * sock, int16_t flags, switch_memory_pool_t *pool);
/** @} */ /** @} */

View File

@ -72,8 +72,9 @@ static const uint8_t SWITCH_REVERSE_BITPACKED_MASKS[] = { 255, 254, 252, 248, 24
\param buflen the length of the storage buffer \param buflen the length of the storage buffer
\param mode RFC3551 or AAL2 mode (curse you backwards folks) \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)) 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) { if (!pack || (bitlen > SWITCH_BITS_PER_BYTE) || !buf || !buflen) {
return -1; return -1;

View File

@ -58,7 +58,7 @@ SWITCH_BEGIN_EXTERN_C
* \param max_len length required by the buffer * \param max_len length required by the buffer
* \return status * \return status
*/ */
SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t * pool, switch_buffer_t **buffer, switch_size_t max_len); SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t *pool, switch_buffer_t **buffer, switch_size_t max_len);
/*! \brief Allocate a new dynamic switch_buffer /*! \brief Allocate a new dynamic switch_buffer
* \param buffer returned pointer to the new buffer * \param buffer returned pointer to the new buffer
@ -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 * \param max_len length the buffer is allowed to grow to
* \return status * \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 /*! \brief Get the length of a switch_buffer_t
* \param buffer any buffer of type switch_buffer_t * \param buffer any buffer of type switch_buffer_t

View File

@ -164,7 +164,7 @@ SWITCH_DECLARE(char *) switch_caller_get_field_by_name(switch_caller_profile_t *
\param destination_number destination number \param destination_number destination number
\return a new profile object allocated from the session's memory pool \return a new profile object allocated from the session's memory pool
*/ */
SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memory_pool_t * pool, SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memory_pool_t *pool,
const char *username, const char *username,
const char *dialplan, const char *dialplan,
const char *caller_id_name, const char *caller_id_name,
@ -172,7 +172,8 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor
const char *network_addr, const char *network_addr,
const char *ani, const char *ani,
const char *aniii, 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 \brief Clone an existing caller profile object

View File

@ -118,7 +118,7 @@ SWITCH_DECLARE(switch_channel_timetable_t *) switch_channel_get_timetable(switch
\param pool memory_pool to use for allocation \param pool memory_pool to use for allocation
\return SWITCH_STATUS_SUCCESS if successful \return SWITCH_STATUS_SUCCESS if successful
*/ */
SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t *pool);
/*! /*!
\brief Connect a newly allocated channel to a session object and setup it's initial state \brief Connect a newly allocated channel to a session object and setup it's initial state
@ -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 state the initial state of the channel
\param flags the initial channel flags \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 \brief Fire A presence event for the channel
@ -226,7 +227,7 @@ SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel_t *channel, ch
* pool is NULL, then an internal, non-thread-safe iterator is used. * pool is NULL, then an internal, non-thread-safe iterator is used.
* @remark Use switch_hash_next and switch_hash_this with this function to iterate all the channel variables * @remark Use switch_hash_next and switch_hash_this with this function to iterate all the channel variables
*/ */
SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t * pool); SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t *pool);
/*! /*!
\brief Assign a caller extension to a given channel \brief Assign a caller extension to a given channel

View File

@ -315,13 +315,13 @@ SWITCH_DECLARE(const switch_state_handler_table_t *) switch_core_get_state_handl
\brief Create a new sub memory pool from the core's master pool \brief Create a new sub memory pool from the core's master pool
\return SWITCH_STATUS_SUCCESS on success \return SWITCH_STATUS_SUCCESS on success
*/ */
SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t ** pool); SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t **pool);
/*! /*!
\brief Returns a subpool back to the main pool \brief Returns a subpool back to the main pool
\return SWITCH_STATUS_SUCCESS on success \return SWITCH_STATUS_SUCCESS on success
*/ */
SWITCH_DECLARE(switch_status_t) switch_core_destroy_memory_pool(switch_memory_pool_t ** pool); SWITCH_DECLARE(switch_status_t) switch_core_destroy_memory_pool(switch_memory_pool_t **pool);
/*! /*!
\brief Start the session's state machine \brief Start the session's state machine
@ -349,7 +349,7 @@ SWITCH_DECLARE(void *) switch_core_permanent_alloc(switch_size_t memory);
\param memory the number of bytes to allocate \param memory the number of bytes to allocate
\return a void pointer to the allocated memory \return a void pointer to the allocated memory
*/ */
SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool_t * pool, switch_size_t memory); SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool_t *pool, switch_size_t memory);
/*! /*!
\brief Allocate memory from a session's pool \brief Allocate memory from a session's pool
@ -381,7 +381,7 @@ SWITCH_DECLARE(char *) switch_core_session_strdup(switch_core_session_t *session
\param todup the string to duplicate \param todup the string to duplicate
\return a pointer to the newly duplicated string \return a pointer to the newly duplicated string
*/ */
SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool_t * pool, const char *todup); SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool_t *pool, const char *todup);
/*! /*!
\brief printf-style style printing routine. The data is output to a string allocated from the session \brief printf-style style printing routine. The data is output to a string allocated from the session
@ -399,7 +399,7 @@ SWITCH_DECLARE(char *) switch_core_session_sprintf(switch_core_session_t *sessio
\param ... The arguments to use while printing the data \param ... The arguments to use while printing the data
\return The new string \return The new string
*/ */
SWITCH_DECLARE(char *) switch_core_sprintf(switch_memory_pool_t * pool, const char *fmt, ...); SWITCH_DECLARE(char *) switch_core_sprintf(switch_memory_pool_t *pool, const char *fmt, ...);
/*! /*!
\brief Retrieve the memory pool from a session \brief Retrieve the memory pool from a session
@ -420,7 +420,7 @@ SWITCH_DECLARE(switch_memory_pool_t *) switch_core_session_get_pool(switch_core_
\return the newly created session \return the newly created session
*/ */
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch_endpoint_interface_t SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch_endpoint_interface_t
*endpoint_interface, switch_memory_pool_t ** pool); *endpoint_interface, switch_memory_pool_t **pool);
/*! /*!
\brief Destroy a session and return the memory pool to the core \brief Destroy a session and return the memory pool to the core
@ -441,7 +441,7 @@ SWITCH_DECLARE(uint32_t) switch_core_session_count(void);
\param pool the pool to use \param pool the pool to use
\return the newly created session \return the newly created session
*/ */
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t ** pool); SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t **pool);
/*! /*!
\brief Launch the session thread (state machine) on a given session \brief Launch the session thread (state machine) on a given session
@ -637,7 +637,7 @@ SWITCH_DECLARE(void) switch_core_service_session(switch_core_session_t *session,
SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_core_session_t *session, SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_core_session_t *session,
char *endpoint_name, char *endpoint_name,
switch_caller_profile_t *caller_profile, switch_caller_profile_t *caller_profile,
switch_core_session_t **new_session, switch_memory_pool_t ** pool); switch_core_session_t **new_session, switch_memory_pool_t **pool);
/*! /*!
\brief Answer the channel of a given session \brief Answer the channel of a given session
@ -778,7 +778,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf(switch_core_sessio
\param pool the pool to use for the new hash \param pool the pool to use for the new hash
\return SWITCH_STATUS_SUCCESS if the hash is created \return SWITCH_STATUS_SUCCESS if the hash is created
*/ */
SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t ** hash, switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t ** hash, switch_memory_pool_t *pool);
/*! /*!
\brief Destroy an existing hash table \brief Destroy an existing hash table
@ -835,7 +835,7 @@ SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash_t * hash, const char *k
\param pool the memory pool to use for allocation \param pool the memory pool to use for allocation
\return \return
*/ */
SWITCH_DECLARE(switch_status_t) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval, int samples, switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval, int samples, switch_memory_pool_t *pool);
/*! /*!
\brief Wait for one cycle on an existing timer \brief Wait for one cycle on an existing timer
@ -888,7 +888,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec,
uint32_t rate, uint32_t rate,
int ms, int ms,
int channels, int channels,
uint32_t flags, const switch_codec_settings_t *codec_settings, switch_memory_pool_t * pool); uint32_t flags, const switch_codec_settings_t *codec_settings, switch_memory_pool_t *pool);
/*! /*!
\brief Encode data using a codec handle \brief Encode data using a codec handle
@ -988,7 +988,7 @@ SWITCH_DECLARE(switch_core_db_t *) switch_core_db_open_file(char *filename);
\return SWITCH_STATUS_SUCCESS if successful \return SWITCH_STATUS_SUCCESS if successful
*/ */
SWITCH_DECLARE(switch_status_t) switch_core_db_persistant_execute(switch_core_db_t * db, char *sql, uint32_t retries); SWITCH_DECLARE(switch_status_t) switch_core_db_persistant_execute(switch_core_db_t *db, char *sql, uint32_t retries);
/*! /*!
\brief perform a test query then perform a reactive query if the first one fails \brief perform a test query then perform a reactive query if the first one fails
@ -996,7 +996,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_db_persistant_execute(switch_core_db
\param test_sql the test sql \param test_sql the test sql
\param reactive_sql the reactive sql \param reactive_sql the reactive sql
*/ */
SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t * db, char *test_sql, char *reactive_sql); SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t *db, char *test_sql, char *reactive_sql);
#define SWITCH_CORE_DB "core" #define SWITCH_CORE_DB "core"
/*! /*!
@ -1021,7 +1021,7 @@ SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t * db, char *t
\note the loadable module used is chosen based on the file extension \note the loadable module used is chosen based on the file extension
*/ */
SWITCH_DECLARE(switch_status_t) switch_core_file_open(switch_file_handle_t *fh, SWITCH_DECLARE(switch_status_t) switch_core_file_open(switch_file_handle_t *fh,
char *file_path, uint8_t channels, uint32_t rate, unsigned int flags, switch_memory_pool_t * pool); char *file_path, uint8_t channels, uint32_t rate, unsigned int flags, switch_memory_pool_t *pool);
/*! /*!
\brief Read media from a file handle \brief Read media from a file handle
\param fh the file handle to read from (must be initilized by you memset all 0 for read, fill in channels and rate for write) \param fh the file handle to read from (must be initilized by you memset all 0 for read, fill in channels and rate for write)
@ -1092,7 +1092,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_close(switch_file_handle_t *fh)
*/ */
SWITCH_DECLARE(switch_status_t) switch_core_speech_open(switch_speech_handle_t *sh, SWITCH_DECLARE(switch_status_t) switch_core_speech_open(switch_speech_handle_t *sh,
char *module_name, char *module_name,
char *voice_name, unsigned int rate, switch_speech_flag_t *flags, switch_memory_pool_t * pool); char *voice_name, unsigned int rate, switch_speech_flag_t *flags, switch_memory_pool_t *pool);
/*! /*!
\brief Feed text to the TTS module \brief Feed text to the TTS module
\param sh the speech handle to feed \param sh the speech handle to feed
@ -1165,7 +1165,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_speech_close(switch_speech_handle_t
*/ */
SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah, SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah,
char *module_name, char *module_name,
char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t * pool); char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t *pool);
/*! /*!
\brief Close an asr handle \brief Close an asr handle
@ -1250,7 +1250,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_resume(switch_asr_handle_t *ah);
\return SWITCH_STATUS_SUCCESS if the handle is opened \return SWITCH_STATUS_SUCCESS if the handle is opened
*/ */
SWITCH_DECLARE(switch_status_t) switch_core_directory_open(switch_directory_handle_t *dh, SWITCH_DECLARE(switch_status_t) switch_core_directory_open(switch_directory_handle_t *dh,
char *module_name, char *source, char *dsn, char *passwd, switch_memory_pool_t * pool); char *module_name, char *source, char *dsn, char *passwd, switch_memory_pool_t *pool);
/*! /*!
\brief Query a directory handle \brief Query a directory handle
@ -1360,7 +1360,7 @@ SWITCH_DECLARE(FILE *) switch_core_get_console(void);
/*! /*!
\brief Launch a thread \brief Launch a thread
*/ */
SWITCH_DECLARE(void) switch_core_launch_thread(void *(*func) (switch_thread_t *, void *), void *obj, switch_memory_pool_t * pool); SWITCH_DECLARE(void) switch_core_launch_thread(void *(*func) (switch_thread_t *, void *), void *obj, switch_memory_pool_t *pool);
/*! /*!
\brief Initiate Globals \brief Initiate Globals

View File

@ -50,7 +50,7 @@ SWITCH_BEGIN_EXTERN_C
* Each open database is represented by an instance of the * Each open database is represented by an instance of the
* following opaque structure. * following opaque structure.
*/ */
typedef struct sqlite3 switch_core_db_t; typedef struct sqlite3 switch_core_db_t;
typedef struct sqlite3_stmt switch_core_db_stmt_t; typedef struct sqlite3_stmt switch_core_db_stmt_t;
typedef int (*switch_core_db_callback_func_t) (void *pArg, int argc, char **argv, char **columnNames); typedef int (*switch_core_db_callback_func_t) (void *pArg, int argc, char **argv, char **columnNames);
@ -82,7 +82,7 @@ typedef void (*switch_core_db_destructor_type_t) (void *);
* this routine is called. Otherwise, SWITCH_CORE_DB_BUSY is returned and the * this routine is called. Otherwise, SWITCH_CORE_DB_BUSY is returned and the
* database connection remains open. * database connection remains open.
*/ */
SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t * db); SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t *db);
/** /**
* Open the database file "filename". The "filename" is UTF-8 * Open the database file "filename". The "filename" is UTF-8
@ -99,7 +99,7 @@ SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t * db);
* with the switch_core_db_t* handle should be released by passing it to * with the switch_core_db_t* handle should be released by passing it to
* switch_core_db_close() when it is no longer required. * switch_core_db_close() when it is no longer required.
*/ */
SWITCH_DECLARE(int) switch_core_db_open(const char *filename, switch_core_db_t ** ppDb); SWITCH_DECLARE(int) switch_core_db_open(const char *filename, switch_core_db_t **ppDb);
/** /**
* The next group of routines returns information about the information * The next group of routines returns information about the information
@ -164,7 +164,7 @@ SWITCH_DECLARE(int) switch_core_db_column_count(switch_core_db_stmt_t *pStmt);
* The string "not an error" is returned when the most recent API call was * The string "not an error" is returned when the most recent API call was
* successful. * successful.
*/ */
SWITCH_DECLARE(const char *) switch_core_db_errmsg(switch_core_db_t * db); SWITCH_DECLARE(const char *) switch_core_db_errmsg(switch_core_db_t *db);
/** /**
* A function to executes one or more statements of SQL. * A function to executes one or more statements of SQL.
@ -206,7 +206,7 @@ SWITCH_DECLARE(const char *) switch_core_db_errmsg(switch_core_db_t * db);
* behavior can be modified somewhat using the sswitch_core_db_busy_handler() * behavior can be modified somewhat using the sswitch_core_db_busy_handler()
* and switch_core_db_busy_timeout() functions below.) * and switch_core_db_busy_timeout() functions below.)
*/ */
SWITCH_DECLARE(int) switch_core_db_exec(switch_core_db_t * db, const char *sql, switch_core_db_callback_func_t callback, void *data, char **errmsg); SWITCH_DECLARE(int) switch_core_db_exec(switch_core_db_t *db, const char *sql, switch_core_db_callback_func_t callback, void *data, char **errmsg);
/** /**
* This function is called to delete a compiled * This function is called to delete a compiled
@ -246,7 +246,7 @@ SWITCH_DECLARE(int) switch_core_db_finalize(switch_core_db_stmt_t *pStmt);
* *
* On success, SWITCH_CORE_DB_OK is returned. Otherwise an error code is returned. * On success, SWITCH_CORE_DB_OK is returned. Otherwise an error code is returned.
*/ */
SWITCH_DECLARE(int) switch_core_db_prepare(switch_core_db_t * db, const char *zSql, int nBytes, switch_core_db_stmt_t **ppStmt, const char **pzTail); SWITCH_DECLARE(int) switch_core_db_prepare(switch_core_db_t *db, const char *zSql, int nBytes, switch_core_db_stmt_t **ppStmt, const char **pzTail);
/** /**
* After an SQL query has been compiled with a call to either * After an SQL query has been compiled with a call to either
@ -396,7 +396,7 @@ SWITCH_DECLARE(int) switch_core_db_bind_double(switch_core_db_stmt_t *pStmt, int
* *
* This function is similar to the mysql_insert_id() function from MySQL. * This function is similar to the mysql_insert_id() function from MySQL.
*/ */
SWITCH_DECLARE(int64_t) switch_core_db_last_insert_rowid(switch_core_db_t * db); SWITCH_DECLARE(int64_t) switch_core_db_last_insert_rowid(switch_core_db_t *db);
/** /**
* This next routine is really just a wrapper around switch_core_db_exec(). * This next routine is really just a wrapper around switch_core_db_exec().
@ -439,7 +439,7 @@ SWITCH_DECLARE(int64_t) switch_core_db_last_insert_rowid(switch_core_db_t * db);
* *
* The return value of this routine is the same as from switch_core_db_exec(). * The return value of this routine is the same as from switch_core_db_exec().
*/ */
SWITCH_DECLARE(int) switch_core_db_get_table(switch_core_db_t * db, /* An open database */ SWITCH_DECLARE(int) switch_core_db_get_table(switch_core_db_t *db, /* An open database */
const char *sql, /* SQL to be executed */ const char *sql, /* SQL to be executed */
char ***resultp, /* Result written to a char *[] that this points to */ char ***resultp, /* Result written to a char *[] that this points to */
int *nrow, /* Number of result rows written here */ int *nrow, /* Number of result rows written here */

View File

@ -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 \param outgoing_channel hook to bind
\return SWITCH_STATUS_SUCCESS on suceess \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 \brief Add an event hook to be executed when a session answers a channel

View File

@ -123,7 +123,7 @@ struct switch_event_node {
\param pool the memory pool to use for the event system (creates a new one if NULL) \param pool the memory pool to use for the event system (creates a new one if NULL)
\return SWITCH_STATUS_SUCCESS when complete \return SWITCH_STATUS_SUCCESS when complete
*/ */
SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool);
/*! /*!
\brief Stop the eventing system \brief Stop the eventing system
@ -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 \param user_data optional user specific data to pass whenever the callback is invoked
\return SWITCH_STATUS_SUCCESS if the event was binded \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 \brief Render the name of an event id enumeration

View File

@ -227,7 +227,8 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
uint32_t timeout, uint32_t timeout,
char *valid_terminators, char *valid_terminators,
char *audio_file, 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_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session_t *session,
switch_speech_handle_t *sh, 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_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
switch_core_session_t *peer_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 \brief Bridge Signalling from one session to another
@ -414,7 +416,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_transfer_variable(switch_core_session
\param parser a pointer to the object pointer \param parser a pointer to the object pointer
\return SWITCH_STATUS_SUCCESS if all is well \return SWITCH_STATUS_SUCCESS if all is well
*/ */
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_new(switch_memory_pool_t * pool, switch_ivr_digit_stream_parser_t ** parser); SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_new(switch_memory_pool_t *pool, switch_ivr_digit_stream_parser_t ** parser);
/*! /*!
\brief Destroy a digit stream parser object \brief Destroy a digit stream parser object
@ -541,7 +543,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t ** new_me
const char *invalid_sound, const char *invalid_sound,
const char *tts_engine, const char *tts_engine,
const char *tts_voice, const char *tts_voice,
const char *phrase_lang, int timeout, int max_failures, switch_memory_pool_t * pool); const char *phrase_lang, int timeout, int max_failures, switch_memory_pool_t *pool);
/*! /*!
*\brief switch_ivr_menu_bind_action: Bind a keystroke to an action. *\brief switch_ivr_menu_bind_action: Bind a keystroke to an action.
@ -613,9 +615,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_add_custom(switch_ivr_
*\param pool memory pool (NULL to create one) *\param pool memory pool (NULL to create one)
*\return SWITCH_STATUS_SUCCESS if all is well *\return SWITCH_STATUS_SUCCESS if all is well
*/ */
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_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 SWITCH_END_EXTERN_C

View File

@ -204,7 +204,7 @@ SWITCH_DECLARE(switch_management_interface_t *) switch_loadable_module_get_manag
\param arraylen the max size in elements of the array \param arraylen the max size in elements of the array
\return the number of elements added to the array \return the number of elements added to the array
*/ */
SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t * pool, const switch_codec_implementation_t **array, int arraylen); SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool, const switch_codec_implementation_t **array, int arraylen);
/*! /*!

View File

@ -74,7 +74,7 @@ typedef switch_status_t (*switch_log_function_t) (const switch_log_node_t *node,
\param pool the memory pool to use \param pool the memory pool to use
\note to be called at application startup by the core \note to be called at application startup by the core
*/ */
SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t * pool); SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t *pool);
/*! /*!
\brief Shut down the logging engine \brief Shut down the logging engine

View File

@ -74,7 +74,7 @@ SWITCH_BEGIN_EXTERN_C
#undef inline #undef inline
#define inline __inline #define inline __inline
#ifndef uint32_t #ifndef uint32_t
typedef unsigned __int8 uint8_t; typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t; typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t; typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t; typedef unsigned __int64 uint64_t;
@ -166,9 +166,9 @@ typedef int gid_t;
#define PRINTF_FUNCTION(fmtstr,vars) #define PRINTF_FUNCTION(fmtstr,vars)
#endif #endif
#ifdef SWITCH_INT32 #ifdef SWITCH_INT32
typedef SWITCH_INT32 switch_int32_t; typedef SWITCH_INT32 switch_int32_t;
#else #else
typedef int32_t switch_int32_t; typedef int32_t switch_int32_t;
#endif #endif
#ifdef SWITCH_SIZE_T #ifdef SWITCH_SIZE_T

View File

@ -40,16 +40,17 @@ SWITCH_BEGIN_EXTERN_C
* @ingroup FREESWITCH * @ingroup FREESWITCH
* @{ * @{
*/ */
typedef struct real_pcre switch_regex_t; 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); SWITCH_DECLARE(int) switch_regex_copy_substring(const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int size);
SWITCH_DECLARE(void) switch_regex_free(void *data); SWITCH_DECLARE(void) switch_regex_free(void *data);
SWITCH_DECLARE(int) switch_regex_perform(char *field, char *expression, switch_regex_t ** new_re, int *ovector, uint32_t olen); SWITCH_DECLARE(int) switch_regex_perform(char *field, char *expression, switch_regex_t **new_re, int *ovector, uint32_t olen);
SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t * re, int match_count, char *data, char *field_data, SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_count, char *data, char *field_data,
char *substituted, uint32_t len, int *ovector); char *substituted, uint32_t len, int *ovector);
/*! /*!

View File

@ -85,7 +85,7 @@ SWITCH_BEGIN_EXTERN_C
\return SWITCH_STATUS_SUCCESS if the handle was created \return SWITCH_STATUS_SUCCESS if the handle was created
*/ */
SWITCH_DECLARE(switch_status_t) switch_resample_create(switch_audio_resampler_t **new_resampler, SWITCH_DECLARE(switch_status_t) switch_resample_create(switch_audio_resampler_t **new_resampler,
int from_rate, switch_size_t from_size, int to_rate, uint32_t to_size, switch_memory_pool_t * pool); int from_rate, switch_size_t from_size, int to_rate, uint32_t to_size, switch_memory_pool_t *pool);
/*! /*!
\brief Destroy an existing resampler handle \brief Destroy an existing resampler handle

View File

@ -51,7 +51,7 @@ typedef void (*switch_rtp_invalid_handler_t) (switch_rtp_t *rtp_session,
\param pool the memory pool to use for long term allocations \param pool the memory pool to use for long term allocations
\note Generally called by the core_init \note Generally called by the core_init
*/ */
SWITCH_DECLARE(void) switch_rtp_init(switch_memory_pool_t * pool); SWITCH_DECLARE(void) switch_rtp_init(switch_memory_pool_t *pool);
/*! /*!
\brief Request a new port to be used for media \brief Request a new port to be used for media
@ -76,7 +76,8 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session
switch_payload_t payload, switch_payload_t payload,
uint32_t samples_per_interval, uint32_t samples_per_interval,
uint32_t ms_per_packet, 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);
/*! /*!
@ -102,7 +103,7 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(char *rx_host,
switch_payload_t payload, switch_payload_t payload,
uint32_t samples_per_interval, uint32_t samples_per_interval,
uint32_t ms_per_packet, 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);
/*! /*!

View File

@ -51,7 +51,7 @@ SWITCH_BEGIN_EXTERN_C
* Each open sqlite database is represented by an instance of the * Each open sqlite database is represented by an instance of the
* following opaque structure. * following opaque structure.
*/ */
typedef sqlite3 switch_core_db_t; typedef sqlite3 switch_core_db_t;
typedef sqlite3_stmt switch_core_db_stmt_t; typedef sqlite3_stmt switch_core_db_stmt_t;
/** /**
* Aggregate functions use the following routine to allocate * Aggregate functions use the following routine to allocate
@ -63,16 +63,14 @@ typedef sqlite3_stmt switch_core_db_stmt_t;
* *
* The buffer allocated is freed automatically by SQLite. * 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 #define switch_core_db_aggregate_context sqlite3_aggregate_context
/** /**
* /return the number of calls to xStep for a particular * /return the number of calls to xStep for a particular
* aggregate function instance. The current call to xStep counts so this * aggregate function instance. The current call to xStep counts so this
* routine always returns at least 1. * 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 #define switch_core_db_aggregate_count sqlite3_aggregate_count
/** /**
* In the SQL strings input to switch_core_db_prepare(), * 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 * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
* interpreted as NULL. * 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 #define switch_core_db_bind_blob sqlite3_bind_blob
/** /**
* In the SQL strings input to switch_core_db_prepare(), * 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 * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
* interpreted as NULL. * 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 #define switch_core_db_bind_double sqlite3_bind_double
/** /**
* In the SQL strings input to switch_core_db_prepare(), * 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 * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
* interpreted as NULL. * 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 #define switch_core_db_bind_int sqlite3_bind_int
/** /**
* In the SQL strings input to switch_core_db_prepare(), * 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 * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
* interpreted as NULL. * 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 #define switch_core_db_bind_int64 sqlite3_bind_int64
/** /**
* In the SQL strings input to switch_core_db_prepare(), * 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 * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
* interpreted as NULL. * 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 #define switch_core_db_bind_null sqlite3_bind_null
/** /**
* In the SQL strings input to switch_core_db_prepare(), * 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 * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
* interpreted as NULL. * 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 #define switch_core_db_bind_text sqlite3_bind_text
/** /**
* In the SQL strings input to switch_core_db_prepare(), * 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 * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
* interpreted as NULL. * 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 #define switch_core_db_bind_text16 sqlite3_bind_text16
/** /**
* In the SQL strings input to switch_core_db_prepare(), * 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 * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
* interpreted as NULL. * 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 #define switch_core_db_bind_value sqlite3_bind_value
/** /**
* @return The number of parameters in a compiled SQL statement. * @return The number of parameters in a compiled SQL statement.
* @remark This routine was added to support DBD::SQLite. * @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 #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 * @return the index of a parameter with the given name. If no parameter with the
* given name is found, return 0. * given name is found, return 0.
* @remark The name must match exactly. * @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 #define switch_core_db_bind_parameter_index sqlite3_bind_parameter_index
/** /**
* @return the name of the i-th parameter. * @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 * $VVV the complete text of the parameter name is returned, including
* the initial ":" or "$". NULL is returned if the index is out of range. * 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 #define switch_core_db_bind_parameter_name sqlite3_bind_parameter_name
/** /**
* This routine identifies a callback function that is invoked * 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 * data structures out from under the executing query and will
* probably result in a coredump. * 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 #define switch_core_db_busy_handler sqlite3_busy_handler
/** /**
* This routine sets a busy handler that sleeps for a while when a * 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 * Calling this routine with an argument less than or equal to zero
* turns off all busy handlers. * 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 #define switch_core_db_busy_timeout sqlite3_busy_timeout
/** /**
* This function returns the number of database rows that were changed * 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 * table. To get an accurate count of the number of rows deleted, use
* "DELETE FROM table WHERE 1" instead. * "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 #define switch_core_db_changes sqlite3_changes
/** /**
* A function to close the database. * 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 * this routine is called. Otherwise, SQLITE_BUSY is returned and the
* database connection remains open. * 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 #define switch_core_db_close sqlite3_close
/** /**
* To avoid having to register all collation sequences before a database * 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. * 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 *) 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 #define switch_core_db_collation_needed sqlite3_collation_needed
/** /**
* The next group of routines returns information about the information * 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. * @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 #define switch_core_db_column_blob sqlite3_column_blob
/** /**
* The next group of routines returns information about the information * 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 * TEXT value represented as UTF-8. The "\000" terminator is included in the
* byte count for TEXT values. * 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 #define switch_core_db_column_bytes sqlite3_column_bytes
/** /**
* The next group of routines returns information about the information * 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 * TEXT value represented as UTF-16. The "\u0000" terminator is included in
* the byte count for TEXT values. * 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 #define switch_core_db_column_bytes16 sqlite3_column_bytes16
/** /**
* The next group of routines returns information about the information * 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. * 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 #define switch_core_db_column_double sqlite3_column_double
/** /**
* The next group of routines returns information about the information * 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. * 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. * 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 #define switch_core_db_column_int sqlite3_column_int
/** /**
* The next group of routines returns information about the information * 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. * 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 #define switch_core_db_column_int64 sqlite3_column_int64
/** /**
* The next group of routines returns information about the information * 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. * 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 #define switch_core_db_column_text sqlite3_column_text
/** /**
* The next group of routines returns information about the information * 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. * 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 #define switch_core_db_column_text16 sqlite3_column_text16
/** /**
* The next group of routines returns information about the information * 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 * ReturnS the datatype of the result. This is one of
* SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, SQLITE_BLOB, or SQLITE_NULL. * 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 #define switch_core_db_column_type sqlite3_column_type
/** /**
* The first parameter is a compiled SQL statement. This function returns * 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 * the column heading for the Nth column of that statement, where N is the
* second function parameter. The string returned is UTF-8. * 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 #define switch_core_db_column_name sqlite3_column_name
/** /**
* Return the number of columns in the result set returned by the compiled * 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 * SQL statement. This routine returns 0 if pStmt is an SQL statement
* that does not return data (for example an UPDATE). * 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 #define switch_core_db_column_count sqlite3_column_count
/** /**
* The first parameter is a compiled SQL statement. If this statement * 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 * result column (i==1), and a NULL pointer for the first result column
* (i==0). * (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 #define switch_core_db_column_decltype sqlite3_column_decltype
/** /**
* The first parameter is a compiled SQL statement. If this statement * 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 * result column (i==1), and a NULL pointer for the first result column
* (i==0). * (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 #define switch_core_db_column_decltype16 sqlite3_column_decltype16
/** /**
* Register a callback function to be invoked whenever a new transaction * 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 ****** ****** 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 #define switch_core_db_commit_hook sqlite3_commit_hook
/** /**
* This functions return true if the given input string comprises * 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 * and comments is a semicolon, then return true. otherwise return
* false. * 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 #define switch_core_db_complete sqlite3_complete
/** /**
* This function is used to add new collation sequences to the * 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 *, 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 *) const char *zName, int eTextRep, void *, int (*xCompare) (void *, int, const void *, int, const void *)
); );)
)
#define switch_core_db_create_collation sqlite3_create_collation #define switch_core_db_create_collation sqlite3_create_collation
/** /**
* The following function is used to add user functions or aggregates * 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 *,
void (*xFunc) (sqlite3_context *, int, sqlite3_value **), void (*xFunc) (sqlite3_context *, int, sqlite3_value **),
void (*xStep) (sqlite3_context *, int, sqlite3_value **), void (*xFinal) (sqlite3_context *) void (*xStep) (sqlite3_context *, int, sqlite3_value **), void (*xFinal) (sqlite3_context *)
); );)
)
#define switch_core_db_create_function sqlite3_create_function #define switch_core_db_create_function sqlite3_create_function
/** /**
* Return the number of values in the current row of the result set. * 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 * error code, or before switch_core_db_step() has been called on a
* compiled SQL statement, this routine returns zero. * 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 #define switch_core_db_data_count sqlite3_data_count
/** /**
* Return the sqlite3* database handle to which the prepared statement given * 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 first argument to the switch_core_db_prepare() that was used to create
* the statement in the first place. * 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 #define switch_core_db_db_handle sqlite3_db_handle
/** /**
** Return the error code for the most recent switch_core_db_* API call associated ** 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 ** code returned by this function is associated with the same error as
** the strings returned by sqlite3_errmsg() and sqlite3_errmsg16(). ** 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 #define switch_core_db_errcode sqlite3_errcode
/** /**
* Return a pointer to a UTF-8 encoded string describing in english the * 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 * The string "not an error" is returned when the most recent API call was
* successful. * 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 #define switch_core_db_errmsg sqlite3_errmsg
/** /**
* A function to executes one or more statements of SQL. * 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 */ sqlite3_callback, /* Callback function */
void *, /* 1st argument to callback function */ void *, /* 1st argument to callback function */
char **errmsg /* Error msg written here */ char **errmsg /* Error msg written here */
); );)
)
#define switch_core_db_exec sqlite3_exec #define switch_core_db_exec sqlite3_exec
/** /**
* Return TRUE (non-zero) if the statement supplied as an argument needs * 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. * 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 #define switch_core_db_expired sqlite3_expired
/** /**
* This function is called to delete a compiled * 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, * rolled back and transactions cancelled, depending on the circumstances,
* and the result code returned will be SQLITE_ABORT. * 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 #define switch_core_db_finalize sqlite3_finalize
/** /**
* Call this routine to free the memory that sqlite3_get_table() allocated. * 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 #define switch_core_db_free_table sqlite3_free_table
/** /**
* Test to see whether or not the database connection is in autocommit * 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 default. Autocommit is disabled by a BEGIN statement and reenabled
* by the next COMMIT or ROLLBACK. * 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 #define switch_core_db_get_autocommit sqlite3_get_autocommit
/** /**
* The following function may be used by scalar user functions to * 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 * expressions that are constant at compile time. This includes literal
* values and SQL variables. * 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 #define switch_core_db_get_auxdata sqlite3_get_auxdata
/** /**
* The following function may be used by scalar user functions to * 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 * expressions that are constant at compile time. This includes literal
* values and SQL variables. * 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 #define switch_core_db_set_auxdata sqlite3_set_auxdata
/** /**
* This next routine is really just a wrapper around sqlite3_exec(). * 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 *nrow, /* Number of result rows written here */
int *ncolumn, /* Number of result columns written here */ int *ncolumn, /* Number of result columns written here */
char **errmsg /* Error msg written here */ char **errmsg /* Error msg written here */
); );)
)
#define switch_core_db_get_table sqlite3_get_table #define switch_core_db_get_table sqlite3_get_table
/** /**
* This function is called to recover from a malloc() failure that occured * 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 * This functionality can be omitted from a build by defining the
* SQLITE_OMIT_GLOBALRECOVER at compile time. * 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 #define switch_core_db_global_recover sqlite3_global_recover
/** This function causes any pending database operation to abort and /** This function causes any pending database operation to abort and
* return at its earliest opportunity. This routine is typically * 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 * or Ctrl-C where the user wants a long query operation to halt
* immediately. * 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 #define switch_core_db_interrupt sqlite3_interrupt
/** /**
* Each entry in an SQLite table has a unique integer key. (The key is * 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. * 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 #define switch_core_db_last_insert_rowid sqlite3_last_insert_rowid
/** /**
* Open the sqlite database file "filename". The "filename" is UTF-8 * 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) */ DoxyDefine(int switch_core_db_open(const char *filename, /* Database filename (UTF-8) */
switch_core_db ** ppDb /* OUT: SQLite db handle */ switch_core_db ** ppDb /* OUT: SQLite db handle */
); );)
)
#define switch_core_db_open sqlite3_open #define switch_core_db_open sqlite3_open
/** /**
* To execute an SQL query, it must first be compiled into a byte-code * To execute an SQL query, it must first be compiled into a byte-code
@ -1273,13 +1222,12 @@ DoxyDefine(int switch_core_db_open(const char *filename, /* Database filename (U
* *
* On success, SQLITE_OK is returned. Otherwise an error code is returned. * On success, SQLITE_OK is returned. Otherwise an error code is returned.
*/ */
DoxyDefine(int switch_core_db_prepare(sqlite3 *db, /* Database handle */ DoxyDefine(int switch_core_db_prepare(sqlite3 * db, /* Database handle */
const char *zSql, /* SQL statement, UTF-8 encoded */ const char *zSql, /* SQL statement, UTF-8 encoded */
int nBytes, /* Length of zSql in bytes. */ int nBytes, /* Length of zSql in bytes. */
sqlite3_stmt ** ppStmt, /* OUT: Statement handle */ sqlite3_stmt ** ppStmt, /* OUT: Statement handle */
const char **pzTail /* OUT: Pointer to unused portion of zSql */ const char **pzTail /* OUT: Pointer to unused portion of zSql */
); );)
)
#define switch_core_db_prepare sqlite3_prepare #define switch_core_db_prepare sqlite3_prepare
/** /**
* Register a function for tracing SQL command evaluation. The function registered by * 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 * The sqlite3_profile() API is currently considered experimental and
* is subject to change. * 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 #define switch_core_db_profile sqlite3_profile
/** /**
* This routine configures a callback function - the progress callback - that * 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 ****** ****** 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 #define switch_core_db_progress_handler sqlite3_progress_handler
/** /**
* The switch_core_db_reset() function is called to reset a compiled SQL * 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 * Any SQL statement variables that had values bound to them using
* the switch_core_db_bind_*() API retain their values. * 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 #define switch_core_db_reset sqlite3_reset
/** /**
* User-defined functions invoke this routine in order to * User-defined functions invoke this routine in order to
* set their return value. * 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 #define switch_core_db_result_blob sqlite3_result_blob
/** /**
* User-defined functions invoke this routine in order to * User-defined functions invoke this routine in order to
* set their return value. * 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 #define switch_core_db_result_double sqlite3_result_double
/** /**
* User-defined functions invoke this routine in order to * User-defined functions invoke this routine in order to
* set their return value. * 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 #define switch_core_db_result_error sqlite3_result_error
/** /**
* User-defined functions invoke this routine in order to * User-defined functions invoke this routine in order to
* set their return value. * 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 #define switch_core_db_result_error16 sqlite3_result_error16
/** /**
* User-defined functions invoke this routine in order to * User-defined functions invoke this routine in order to
* set their return value. * 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 #define switch_core_db_result_int sqlite3_result_int
/** /**
* User-defined functions invoke this routine in order to * User-defined functions invoke this routine in order to
* set their return value. * 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 #define switch_core_db_result_int64 sqlite3_result_int64
/** /**
* User-defined functions invoke this routine in order to * User-defined functions invoke this routine in order to
* set their return value. * 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 #define switch_core_db_result_null sqlite3_result_null
/** /**
* User-defined functions invoke this routine in order to * User-defined functions invoke this routine in order to
* set their return value. * 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 #define switch_core_db_result_text sqlite3_result_text
/** /**
* User-defined functions invoke this routine in order to * User-defined functions invoke this routine in order to
* set their return value. * 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 #define switch_core_db_result_text16 sqlite3_result_text16
/** /**
* User-defined functions invoke this routine in order to * User-defined functions invoke this routine in order to
* set their return value. * 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 #define switch_core_db_result_text16le sqlite3_result_text16le
/** /**
* User-defined functions invoke this routine in order to * User-defined functions invoke this routine in order to
* set their return value. * 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 #define switch_core_db_result_text16be sqlite3_result_text16be
/** /**
* User-defined functions invoke this routine in order to * User-defined functions invoke this routine in order to
* set their return value. * 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 #define switch_core_db_result_value sqlite3_result_value
/** /**
* This routine registers a callback with the SQLite library. The * 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. * if the column should be treated as a NULL value.
*/ */
DoxyDefine(int switch_core_db_set_authorizer(switch_core_db *, 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 #define switch_core_db_set_authorizer sqlite3_set_authorizer
/** /**
* After an SQL query has been compiled with a call to either * 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 * SQLITE_DONE. Or it could be the case the the same database connection
* is being used simulataneously by two or more threads. * 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 #define switch_core_db_step sqlite3_step
/** /**
* If the following global variable is made to point to a * 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 * Once switch_core_db_open() has been called, changing this variable will invalidate
* the current temporary database, if any. * 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 #define switch_core_db_temp_directory sqlite3_temp_directory
/** /**
* This function returns the number of database rows that have been * 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 * table. To get an accurate count of the number of rows deleted, use
* "DELETE FROM table WHERE 1" instead. * "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 #define switch_core_db_total_changes sqlite3_total_changes
/** /**
* Register a function for tracing SQL command evaluation. The function * Register a function for tracing SQL command evaluation. The function
* registered is invoked at the first switch_core_db_step() * registered is invoked at the first switch_core_db_step()
* for the evaluation of an SQL statement. * 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 #define switch_core_db_trace sqlite3_trace
/** /**
* Move all bindings from the first prepared statement over to the second. * 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 * the second prepared statement then all of the bindings transfered over
* to the second statement before the first statement is finalized. * 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 #define switch_core_db_transfer_bindings sqlite3_transfer_bindings
/** /**
* The pUserData parameter to the switch_core_db_create_function() * The pUserData parameter to the switch_core_db_create_function()
* routine used to register user functions is available to * routine used to register user functions is available to
* the implementation of the function using this call. * 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 #define switch_core_db_user_data sqlite3_user_data
/** /**
* returns information about parameters to * 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 * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
* column number. * 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 #define switch_core_db_value_blob sqlite3_value_blob
/** /**
* returns information about parameters to * 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 * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
* column number. * 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 #define switch_core_db_value_bytes sqlite3_value_bytes
/** /**
* returns information about parameters to * 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 * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
* column number. * 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 #define switch_core_db_value_bytes16 sqlite3_value_bytes16
/** /**
* returns information about parameters to * 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 * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
* column number. * 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 #define switch_core_db_value_double sqlite3_value_double
/** /**
* returns information about parameters to * 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 * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
* column number. * 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 #define switch_core_db_value_int sqlite3_value_int
/** /**
* returns information about parameters to * 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 * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
* column number. * 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 #define switch_core_db_value_int64 sqlite3_value_int64
/** /**
* returns information about parameters to * 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 * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
* column number. * 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 #define switch_core_db_value_text sqlite3_value_text
/** /**
* returns information about parameters to * 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 * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
* column number. * 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 #define switch_core_db_value_text16 sqlite3_value_text16
/** /**
* returns information about parameters to * 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 * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
* column number. * 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 #define switch_core_db_value_text16be sqlite3_value_text16be
/** /**
* returns information about parameters to * 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 * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
* column number. * 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 #define switch_core_db_value_text16le sqlite3_value_text16le
/** /**
* returns information about parameters to * 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 * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
* column number. * 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 #define switch_core_db_value_type sqlite3_value_type
/** /**
* This routine is a variant of the "sprintf()" from the * 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 * should always use %q instead of %s when inserting text into a string
* literal. * 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_core_db_mprintf sqlite3_mprintf
#define switch_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 * should always use %q instead of %s when inserting text into a string
* literal. * 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 #define switch_core_db_vmprintf sqlite3_vmprintf
/** /**
* This routine is a variant of the "sprintf()" from the * 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 * should always use %q instead of %s when inserting text into a string
* literal. * 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 #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 * 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 #define switch_core_db_free sqlite3_free
/** @} */ /** @} */
/** @} */ /** @} */

View File

@ -136,7 +136,7 @@ SWITCH_DECLARE(void) switch_stun_random_string(char *buf, uint16_t len, char *se
\param len the length of the data \param len the length of the data
\return a stun packet pointer to buf to use as an access point \return a stun packet pointer to buf to use as an access point
*/ */
SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t *buf, uint32_t len); SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t * buf, uint32_t len);
/*! /*!
\brief Obtain a printable string form of a given value \brief Obtain a printable string form of a given value
@ -173,7 +173,7 @@ SWITCH_DECLARE(char *) switch_stun_packet_attribute_get_username(switch_stun_pac
\param buf a pointer to data to use for the packet \param buf a pointer to data to use for the packet
\return a pointer to a ready-to-use stun packet \return a pointer to a ready-to-use stun packet
*/ */
SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_build_header(switch_stun_message_t type, char *id, uint8_t *buf); SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_build_header(switch_stun_message_t type, char *id, uint8_t * buf);
/*! /*!
\brief Add a username packet attribute \brief Add a username packet attribute
@ -205,7 +205,7 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_binded_address(switch_s
\return SUCCESS or FAIL \return SUCCESS or FAIL
*/ */
SWITCH_DECLARE(switch_status_t) switch_stun_lookup(char **ip, SWITCH_DECLARE(switch_status_t) switch_stun_lookup(char **ip,
switch_port_t *port, char *stunip, switch_port_t stunport, char **err, switch_memory_pool_t * pool); switch_port_t *port, char *stunip, switch_port_t stunport, char **err, switch_memory_pool_t *pool);

View File

@ -114,7 +114,7 @@ SWITCH_BEGIN_EXTERN_C
#define SWITCH_SPEECH_KEY "speech" #define SWITCH_SPEECH_KEY "speech"
#define SWITCH_UUID_BRIDGE "uuid_bridge" #define SWITCH_UUID_BRIDGE "uuid_bridge"
#define SWITCH_BITS_PER_BYTE 8 #define SWITCH_BITS_PER_BYTE 8
typedef uint8_t switch_byte_t; typedef uint8_t switch_byte_t;
typedef enum { typedef enum {
SWITCH_FALSE = 0, SWITCH_FALSE = 0,
@ -997,7 +997,8 @@ typedef switch_status_t (*switch_module_shutdown_t) (void);
typedef struct switch_xml *switch_xml_t; typedef struct switch_xml *switch_xml_t;
typedef struct switch_core_time_duration switch_core_time_duration_t; typedef struct switch_core_time_duration switch_core_time_duration_t;
typedef switch_xml_t(*switch_xml_search_function_t) (const char *section, 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 */ /* things we don't deserve to know about */
/*! \brief A channel */ /*! \brief A channel */

View File

@ -219,7 +219,7 @@ SWITCH_DECLARE(unsigned int) switch_separate_string(char *buf, char delim, char
\param esc the escape character \param esc the escape character
\return the escaped string \return the escaped string
*/ */
SWITCH_DECLARE(char *) switch_escape_char(switch_memory_pool_t * pool, char *in, char *delim, char esc); SWITCH_DECLARE(char *) switch_escape_char(switch_memory_pool_t *pool, char *in, char *delim, char esc);
/*! /*!
\brief Wait for a socket \brief Wait for a socket

View File

@ -291,7 +291,7 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_open_root(uint8_t reload, const char **e
///\param pool a memory pool to use ///\param pool a memory pool to use
///\param err a pointer to set error strings ///\param err a pointer to set error strings
///\return SWITCH_STATUS_SUCCESS if successful ///\return SWITCH_STATUS_SUCCESS if successful
SWITCH_DECLARE(switch_status_t) switch_xml_init(switch_memory_pool_t * pool, const char **err); SWITCH_DECLARE(switch_status_t) switch_xml_init(switch_memory_pool_t *pool, const char **err);
SWITCH_DECLARE(switch_status_t) switch_xml_destroy(void); SWITCH_DECLARE(switch_status_t) switch_xml_destroy(void);
@ -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 ///\return SWITCH_STATUS_SUCCESS if successful root and node will be assigned
SWITCH_DECLARE(switch_status_t) switch_xml_locate(const char *section, SWITCH_DECLARE(switch_status_t) switch_xml_locate(const char *section,
const char *tag_name, 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 ///\brief open a config in the core registry
///\param file_path the name of the config section e.g. modules.conf ///\param file_path the name of the config section e.g. modules.conf

View File

@ -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", "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.yr, duration.yr == 1 ? "" : "s", duration.day, duration.day == 1 ? "" : "s",
duration.hr, duration.hr == 1 ? "" : "s", duration.min, duration.min == 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()); stream->write_function(stream, "%d sessions\n", switch_core_session_count());

View File

@ -301,7 +301,7 @@ static switch_status_t conference_local_play_file(conference_obj_t * conference,
static switch_status_t conference_member_play_file(conference_member_t * member, char *file, uint32_t leadin); static switch_status_t conference_member_play_file(conference_member_t * member, char *file, uint32_t leadin);
static switch_status_t conference_member_say(conference_member_t * member, char *text, uint32_t leadin); static switch_status_t conference_member_say(conference_member_t * member, char *text, uint32_t leadin);
static uint32_t conference_member_stop_file(conference_member_t * member, file_stop_t stop); static uint32_t conference_member_stop_file(conference_member_t * member, file_stop_t stop);
static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_memory_pool_t * pool); static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_memory_pool_t *pool);
static switch_status_t chat_send(char *proto, char *from, char *to, char *subject, char *body, char *hint); static switch_status_t chat_send(char *proto, char *from, char *to, char *subject, char *body, char *hint);
static void launch_conference_record_thread(conference_obj_t * conference, char *path); static void launch_conference_record_thread(conference_obj_t * conference, char *path);
@ -1384,7 +1384,7 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t * thread,
} }
/* launch an input thread for the call leg */ /* launch an input thread for the call leg */
static void launch_conference_loop_input(conference_member_t * member, switch_memory_pool_t * pool) static void launch_conference_loop_input(conference_member_t * member, switch_memory_pool_t *pool)
{ {
if (member != NULL) { if (member != NULL) {
switch_thread_t *thread; switch_thread_t *thread;
@ -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)); launch_conference_loop_input(member, switch_core_session_get_pool(member->session));
/* build a digit stream object */ /* 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"); 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, 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); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening File [%s]\n", rec->path);
goto end; goto end;
} }
@ -1954,7 +1956,8 @@ static switch_status_t conference_play_file(conference_obj_t * conference, char
fnode->leadin = leadin; fnode->leadin = leadin;
/* Open the file */ /* 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); switch_core_destroy_memory_pool(&pool);
status = SWITCH_STATUS_NOTFOUND; status = SWITCH_STATUS_NOTFOUND;
goto done; goto done;
@ -2054,7 +2057,8 @@ static switch_status_t conference_member_play_file(conference_member_t * member,
/* Open the file */ /* Open the file */
if (switch_core_file_open(&fnode->fh, 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); switch_core_destroy_memory_pool(&pool);
status = SWITCH_STATUS_NOTFOUND; status = SWITCH_STATUS_NOTFOUND;
goto done; goto done;
@ -2120,7 +2124,8 @@ static switch_status_t conference_member_say(conference_member_t * member, char
fnode->pool = pool; fnode->pool = pool;
memset(&fnode->sh, 0, sizeof(fnode->sh)); 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); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid TTS module [%s]!\n", conference->tts_engine);
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
} }
@ -2191,7 +2196,8 @@ static switch_status_t conference_say(conference_obj_t * conference, const char
fnode->leadin = leadin; fnode->leadin = leadin;
memset(&fnode->sh, 0, sizeof(fnode->sh)); 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); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid TTS module [%s]!\n", conference->tts_engine);
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
} }
@ -3519,7 +3525,8 @@ static switch_status_t conference_outcall(conference_obj_t * conference,
/* establish an outbound call leg */ /* establish an outbound call leg */
if (switch_ivr_originate(session, 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)); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot create outgoing channel, cause: %s\n", switch_channel_cause2str(*cause));
if (caller_channel) { if (caller_channel) {
switch_channel_hangup(caller_channel, *cause); switch_channel_hangup(caller_channel, *cause);
@ -4340,7 +4347,7 @@ static switch_status_t conference_new_install_caller_controls_custom(conference_
} }
/* create a new conferene with a specific profile */ /* create a new conferene with a specific profile */
static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_memory_pool_t * pool) static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_memory_pool_t *pool)
{ {
conference_obj_t *conference; conference_obj_t *conference;
switch_xml_t xml_kvp; switch_xml_t xml_kvp;

View File

@ -272,7 +272,8 @@ static void asrtest_function(switch_core_session_t *session, char *data)
if (switch_core_asr_open(&ah, "lumenvox", 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 (strcmp(ah.codec, read_codec->implementation->iananame)) {
if (switch_core_codec_init(&codec, if (switch_core_codec_init(&codec,
ah.codec, ah.codec,

View File

@ -254,7 +254,8 @@ static void rss_function(switch_core_session_t *session, char *data)
NULL, NULL,
(int) rate, (int) rate,
interval, 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"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activated\n");
} else { } else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Failed L16@%uhz 1 channel %dms\n", rate, interval); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Failed L16@%uhz 1 channel %dms\n", rate, interval);

View File

@ -243,7 +243,8 @@ static switch_status_t switch_amr_encode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *decoded_data, void *decoded_data,
uint32_t decoded_data_len, 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 #ifdef AMR_PASSTHROUGH
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n"); 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, switch_codec_t *other_codec,
void *encoded_data, void *encoded_data,
uint32_t encoded_data_len, 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 #ifdef AMR_PASSTHROUGH
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n");

View File

@ -55,7 +55,8 @@ static switch_status_t switch_g711u_encode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *decoded_data, void *decoded_data,
uint32_t decoded_data_len, 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; short *dbuf;
unsigned char *ebuf; unsigned char *ebuf;
@ -77,7 +78,8 @@ static switch_status_t switch_g711u_decode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *encoded_data, void *encoded_data,
uint32_t encoded_data_len, 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; short *dbuf;
unsigned char *ebuf; unsigned char *ebuf;
@ -125,7 +127,8 @@ static switch_status_t switch_g711a_encode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *decoded_data, void *decoded_data,
uint32_t decoded_data_len, 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; short *dbuf;
unsigned char *ebuf; unsigned char *ebuf;
@ -147,7 +150,8 @@ static switch_status_t switch_g711a_decode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *encoded_data, void *encoded_data,
uint32_t encoded_data_len, 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; short *dbuf;
unsigned char *ebuf; unsigned char *ebuf;

View File

@ -76,7 +76,8 @@ static switch_status_t switch_g722_encode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *decoded_data, void *decoded_data,
uint32_t decoded_data_len, 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; 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, switch_codec_t *other_codec,
void *encoded_data, void *encoded_data,
uint32_t encoded_data_len, 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; struct g722_context *context = codec->private_info;

View File

@ -109,7 +109,8 @@ static switch_status_t switch_g723_encode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *decoded_data, void *decoded_data,
uint32_t decoded_data_len, 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 #ifdef G723_PASSTHROUGH
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n"); 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, switch_codec_t *other_codec,
void *encoded_data, void *encoded_data,
uint32_t encoded_data_len, 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 #ifdef G723_PASSTHROUGH
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n");

View File

@ -114,7 +114,8 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *decoded_data, void *decoded_data,
uint32_t decoded_data_len, 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; 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, switch_codec_t *other_codec,
void *encoded_data, void *encoded_data,
uint32_t encoded_data_len, 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; g726_handle_t *handle = codec->private_info;

View File

@ -95,7 +95,8 @@ static switch_status_t switch_g729_encode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *decoded_data, void *decoded_data,
uint32_t decoded_data_len, 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 #ifdef G729_PASSTHROUGH
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n"); 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, switch_codec_t *other_codec,
void *encoded_data, void *encoded_data,
uint32_t encoded_data_len, 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 #ifdef G729_PASSTHROUGH
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n");

View File

@ -98,7 +98,8 @@ static switch_status_t switch_ilbc_encode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *decoded_data, void *decoded_data,
uint32_t decoded_data_len, 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; 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, switch_codec_t *other_codec,
void *encoded_data, void *encoded_data,
uint32_t encoded_data_len, 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; struct ilbc_context *context = codec->private_info;

View File

@ -52,7 +52,8 @@ static switch_status_t switch_raw_encode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *decoded_data, void *decoded_data,
uint32_t decoded_data_len, 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. */ /* 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) { 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, switch_codec_t *other_codec,
void *encoded_data, void *encoded_data,
uint32_t encoded_data_len, 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) { if (codec && other_codec && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
memcpy(decoded_data, encoded_data, encoded_data_len); memcpy(decoded_data, encoded_data, encoded_data_len);

View File

@ -87,7 +87,8 @@ static switch_status_t switch_lpc10_encode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *decoded_data, void *decoded_data,
uint32_t decoded_data_len, 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; struct lpc10_context *context = codec->private_info;
uint8_t i; uint8_t i;
@ -120,7 +121,8 @@ static switch_status_t switch_lpc10_decode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *encoded_data, void *encoded_data,
uint32_t encoded_data_len, 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; struct lpc10_context *context = codec->private_info;
int i; int i;

View File

@ -157,7 +157,8 @@ static switch_status_t switch_speex_encode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *decoded_data, void *decoded_data,
uint32_t decoded_data_len, 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; struct speex_context *context = codec->private_info;
short *buf; short *buf;
@ -208,7 +209,8 @@ static switch_status_t switch_speex_decode(switch_codec_t *codec,
switch_codec_t *other_codec, switch_codec_t *other_codec,
void *encoded_data, void *encoded_data,
uint32_t encoded_data_len, 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; struct speex_context *context = codec->private_info;
short *buf; short *buf;

View File

@ -99,7 +99,8 @@ static switch_caller_extension_t *directory_dialplan_hunt(switch_core_session_t
caller_profile = switch_channel_get_caller_profile(channel); 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)) { if (!(globals.directory_name && globals.host && globals.dn && globals.base && globals.pass)) {

View File

@ -188,7 +188,8 @@ static int parse_exten(switch_core_session_t *session, switch_xml_t xexten, swit
return proceed; 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_status_t status = SWITCH_STATUS_GENERR;
switch_channel_t *channel; switch_channel_t *channel;

View File

@ -46,7 +46,8 @@ static switch_memory_pool_t *module_pool = NULL;
static char sub_sql[] = static char sub_sql[] =
"CREATE TABLE subscriptions (\n" "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 { typedef enum {
@ -178,7 +179,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)
static switch_status_t channel_on_transmit(switch_core_session_t *session); static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t ** pool); switch_core_session_t **new_session, switch_memory_pool_t **pool);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig); static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
@ -957,7 +958,8 @@ static switch_status_t negotiate_media(switch_core_session_t *session)
while (!(switch_test_flag(tech_pvt, TFLAG_CODEC_READY) && while (!(switch_test_flag(tech_pvt, TFLAG_CODEC_READY) &&
switch_test_flag(tech_pvt, TFLAG_RTP_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(); now = switch_time_now();
elapsed = (unsigned int) ((now - started) / 1000); elapsed = (unsigned int) ((now - started) / 1000);
@ -1502,7 +1504,7 @@ static const switch_loadable_module_interface_t channel_module_interface = {
*/ */
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t ** pool) switch_core_session_t **new_session, switch_memory_pool_t **pool)
{ {
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) { if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt; struct private_object *tech_pvt;
@ -1758,7 +1760,8 @@ static switch_status_t init_profile(struct mdl_profile *profile, uint8_t login)
"message[%s]\n" "message[%s]\n"
"rtp-ip[%s]\n" "rtp-ip[%s]\n"
"name[%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; 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); 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; struct mdl_profile *profile = NULL;
switch_core_session_t *session = 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) { if (profile->auto_reply) {
ldl_handle_send_msg(handle, 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, '+')) { 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) { if (match && payloads[x].rate == tech_pvt->codecs[y]->samples_per_second) {
tech_pvt->codec_index = y; 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_name = tech_pvt->codecs[y]->iananame;
tech_pvt->codec_num = tech_pvt->codecs[y]->ianacode; tech_pvt->codec_num = tech_pvt->codecs[y]->ianacode;
tech_pvt->r_codec_num = (switch_payload_t) (payloads[x].id); 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, ldl_session_get_value(dlsession,
"aniii"), "aniii"),
ldl_session_get_value(dlsession, ldl_session_get_value(dlsession,
"rdnis"), (char *) modname, context, exten)) != 0) { "rdnis"), (char *) modname, context,
exten)) != 0) {
char name[128]; char name[128];
snprintf(name, sizeof(name), "DingaLing/%s", tech_pvt->caller_profile->destination_number); snprintf(name, sizeof(name), "DingaLing/%s", tech_pvt->caller_profile->destination_number);
switch_channel_set_name(channel, name); switch_channel_set_name(channel, name);

View File

@ -417,7 +417,7 @@ static switch_status_t channel_on_loopback(switch_core_session_t *session);
static switch_status_t channel_on_transmit(switch_core_session_t *session); static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t ** pool); switch_core_session_t **new_session, switch_memory_pool_t **pool);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig); static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
@ -790,7 +790,7 @@ that allocate memory or you will have 1 channel with memory allocated from anoth
*/ */
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t ** pool) switch_core_session_t **new_session, switch_memory_pool_t **pool)
{ {
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) { if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
private_t *tech_pvt; private_t *tech_pvt;

View File

@ -144,7 +144,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)
static switch_status_t channel_on_transmit(switch_core_session_t *session); static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t ** pool); switch_core_session_t **new_session, switch_memory_pool_t **pool);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig); static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
@ -821,7 +821,7 @@ static const switch_loadable_module_interface_t channel_module_interface = {
*/ */
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t ** pool) switch_core_session_t **new_session, switch_memory_pool_t **pool)
{ {
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) { if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
@ -1248,7 +1248,8 @@ static int dump_info(void)
if (inputParameters.channelCount > 0 && outputParameters.channelCount > 0) { if (inputParameters.channelCount > 0 && outputParameters.channelCount > 0) {
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, 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); 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, if (switch_core_codec_init(&globals.read_codec,
"L16", "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"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
} else { } else {
if (switch_core_codec_init(&globals.write_codec, if (switch_core_codec_init(&globals.write_codec,
"L16", "L16",
NULL, 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_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
switch_core_codec_destroy(&globals.read_codec); switch_core_codec_destroy(&globals.read_codec);
return SWITCH_STATUS_FALSE; 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, 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_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "setup timer failed!\n");
switch_core_codec_destroy(&globals.read_codec); switch_core_codec_destroy(&globals.read_codec);
switch_core_codec_destroy(&globals.write_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), if ((tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
NULL, 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]; 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_name(channel, name);
switch_channel_set_caller_profile(channel, tech_pvt->caller_profile); switch_channel_set_caller_profile(channel, tech_pvt->caller_profile);

View File

@ -191,7 +191,8 @@ static unsigned long RoundUpToNextPowerOf2(unsigned long n)
* *
*/ */
PaError OpenAudioStream(PABLIO_Stream ** rwblPtr, 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; long bytesPerSample;
PaError err; PaError err;

View File

@ -108,7 +108,8 @@ static char sub_sql[] =
static char auth_sql[] = static char auth_sql[] =
"CREATE TABLE sip_authentication (\n" "CREATE TABLE sip_authentication (\n"
" user VARCHAR(255),\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"; static const char modname[] = "mod_sofia";
#define STRLEN 15 #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_status_t sofia_on_transmit(switch_core_session_t *session);
static switch_call_cause_t sofia_outgoing_channel(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); 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);
@ -610,7 +612,7 @@ static int del_callback(void *pArg, int argc, char **argv, char **columnNames)
return 0; return 0;
} }
static void check_expire(switch_core_db_t * db, sofia_profile_t * profile, time_t now) static void check_expire(switch_core_db_t *db, sofia_profile_t * profile, time_t now)
{ {
char sql[1024]; char sql[1024];
char *errmsg; char *errmsg;
@ -912,7 +914,7 @@ static void terminate_session(switch_core_session_t **session, switch_call_cause
static switch_status_t sofia_ext_address_lookup(char **ip, switch_port_t *port, char *sourceip, switch_memory_pool_t * pool) static switch_status_t sofia_ext_address_lookup(char **ip, switch_port_t *port, char *sourceip, switch_memory_pool_t *pool)
{ {
char *error; char *error;
@ -956,7 +958,8 @@ static switch_status_t tech_choose_port(private_object_t * tech_pvt)
sdp_port = tech_pvt->local_sdp_audio_port; sdp_port = tech_pvt->local_sdp_audio_port;
if (tech_pvt->profile->extrtpip) { 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__); terminate_session(&tech_pvt->session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, __LINE__);
return SWITCH_STATUS_FALSE; 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); char *url = get_url_from_contact(tech_pvt->dest, 1);
tech_pvt->nh = nua_handle(tech_pvt->profile->nua, NULL, tech_pvt->nh = nua_handle(tech_pvt->profile->nua, NULL,
NUTAG_URL(url), 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); switch_safe_free(url);
if (!(tech_pvt->sofia_private = malloc(sizeof(*tech_pvt->sofia_private)))) { 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); char *rep = switch_channel_get_variable(channel, SOFIA_REPLACES_HEADER);
tech_pvt->nh2 = nua_handle(tech_pvt->profile->nua, NULL, 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); 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)) { if (tech_pvt->rtp_session && switch_test_flag(tech_pvt, TFLAG_REINVITE)) {
switch_clear_flag_locked(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); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP REPORTS ERROR: [%s]\n", err);
} else { } else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "RTP CHANGING DEST TO: [%s:%d]\n", 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->nh) {
if (tech_pvt->local_sdp_str) { 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, 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_call_cause_t cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
switch_core_session_t *nsession; 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) 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 #if 0
@ -3227,7 +3236,8 @@ typedef enum {
REG_INVITE REG_INVITE
} sofia_regtype_t; } 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_from_t const *from = NULL;
sip_expires_t const *expires = 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" sql = switch_mprintf("delete from sip_authentication where user='%q' and host='%q';\n"
"insert into sip_authentication values('%q','%q','%q','%q', %ld)", "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); 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) { 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_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"); switch_channel_set_variable(channel_a, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "ATTENDED_TRANSFER_ERROR");
nua_notify(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("message/sipfrag"), 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 { } else {

View File

@ -30,7 +30,8 @@ int tdmv_api_ioctl(HANDLE fd, wanpipe_tdm_api_cmd_t * tdm_api_cmd)
if (DeviceIoControl(fd, if (DeviceIoControl(fd,
IoctlManagementCommand, 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 //actual ioctl failed
err = 1; err = 1;
prn(1, "Error: tdmv_api_ioctl(): DeviceIoControl failed!!\n"); 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, if (DeviceIoControl(fd,
IoctlManagementCommand, 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; err = 1;
prn(1, "Error: wanpipe_api_ioctl(): DeviceIoControl failed!!\n"); prn(1, "Error: wanpipe_api_ioctl(): DeviceIoControl failed!!\n");
return err; return err;
@ -108,7 +110,8 @@ static UCHAR DoWriteCommand(HANDLE drv, TX_DATA_STRUCT * pTx)
if (DeviceIoControl(drv, if (DeviceIoControl(drv,
IoctlWriteCommand, 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 //check messages log
prn(1, "Error: DoWriteCommand(): DeviceIoControl failed!\n"); prn(1, "Error: DoWriteCommand(): DeviceIoControl failed!\n");
return 1; return 1;
@ -122,7 +125,8 @@ static USHORT DoApiPollCommand(HANDLE drv, API_POLL_STRUCT * api_poll_ptr)
{ {
DWORD ln; 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 //check messages log
prn(1, "Error: DoApiPollCommand(): DeviceIoControl failed!\n"); prn(1, "Error: DoApiPollCommand(): DeviceIoControl failed!\n");
return 1; return 1;

View File

@ -462,7 +462,7 @@ static switch_status_t wanpipe_on_loopback(switch_core_session_t *session);
static switch_status_t wanpipe_on_transmit(switch_core_session_t *session); static switch_status_t wanpipe_on_transmit(switch_core_session_t *session);
static switch_call_cause_t wanpipe_outgoing_channel(switch_core_session_t *session, static switch_call_cause_t wanpipe_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t ** pool); switch_core_session_t **new_session, switch_memory_pool_t **pool);
static switch_status_t wanpipe_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t wanpipe_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t wanpipe_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t wanpipe_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
static int on_info(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event * pevent); static int on_info(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event * pevent);
@ -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])); 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) { 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)); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Critical System Error: Failed to tx on ISUP socket [%s]\n", strerror(errno));
@ -985,7 +986,7 @@ static const switch_loadable_module_interface_t wanpipe_module_interface = {
static switch_call_cause_t wanpipe_outgoing_channel(switch_core_session_t *session, static switch_call_cause_t wanpipe_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t ** pool) switch_core_session_t **new_session, switch_memory_pool_t **pool)
{ {
char *bchan = NULL; char *bchan = NULL;
char name[128] = ""; char name[128] = "";
@ -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_bearer(sr, 0, SPANS[span]->l1);
pri_sr_set_called(sr, caller_profile->destination_number, SPANS[span]->dp, 1); pri_sr_set_called(sr, caller_profile->destination_number, SPANS[span]->dp, 1);
pri_sr_set_caller(sr, pri_sr_set_caller(sr,
caller_profile->caller_id_number, caller_profile->caller_id_name, SPANS[span]->dp, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN); caller_profile->caller_id_number, caller_profile->caller_id_name, SPANS[span]->dp,
pri_sr_set_redirecting(sr, caller_profile->caller_id_number, SPANS[span]->dp, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, PRI_REDIR_UNCONDITIONAL); 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)) { if (pri_setup(spri->pri, tech_pvt->call, sr)) {
switch_core_session_destroy(new_session); 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); switch_core_session_rwunlock(session);
} else { } else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, 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; return 0;
@ -1982,7 +1986,8 @@ static int parse_ss7_event(ss7boost_handle_t * ss7boost_handle, ss7boost_client_
event->chan + 1, event->chan + 1,
(event->called_number_digits_count ? (char *) event->called_number_digits : "N/A"), (event->called_number_digits_count ? (char *) event->called_number_digits : "N/A"),
(event->calling_number_digits_count ? (char *) event->calling_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) { 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); handle_call_stop_ack(ss7boost_handle, event);
break; break;
default: 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; break;
} }
switch_mutex_unlock(ss7boost_handle->mutex); switch_mutex_unlock(ss7boost_handle->mutex);

View File

@ -98,7 +98,7 @@ SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_close(ss7boost_client
} }
SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_open(ss7boost_client_connection_t * mcon, SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_open(ss7boost_client_connection_t * mcon,
char *local_ip, int local_port, char *ip, int port, switch_memory_pool_t * pool) char *local_ip, int local_port, char *ip, int port, switch_memory_pool_t *pool)
{ {
memset(mcon, 0, sizeof(*mcon)); memset(mcon, 0, sizeof(*mcon));
mcon->pool = pool; mcon->pool = pool;

View File

@ -91,7 +91,7 @@ typedef struct ss7boost_client_connection ss7boost_client_connection_t;
SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_close(ss7boost_client_connection_t * mcon); SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_close(ss7boost_client_connection_t * mcon);
SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_open(ss7boost_client_connection_t * mcon, SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_open(ss7boost_client_connection_t * mcon,
char *local_ip, int local_port, char *ip, int port, switch_memory_pool_t * pool); char *local_ip, int local_port, char *ip, int port, switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_read(ss7boost_client_connection_t * mcon, ss7boost_client_event_t ** event); SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_read(ss7boost_client_connection_t * mcon, ss7boost_client_event_t ** event);
SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_write(ss7boost_client_connection_t * mcon, ss7boost_client_event_t * event); SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_write(ss7boost_client_connection_t * mcon, ss7boost_client_event_t * event);
SWITCH_DECLARE(void) ss7boost_client_event_init(ss7boost_client_event_t * event, ss7boost_client_event_id_t event_id, int chan, int span); SWITCH_DECLARE(void) ss7boost_client_event_init(ss7boost_client_event_t * event, ss7boost_client_event_id_t event_id, int chan, int span);

View File

@ -171,7 +171,7 @@ static switch_status_t woomera_on_loopback(switch_core_session_t *session);
static switch_status_t woomera_on_transmit(switch_core_session_t *session); static switch_status_t woomera_on_transmit(switch_core_session_t *session);
static switch_call_cause_t woomera_outgoing_channel(switch_core_session_t *session, static switch_call_cause_t woomera_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t ** pool); switch_core_session_t **new_session, switch_memory_pool_t **pool);
static switch_status_t woomera_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t woomera_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t woomera_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t woomera_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t woomera_kill_channel(switch_core_session_t *session, int sig); static switch_status_t woomera_kill_channel(switch_core_session_t *session, int sig);
@ -478,7 +478,7 @@ static const switch_loadable_module_interface_t woomera_module_interface = {
*/ */
static switch_call_cause_t woomera_outgoing_channel(switch_core_session_t *session, static switch_call_cause_t woomera_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t ** pool) switch_core_session_t **new_session, switch_memory_pool_t **pool)
{ {
if ((*new_session = switch_core_session_request(&woomera_endpoint_interface, pool)) != 0) { if ((*new_session = switch_core_session_request(&woomera_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt; struct private_object *tech_pvt;

View File

@ -54,8 +54,8 @@ extern "C" {
class CDRContainer { class CDRContainer {
public: public:
CDRContainer(); CDRContainer();
CDRContainer(switch_memory_pool_t * module_pool); CDRContainer(switch_memory_pool_t *module_pool);
~CDRContainer(); ~CDRContainer();
void add_cdr(switch_core_session_t *session); void add_cdr(switch_core_session_t *session);
void process_records(); void process_records();
#ifdef SWITCH_QUEUE_ENHANCED #ifdef SWITCH_QUEUE_ENHANCED

View File

@ -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); context->stream_url = switch_core_sprintf(context->memory_pool, "http://%s", path);
launch_read_stream_thread(context); launch_read_stream_thread(context);
} else { } 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); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error opening %s\n", path);
goto error; goto error;
} }

View File

@ -468,7 +468,8 @@ extern "C" {
if (s->next) { if (s->next) {
s->next->prev = s->prev; 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) if (ty->next)
ty->next->prev = s; ty->next->prev = s;
ty->next = s; ty->next = s;
@ -1697,13 +1698,15 @@ extern "C" {
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ /* -------- 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_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[] = 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} }; { {"_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[] = 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} }; { {"_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_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} {"_p_switch_input_callback_function_t"}, {0}
}; };

View File

@ -571,7 +571,7 @@ extern "C" {
* type checking. * type checking.
* *
* Author : David Beazley (beazley@cs.uchicago.edu) * Author : David Beazley (beazley@cs.uchicago.edu)
************************************************************************//* Common SWIG API */ ************************************************************************//* Common SWIG API */
#define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Python_ConvertPtr(obj, pp, type, flags) #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Python_ConvertPtr(obj, pp, type, flags)
#define SWIG_NewPointerObj(p, type, flags) SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_NewPointerObj(p, type, flags) SWIG_Python_NewPointerObj(p, type, flags)
#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
@ -583,11 +583,11 @@ extern "C" {
#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Pointer declarations * Pointer declarations
* ----------------------------------------------------------------------------- *//* * ----------------------------------------------------------------------------- *//*
Use SWIG_NO_COBJECT_TYPES to force the use of strings to represent Use SWIG_NO_COBJECT_TYPES to force the use of strings to represent
C/C++ pointers in the python side. Very useful for debugging, but C/C++ pointers in the python side. Very useful for debugging, but
not always safe. not always safe.
*/ */
#if !defined(SWIG_NO_COBJECT_TYPES) && !defined(SWIG_COBJECT_TYPES) #if !defined(SWIG_NO_COBJECT_TYPES) && !defined(SWIG_COBJECT_TYPES)
# define SWIG_COBJECT_TYPES # define SWIG_COBJECT_TYPES
#endif #endif
@ -1538,7 +1538,8 @@ extern "C" {
resultobj = Py_None; resultobj = Py_None;
return resultobj; return resultobj;
fail:return NULL; 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; PyObject *resultobj = NULL;
char *arg1 = (char *) 0; char *arg1 = (char *) 0;
int result; 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_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_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_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_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_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__ptrdiff_t = { "_ptrdiff_t", "ptrdiff_t", 0, 0, 0 };
static swig_type_info _swigt__size_t = { "_size_t", "size_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) { SWIGINTERN PyObject *swig_varlink_repr(swig_varlinkobject * v) {
v = v; v = v;
return PyString_FromString("<Swig global variables>"); 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; swig_globalvar *var;
flags = flags; flags = flags;
fprintf(fp, "Swig global variables { "); fprintf(fp, "Swig global variables { ");

View File

@ -1337,7 +1337,8 @@ static JSBool session_speak(JSContext * cx, JSObject * obj, uintN argc, jsval *
args.input_callback = dtmf_func; args.input_callback = dtmf_func;
args.buf = bp; args.buf = bp;
args.buflen = len; 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); JS_ResumeRequest(cx, cb_state.saveDepth);
*rval = cb_state.ret; *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, 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) { 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); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot Create Outgoing Channel! [%s]\n", dest);

View File

@ -407,7 +407,8 @@ int send_message(char *data, size_t len, char **rcpts)
/* recipients */ /* recipients */
for (r = rcpts; *r != NULL; r++) { for (r = rcpts; *r != NULL; r++) {
if ((ret = (esmtp ? 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)); fprintf(stderr, "mailsmtp_rcpt: %s: %s\n", *r, mailsmtp_strerror(ret));
goto error; goto error;
} }

View File

@ -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; int32_t t;
switch_time_t target = 0; 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; switch_channel_t *channel;

View File

@ -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] = ""; char filename[512] = "";
CURL *curl_handle = NULL; CURL *curl_handle = NULL;

View File

@ -65,14 +65,14 @@
/* Memory Pools */ /* Memory Pools */
SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t * p) SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t *p)
{ {
apr_pool_clear(p); apr_pool_clear(p);
} }
/* Hash tables */ /* Hash tables */
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t * p, switch_hash_t * ht) SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t *p, switch_hash_t * ht)
{ {
return apr_hash_first(p, ht); return apr_hash_first(p, ht);
} }
@ -99,7 +99,7 @@ SWITCH_DECLARE(switch_memory_pool_t *) switch_hash_pool_get(switch_hash_t * ht)
/* DSO functions */ /* DSO functions */
SWITCH_DECLARE(switch_status_t) switch_dso_load(switch_dso_handle_t ** res_handle, const char *path, switch_memory_pool_t * ctx) SWITCH_DECLARE(switch_status_t) switch_dso_load(switch_dso_handle_t ** res_handle, const char *path, switch_memory_pool_t *ctx)
{ {
return apr_dso_load(res_handle, path, ctx); return apr_dso_load(res_handle, path, ctx);
} }
@ -149,7 +149,7 @@ SWITCH_DECLARE(char *) switch_copy_string(char *dst, const char *src, switch_siz
/* thread read write lock functions */ /* thread read write lock functions */
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_create(switch_thread_rwlock_t ** rwlock, switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_create(switch_thread_rwlock_t ** rwlock, switch_memory_pool_t *pool)
{ {
return apr_thread_rwlock_create(rwlock, pool); return apr_thread_rwlock_create(rwlock, pool);
} }
@ -191,7 +191,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_unlock(switch_thread_rwlock
/* thread mutex functions */ /* thread mutex functions */
SWITCH_DECLARE(switch_status_t) switch_mutex_init(switch_mutex_t ** lock, unsigned int flags, switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_mutex_init(switch_mutex_t ** lock, unsigned int flags, switch_memory_pool_t *pool)
{ {
return apr_thread_mutex_create(lock, flags, pool); return apr_thread_mutex_create(lock, flags, pool);
} }
@ -268,7 +268,7 @@ SWITCH_DECLARE(switch_time_t) switch_time_make(switch_time_t sec, int32_t usec)
/* Thread condition locks */ /* Thread condition locks */
SWITCH_DECLARE(switch_status_t) switch_thread_cond_create(switch_thread_cond_t ** cond, switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_thread_cond_create(switch_thread_cond_t ** cond, switch_memory_pool_t *pool)
{ {
return apr_thread_cond_create(cond, pool); return apr_thread_cond_create(cond, pool);
} }
@ -300,7 +300,8 @@ SWITCH_DECLARE(switch_status_t) switch_thread_cond_destroy(switch_thread_cond_t
/* file i/o stubs */ /* 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); return apr_file_open(newf, fname, flag, perm, pool);
} }
@ -319,7 +320,7 @@ SWITCH_DECLARE(switch_status_t) switch_file_close(switch_file_t * thefile)
return apr_file_close(thefile); return apr_file_close(thefile);
} }
SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memory_pool_t *pool)
{ {
return apr_file_remove(path, pool); return apr_file_remove(path, pool);
} }
@ -350,7 +351,7 @@ SWITCH_DECLARE(switch_status_t) switch_file_exists(const char *filename)
/* thread stubs */ /* thread stubs */
SWITCH_DECLARE(switch_status_t) switch_threadattr_create(switch_threadattr_t ** new_attr, switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_threadattr_create(switch_threadattr_t ** new_attr, switch_memory_pool_t *pool)
{ {
return apr_threadattr_create(new_attr, pool); return apr_threadattr_create(new_attr, pool);
} }
@ -366,14 +367,14 @@ SWITCH_DECLARE(switch_status_t) switch_threadattr_stacksize_set(switch_threadatt
} }
SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t ** new_thread, switch_threadattr_t * attr, SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t ** new_thread, switch_threadattr_t * attr,
switch_thread_start_t func, void *data, switch_memory_pool_t * cont) switch_thread_start_t func, void *data, switch_memory_pool_t *cont)
{ {
return apr_thread_create(new_thread, attr, func, data, cont); return apr_thread_create(new_thread, attr, func, data, cont);
} }
/* socket stubs */ /* socket stubs */
SWITCH_DECLARE(switch_status_t) switch_socket_create(switch_socket_t ** new_sock, int family, int type, int protocol, switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_socket_create(switch_socket_t ** new_sock, int family, int type, int protocol, switch_memory_pool_t *pool)
{ {
return apr_socket_create(new_sock, family, type, protocol, pool); return apr_socket_create(new_sock, family, type, protocol, pool);
} }
@ -398,7 +399,7 @@ SWITCH_DECLARE(switch_status_t) switch_socket_listen(switch_socket_t * sock, int
return apr_socket_listen(sock, backlog); return apr_socket_listen(sock, backlog);
} }
SWITCH_DECLARE(switch_status_t) switch_socket_accept(switch_socket_t ** new_sock, switch_socket_t * sock, switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_socket_accept(switch_socket_t ** new_sock, switch_socket_t * sock, switch_memory_pool_t *pool)
{ {
return apr_socket_accept(new_sock, sock, pool); return apr_socket_accept(new_sock, sock, pool);
} }
@ -425,7 +426,7 @@ SWITCH_DECLARE(switch_status_t) switch_socket_recv(switch_socket_t * sock, char
} }
SWITCH_DECLARE(switch_status_t) switch_sockaddr_info_get(switch_sockaddr_t ** sa, const char *hostname, int32_t family, SWITCH_DECLARE(switch_status_t) switch_sockaddr_info_get(switch_sockaddr_t ** sa, const char *hostname, int32_t family,
switch_port_t port, int32_t flags, switch_memory_pool_t * pool) switch_port_t port, int32_t flags, switch_memory_pool_t *pool)
{ {
return apr_sockaddr_info_get(sa, hostname, family, port, flags, pool); return apr_sockaddr_info_get(sa, hostname, family, port, flags, pool);
} }
@ -487,7 +488,7 @@ SWITCH_DECLARE(switch_status_t) switch_socket_recvfrom(switch_sockaddr_t * from,
/* poll stubs */ /* poll stubs */
SWITCH_DECLARE(switch_status_t) switch_pollset_create(switch_pollset_t ** pollset, uint32_t size, switch_memory_pool_t * p, uint32_t flags) SWITCH_DECLARE(switch_status_t) switch_pollset_create(switch_pollset_t ** pollset, uint32_t size, switch_memory_pool_t *p, uint32_t flags)
{ {
return apr_pollset_create(pollset, size, p, flags); return apr_pollset_create(pollset, size, p, flags);
} }
@ -502,7 +503,7 @@ SWITCH_DECLARE(switch_status_t) switch_poll(switch_pollfd_t * aprset, int32_t nu
return apr_poll(aprset, numsock, nsds, timeout); return apr_poll(aprset, numsock, nsds, timeout);
} }
SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t ** poll, switch_socket_t * sock, int16_t flags, switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t ** poll, switch_socket_t * sock, int16_t flags, switch_memory_pool_t *pool)
{ {
switch_pollset_t *pollset; switch_pollset_t *pollset;
@ -558,7 +559,7 @@ SWITCH_DECLARE(switch_status_t) switch_uuid_parse(switch_uuid_t * uuid, const ch
/* FIFO queues (apr-util) */ /* FIFO queues (apr-util) */
SWITCH_DECLARE(switch_status_t) switch_queue_create(switch_queue_t ** queue, unsigned int queue_capacity, switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_queue_create(switch_queue_t ** queue, unsigned int queue_capacity, switch_memory_pool_t *pool)
{ {
return apr_queue_create(queue, queue_capacity, pool); return apr_queue_create(queue, queue_capacity, pool);
} }

View File

@ -50,7 +50,7 @@ struct switch_buffer {
uint32_t id; uint32_t id;
}; };
SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t * pool, switch_buffer_t **buffer, switch_size_t max_len) SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t *pool, switch_buffer_t **buffer, switch_size_t max_len)
{ {
switch_buffer_t *new_buffer; switch_buffer_t *new_buffer;
@ -64,7 +64,8 @@ SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t * pool
return SWITCH_STATUS_MEMERR; 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; switch_buffer_t *new_buffer;

View File

@ -32,7 +32,7 @@
#include <switch.h> #include <switch.h>
#include <switch_caller.h> #include <switch_caller.h>
SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memory_pool_t * pool, SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memory_pool_t *pool,
const char *username, const char *username,
const char *dialplan, const char *dialplan,
const char *caller_id_name, const char *caller_id_name,
@ -40,7 +40,8 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor
const char *network_addr, const char *network_addr,
const char *ani, const char *ani,
const char *aniii, 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)
{ {

View File

@ -165,7 +165,7 @@ SWITCH_DECLARE(switch_channel_timetable_t *) switch_channel_get_timetable(switch
return times; return times;
} }
SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t *pool)
{ {
assert(pool != NULL); assert(pool != NULL);
@ -259,7 +259,8 @@ SWITCH_DECLARE(void) switch_channel_uninit(switch_channel_t *channel)
switch_buffer_destroy(&channel->dtmf_buffer); 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); assert(channel != NULL);
channel->state = state; channel->state = state;
@ -317,7 +318,7 @@ SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel_t *channel, ch
return v; return v;
} }
SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t * pool) SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t *pool)
{ {
assert(channel != NULL); assert(channel != NULL);
return switch_hash_first(pool, channel->variables); return switch_hash_first(pool, channel->variables);

View File

@ -232,7 +232,7 @@ SWITCH_DECLARE(void) switch_core_service_session(switch_core_session_t *session,
*/ */
SWITCH_DECLARE(void) switch_core_launch_thread(switch_thread_start_t func, void *obj, switch_memory_pool_t * pool) SWITCH_DECLARE(void) switch_core_launch_thread(switch_thread_start_t func, void *obj, switch_memory_pool_t *pool)
{ {
switch_thread_t *thread; switch_thread_t *thread;
switch_threadattr_t *thd_attr = NULL; switch_threadattr_t *thd_attr = NULL;
@ -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, 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; return SWITCH_STATUS_SUCCESS;
} }

View File

@ -36,7 +36,7 @@
SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah, SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah,
char *module_name, char *module_name,
char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t * pool) char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t *pool)
{ {
switch_status_t status; switch_status_t status;

View File

@ -79,7 +79,7 @@ SWITCH_DECLARE(switch_codec_t *) switch_core_session_get_write_codec(switch_core
SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec, char *codec_name, char *fmtp, SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec, char *codec_name, char *fmtp,
uint32_t rate, int ms, int channels, uint32_t flags, uint32_t rate, int ms, int channels, uint32_t flags,
const switch_codec_settings_t *codec_settings, switch_memory_pool_t * pool) const switch_codec_settings_t *codec_settings, switch_memory_pool_t *pool)
{ {
const switch_codec_interface_t *codec_interface; const switch_codec_interface_t *codec_interface;
const switch_codec_implementation_t *iptr, *implementation = NULL; const switch_codec_implementation_t *iptr, *implementation = NULL;
@ -151,7 +151,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec, ch
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} else { } 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; 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);
} }

View File

@ -47,12 +47,12 @@ static void db_pick_path(char *dbname, char *buf, switch_size_t size)
} }
SWITCH_DECLARE(int) switch_core_db_open(const char *filename, switch_core_db_t ** ppDb) SWITCH_DECLARE(int) switch_core_db_open(const char *filename, switch_core_db_t **ppDb)
{ {
return sqlite3_open(filename, ppDb); return sqlite3_open(filename, ppDb);
} }
SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t * db) SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t *db)
{ {
return sqlite3_close(db); return sqlite3_close(db);
} }
@ -72,12 +72,12 @@ SWITCH_DECLARE(int) switch_core_db_column_count(switch_core_db_stmt_t *pStmt)
return sqlite3_column_count(pStmt); return sqlite3_column_count(pStmt);
} }
SWITCH_DECLARE(const char *) switch_core_db_errmsg(switch_core_db_t * db) SWITCH_DECLARE(const char *) switch_core_db_errmsg(switch_core_db_t *db)
{ {
return sqlite3_errmsg(db); return sqlite3_errmsg(db);
} }
SWITCH_DECLARE(int) switch_core_db_exec(switch_core_db_t * db, const char *sql, switch_core_db_callback_func_t callback, void *data, char **errmsg) SWITCH_DECLARE(int) switch_core_db_exec(switch_core_db_t *db, const char *sql, switch_core_db_callback_func_t callback, void *data, char **errmsg)
{ {
return sqlite3_exec(db, sql, callback, data, errmsg); return sqlite3_exec(db, sql, callback, data, errmsg);
} }
@ -87,7 +87,7 @@ SWITCH_DECLARE(int) switch_core_db_finalize(switch_core_db_stmt_t *pStmt)
return sqlite3_finalize(pStmt); return sqlite3_finalize(pStmt);
} }
SWITCH_DECLARE(int) switch_core_db_prepare(switch_core_db_t * db, const char *zSql, int nBytes, switch_core_db_stmt_t **ppStmt, const char **pzTail) SWITCH_DECLARE(int) switch_core_db_prepare(switch_core_db_t *db, const char *zSql, int nBytes, switch_core_db_stmt_t **ppStmt, const char **pzTail)
{ {
return sqlite3_prepare(db, zSql, nBytes, ppStmt, pzTail); return sqlite3_prepare(db, zSql, nBytes, ppStmt, pzTail);
} }
@ -122,12 +122,12 @@ SWITCH_DECLARE(int) switch_core_db_bind_double(switch_core_db_stmt_t *pStmt, int
return sqlite3_bind_double(pStmt, i, dValue); return sqlite3_bind_double(pStmt, i, dValue);
} }
SWITCH_DECLARE(int64_t) switch_core_db_last_insert_rowid(switch_core_db_t * db) SWITCH_DECLARE(int64_t) switch_core_db_last_insert_rowid(switch_core_db_t *db)
{ {
return sqlite3_last_insert_rowid(db); return sqlite3_last_insert_rowid(db);
} }
SWITCH_DECLARE(int) switch_core_db_get_table(switch_core_db_t * db, const char *sql, char ***resultp, int *nrow, int *ncolumn, char **errmsg) SWITCH_DECLARE(int) switch_core_db_get_table(switch_core_db_t *db, const char *sql, char ***resultp, int *nrow, int *ncolumn, char **errmsg)
{ {
return sqlite3_get_table(db, sql, resultp, nrow, ncolumn, errmsg); return sqlite3_get_table(db, sql, resultp, nrow, ncolumn, errmsg);
} }
@ -167,7 +167,7 @@ SWITCH_DECLARE(switch_core_db_t *) switch_core_db_open_file(char *filename)
} }
SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t * db, char *test_sql, char *reactive_sql) SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t *db, char *test_sql, char *reactive_sql)
{ {
char *errmsg; char *errmsg;

View File

@ -35,7 +35,7 @@
#include "private/switch_core.h" #include "private/switch_core.h"
SWITCH_DECLARE(switch_status_t) switch_core_directory_open(switch_directory_handle_t *dh, SWITCH_DECLARE(switch_status_t) switch_core_directory_open(switch_directory_handle_t *dh,
char *module_name, char *source, char *dsn, char *passwd, switch_memory_pool_t * pool) char *module_name, char *source, char *dsn, char *passwd, switch_memory_pool_t *pool)
{ {
switch_status_t status; switch_status_t status;
@ -78,7 +78,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_directory_close(switch_directory_han
SWITCH_DECLARE(switch_status_t) switch_core_speech_open(switch_speech_handle_t *sh, SWITCH_DECLARE(switch_status_t) switch_core_speech_open(switch_speech_handle_t *sh,
char *module_name, char *module_name,
char *voice_name, unsigned int rate, switch_speech_flag_t *flags, switch_memory_pool_t * pool) char *voice_name, unsigned int rate, switch_speech_flag_t *flags, switch_memory_pool_t *pool)
{ {
switch_status_t status; switch_status_t status;

View File

@ -35,7 +35,7 @@
#include "private/switch_core.h" #include "private/switch_core.h"
SWITCH_DECLARE(switch_status_t) switch_core_file_open(switch_file_handle_t *fh, SWITCH_DECLARE(switch_status_t) switch_core_file_open(switch_file_handle_t *fh,
char *file_path, uint8_t channels, uint32_t rate, unsigned int flags, switch_memory_pool_t * pool) char *file_path, uint8_t channels, uint32_t rate, unsigned int flags, switch_memory_pool_t *pool)
{ {
char *ext; char *ext;
switch_status_t status; switch_status_t status;

View File

@ -34,7 +34,7 @@
#include <switch.h> #include <switch.h>
#include "private/switch_core.h" #include "private/switch_core.h"
SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t ** hash, switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t ** hash, switch_memory_pool_t *pool)
{ {
assert(pool != NULL); assert(pool != NULL);

View File

@ -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 (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) { 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) { if ((status = ptr->read_frame(session, frame, timeout, SWITCH_IO_FLAG_NOOP, stream_id)) != SWITCH_STATUS_SUCCESS) {
break; break;
@ -246,7 +247,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
status = SWITCH_STATUS_SUCCESS; status = SWITCH_STATUS_SUCCESS;
break; break;
default: 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; *frame = NULL;
status = SWITCH_STATUS_GENERR; status = SWITCH_STATUS_GENERR;
break; break;
@ -500,7 +502,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
status = SWITCH_STATUS_SUCCESS; status = SWITCH_STATUS_SUCCESS;
break; break;
default: 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; write_frame = NULL;
return status; return status;
} }
@ -580,7 +583,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
if (session->read_resampler) { if (session->read_resampler) {
short *data = write_frame->data; 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) session->read_resampler->to_len = (uint32_t)
switch_resample_process(session->read_resampler, session->read_resampler->from, switch_resample_process(session->read_resampler, session->read_resampler->from,
session->read_resampler->from_len, 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_io_event_hook_kill_channel_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE; 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 (session->endpoint_interface->io_routines->kill_channel) {
if ((status = session->endpoint_interface->io_routines->kill_channel(session, sig)) == SWITCH_STATUS_SUCCESS) { if ((status = session->endpoint_interface->io_routines->kill_channel(session, sig)) == SWITCH_STATUS_SUCCESS) {

View File

@ -118,7 +118,7 @@ SWITCH_DECLARE(char *) switch_core_session_sprintf(switch_core_session_t *sessio
return result; return result;
} }
SWITCH_DECLARE(char *) switch_core_sprintf(switch_memory_pool_t * pool, const char *fmt, ...) SWITCH_DECLARE(char *) switch_core_sprintf(switch_memory_pool_t *pool, const char *fmt, ...)
{ {
va_list ap; va_list ap;
char *result = NULL; char *result = NULL;
@ -157,7 +157,7 @@ SWITCH_DECLARE(char *) switch_core_session_strdup(switch_core_session_t *session
} }
SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool_t * pool, const char *todup) SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool_t *pool, const char *todup)
{ {
char *duped = NULL; char *duped = NULL;
switch_size_t len; switch_size_t len;
@ -179,7 +179,7 @@ SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool_t * pool, const cha
return duped; return duped;
} }
SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t ** pool) SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t **pool)
{ {
if ((apr_pool_create(pool, NULL)) != SWITCH_STATUS_SUCCESS) { if ((apr_pool_create(pool, NULL)) != SWITCH_STATUS_SUCCESS) {
@ -189,14 +189,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
SWITCH_DECLARE(switch_status_t) switch_core_destroy_memory_pool(switch_memory_pool_t ** pool) SWITCH_DECLARE(switch_status_t) switch_core_destroy_memory_pool(switch_memory_pool_t **pool)
{ {
apr_pool_destroy(*pool); apr_pool_destroy(*pool);
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool_t * pool, switch_size_t memory) SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool_t *pool, switch_size_t memory)
{ {
void *ptr = NULL; void *ptr = NULL;
assert(pool != NULL); assert(pool != NULL);

View File

@ -51,7 +51,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_lock(switch_core_sessio
} else { } else {
status = (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock); status = (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock);
#ifdef SWITCH_DEBUG_RWLOCKS #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 #endif
} }
} }
@ -74,7 +75,8 @@ SWITCH_DECLARE(void) switch_core_session_write_lock(switch_core_session_t *sessi
#ifdef SWITCH_DEBUG_RWLOCKS #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_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 #else
SWITCH_DECLARE(void) switch_core_session_rwunlock(switch_core_session_t *session) SWITCH_DECLARE(void) switch_core_session_rwunlock(switch_core_session_t *session)
{ {

View File

@ -177,7 +177,7 @@ SWITCH_DECLARE(int) switch_core_session_get_stream_count(switch_core_session_t *
SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_core_session_t *session, SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_core_session_t *session,
char *endpoint_name, char *endpoint_name,
switch_caller_profile_t *caller_profile, switch_caller_profile_t *caller_profile,
switch_core_session_t **new_session, switch_memory_pool_t ** pool) switch_core_session_t **new_session, switch_memory_pool_t **pool)
{ {
switch_io_event_hook_outgoing_channel_t *ptr; switch_io_event_hook_outgoing_channel_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE; switch_status_t status = SWITCH_STATUS_FALSE;
@ -773,7 +773,7 @@ SWITCH_DECLARE(void) switch_core_session_launch_thread(switch_core_session_t *se
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch_endpoint_interface_t SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch_endpoint_interface_t
*endpoint_interface, switch_memory_pool_t ** pool) *endpoint_interface, switch_memory_pool_t **pool)
{ {
switch_memory_pool_t *usepool; switch_memory_pool_t *usepool;
switch_core_session_t *session; switch_core_session_t *session;
@ -858,7 +858,7 @@ SWITCH_DECLARE(uint32_t) switch_core_session_count(void)
return runtime.session_count; return runtime.session_count;
} }
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t ** pool) SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t **pool)
{ {
const switch_endpoint_interface_t *endpoint_interface; const switch_endpoint_interface_t *endpoint_interface;
@ -900,7 +900,7 @@ SWITCH_DECLARE(uint32_t) switch_core_session_limit(uint32_t new_limit)
} }
SWITCH_DECLARE(void) switch_core_session_init(switch_memory_pool_t * pool) SWITCH_DECLARE(void) switch_core_session_init(switch_memory_pool_t *pool)
{ {
memset(&runtime, 0, sizeof(runtime)); memset(&runtime, 0, sizeof(runtime));
runtime.session_limit = 1000; runtime.session_limit = 1000;

View File

@ -41,7 +41,7 @@ static struct {
switch_memory_pool_t *memory_pool; switch_memory_pool_t *memory_pool;
} runtime; } runtime;
static switch_status_t switch_core_db_persistant_execute_trans(switch_core_db_t * db, char *sql, uint32_t retries) static switch_status_t switch_core_db_persistant_execute_trans(switch_core_db_t *db, char *sql, uint32_t retries)
{ {
char *errmsg; char *errmsg;
switch_status_t status = SWITCH_STATUS_FALSE; switch_status_t status = SWITCH_STATUS_FALSE;
@ -113,7 +113,7 @@ static switch_status_t switch_core_db_persistant_execute_trans(switch_core_db_t
return status; return status;
} }
SWITCH_DECLARE(switch_status_t) switch_core_db_persistant_execute(switch_core_db_t * db, char *sql, uint32_t retries) SWITCH_DECLARE(switch_status_t) switch_core_db_persistant_execute(switch_core_db_t *db, char *sql, uint32_t retries)
{ {
char *errmsg; char *errmsg;
switch_status_t status = SWITCH_STATUS_FALSE; switch_status_t status = SWITCH_STATUS_FALSE;
@ -340,7 +340,7 @@ static void core_event_handler(switch_event_t *event)
} }
SWITCH_DECLARE(void) switch_core_sqldb_start(switch_memory_pool_t * pool) SWITCH_DECLARE(void) switch_core_sqldb_start(switch_memory_pool_t *pool)
{ {
switch_thread_t *thread; switch_thread_t *thread;
switch_threadattr_t *thd_attr;; switch_threadattr_t *thd_attr;;

View File

@ -145,7 +145,8 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
if ((expanded = if ((expanded =
switch_channel_expand_variables(session->channel, switch_channel_expand_variables(session->channel,
extension->current_application->application_data)) != extension->current_application->application_data) { 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) { 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) { while (proceed && (application_state_handler = switch_core_get_state_handler(index++)) != 0) {
if (!application_state_handler || !application_state_handler->on_init || if (!application_state_handler || !application_state_handler->on_init ||
(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++; proceed++;
continue; continue;
} else { } 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) { while (proceed && (application_state_handler = switch_core_get_state_handler(index++)) != 0) {
if (!application_state_handler || !application_state_handler->on_ring || if (!application_state_handler || !application_state_handler->on_ring ||
(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++; proceed++;
continue; continue;
} else { } 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)); 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 if (!driver_state_handler->on_loopback
|| (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) { while ((application_state_handler = switch_channel_get_state_handler(session->channel, index++)) != 0) {
if (!application_state_handler || !application_state_handler->on_loopback if (!application_state_handler || !application_state_handler->on_loopback
|| (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)); 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 if (!driver_state_handler->on_transmit
|| (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) { while ((application_state_handler = switch_channel_get_state_handler(session->channel, index++)) != 0) {
if (!application_state_handler || !application_state_handler->on_transmit 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) { while (proceed && (application_state_handler = switch_core_get_state_handler(index++)) != 0) {
if (!application_state_handler || !application_state_handler->on_hold || if (!application_state_handler || !application_state_handler->on_hold ||
(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++; proceed++;
continue; continue;
} else { } 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)); 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 if (!driver_state_handler->on_hibernate
|| (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) { while ((application_state_handler = switch_channel_get_state_handler(session->channel, index++)) != 0) {
if (!application_state_handler || !application_state_handler->on_hibernate if (!application_state_handler || !application_state_handler->on_hibernate

View File

@ -34,7 +34,7 @@
#include <switch.h> #include <switch.h>
#include "private/switch_core.h" #include "private/switch_core.h"
SWITCH_DECLARE(switch_status_t) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval, int samples, switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval, int samples, switch_memory_pool_t *pool)
{ {
switch_timer_interface_t *timer_interface; switch_timer_interface_t *timer_interface;
switch_status_t status; switch_status_t status;

View File

@ -390,7 +390,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_shutdown(void)
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool)
{ {
switch_thread_t *thread; switch_thread_t *thread;
switch_threadattr_t *thd_attr;; switch_threadattr_t *thd_attr;;
@ -865,7 +865,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *fun
return SWITCH_STATUS_SUCCESS; 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_node_t *event_node;
switch_event_subclass_t *subclass = NULL; switch_event_subclass_t *subclass = NULL;

View File

@ -577,7 +577,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_
msg.from = __FILE__; msg.from = __FILE__;
switch_core_session_receive_message(session, &msg); 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; return SWITCH_STATUS_SUCCESS;
} }
@ -634,7 +635,7 @@ struct switch_ivr_digit_stream {
switch_time_t last_digit_time; switch_time_t last_digit_time;
}; };
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_new(switch_memory_pool_t * pool, switch_ivr_digit_stream_parser_t ** parser) SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_new(switch_memory_pool_t *pool, switch_ivr_digit_stream_parser_t ** parser)
{ {
switch_status_t status = SWITCH_STATUS_FALSE; switch_status_t status = SWITCH_STATUS_FALSE;

View File

@ -512,7 +512,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech(switch_core_session_t *
if (switch_core_asr_open(ah, if (switch_core_asr_open(ah,
mod_name, mod_name,
"L16", "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) { 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"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error loading Grammar\n");

View File

@ -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(channel, SWITCH_BRIDGE_VARIABLE, NULL);
switch_channel_set_variable(other_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)); switch_channel_hangup(other_channel, switch_channel_get_cause(channel));
} else { } else {
switch_channel_set_state(other_channel, CS_EXECUTE); 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_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
switch_core_session_t *peer_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_core_thread_session_t *this_audio_thread, *other_audio_thread;
switch_channel_t *caller_channel, *peer_channel; 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: 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)); switch_channel_hangup(caller_channel, switch_channel_get_cause(peer_channel));
} }

View File

@ -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 *invalid_sound,
const char *exit_sound, const char *exit_sound,
const char *tts_engine, 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; switch_ivr_menu_t *menu;
uint8_t newpool = 0; 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); 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; switch_status_t status = SWITCH_STATUS_FALSE;
@ -519,7 +521,7 @@ static switch_status_t switch_ivr_menu_stack_xml_add(switch_ivr_menu_xml_ctx_t *
return status; return status;
} }
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_menu_stack_xml_init(switch_ivr_menu_xml_ctx_t ** xml_menu_ctx, switch_memory_pool_t *pool)
{ {
switch_status_t status = SWITCH_STATUS_FALSE; switch_status_t status = SWITCH_STATUS_FALSE;
int autocreated = 0; int autocreated = 0;

View File

@ -156,7 +156,7 @@ static void launch_collect_thread(struct key_collect *collect)
static uint8_t check_channel_status(switch_channel_t **peer_channels, static uint8_t check_channel_status(switch_channel_t **peer_channels,
switch_core_session_t **peer_sessions, switch_core_session_t **peer_sessions,
uint32_t len, int32_t *idx, uint32_t * hups, char *file, char *key, uint8_t early_ok, uint8_t *ring_ready) uint32_t len, int32_t *idx, uint32_t * hups, char *file, char *key, uint8_t early_ok, uint8_t * ring_ready)
{ {
uint32_t i; uint32_t i;
@ -340,7 +340,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
for (x = 0; x < var_count; x++) { for (x = 0; x < var_count; x++) {
char *inner_var_array[2]; char *inner_var_array[2];
int inner_var_count; 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]); switch_event_add_header(var_event, SWITCH_STACK_BOTTOM, inner_var_array[0], "%s", inner_var_array[1]);
if (caller_channel) { 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, caller_profiles[i] = switch_caller_profile_new(pool,
NULL, NULL,
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) { if ((reason =
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel! cause: %s\n", switch_channel_cause2str(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) { if (pool) {
switch_core_destroy_memory_pool(&pool); switch_core_destroy_memory_pool(&pool);
} }

View File

@ -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; switch_xml_t cfg, xml = NULL, language, macros, macro, input, action;
char *lname = NULL, *mname = NULL, hint_data[1024] = "", enc_hint[1024] = ""; 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->samples_per_second,
read_codec->implementation->microseconds_per_frame / 1000, read_codec->implementation->microseconds_per_frame / 1000,
read_codec->implementation->number_of_channels, 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_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activated\n");
switch_core_session_set_read_codec(session, &codec); switch_core_session_set_read_codec(session, &codec);
} else { } else {
@ -879,7 +881,8 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
uint32_t timeout, uint32_t timeout,
char *valid_terminators, char *valid_terminators,
char *prompt_audio_file, 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 char terminator; //used to hold terminator recieved from

View File

@ -820,7 +820,7 @@ SWITCH_DECLARE(switch_management_interface_t *) switch_loadable_module_get_manag
return switch_core_hash_find(loadable_modules.management_hash, relative_oid); return switch_core_hash_find(loadable_modules.management_hash, relative_oid);
} }
SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t * pool, const switch_codec_implementation_t **array, int arraylen) SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool, const switch_codec_implementation_t **array, int arraylen)
{ {
switch_hash_index_t *hi; switch_hash_index_t *hi;
void *val; void *val;

View File

@ -249,7 +249,7 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, const char
} }
SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t * pool) SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t *pool)
{ {
switch_thread_t *thread; switch_thread_t *thread;
switch_threadattr_t *thd_attr;; switch_threadattr_t *thd_attr;;

View File

@ -45,7 +45,7 @@
SWITCH_DECLARE(void) switch_regex_free(void *data) SWITCH_DECLARE(void) switch_regex_free(void *data)
{ {
pcre_free(data); pcre_free(data);
} SWITCH_DECLARE(int) switch_regex_perform(char *field, char *expression, switch_regex_t ** new_re, int *ovector, uint32_t olen) } SWITCH_DECLARE(int) switch_regex_perform(char *field, char *expression, switch_regex_t **new_re, int *ovector, uint32_t olen)
{ {
const char *error = NULL; const char *error = NULL;
int erroffset = 0; int erroffset = 0;
@ -87,7 +87,7 @@ SWITCH_DECLARE(void) switch_regex_free(void *data)
} }
SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t * re, int match_count, char *data, char *field_data, SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_count, char *data, char *field_data,
char *substituted, uint32_t len, int *ovector) char *substituted, uint32_t len, int *ovector)
{ {
char index[10] = ""; char index[10] = "";

View File

@ -53,7 +53,7 @@
SWITCH_DECLARE(switch_status_t) switch_resample_create(switch_audio_resampler_t **new_resampler, SWITCH_DECLARE(switch_status_t) switch_resample_create(switch_audio_resampler_t **new_resampler,
int from_rate, switch_size_t from_size, int to_rate, uint32_t to_size, switch_memory_pool_t * pool) int from_rate, switch_size_t from_size, int to_rate, uint32_t to_size, switch_memory_pool_t *pool)
{ {
#ifdef DISABLE_RESAMPLE #ifdef DISABLE_RESAMPLE
*new_resampler = NULL; *new_resampler = NULL;
@ -73,7 +73,8 @@ SWITCH_DECLARE(switch_status_t) switch_resample_create(switch_audio_resampler_t
resampler->factor = (lto_rate / lfrom_rate); resampler->factor = (lto_rate / lfrom_rate);
resampler->resampler = resample_open(QUALITY, resampler->factor, resampler->factor); 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_size = from_size;
resampler->from = (float *) switch_core_alloc(pool, resampler->from_size); resampler->from = (float *) switch_core_alloc(pool, resampler->from_size);
resampler->to_size = to_size; resampler->to_size = to_size;

View File

@ -252,7 +252,7 @@ static void handle_ice(switch_rtp_t *rtp_session, void *data, switch_size_t len)
} }
SWITCH_DECLARE(void) switch_rtp_init(switch_memory_pool_t * pool) SWITCH_DECLARE(void) switch_rtp_init(switch_memory_pool_t *pool)
{ {
if (global_init) { if (global_init) {
return; return;
@ -357,7 +357,8 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session
switch_payload_t payload, switch_payload_t payload,
uint32_t samples_per_interval, uint32_t samples_per_interval,
uint32_t ms_per_packet, 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; switch_rtp_t *rtp_session = NULL;
srtp_policy_t policy; 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_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) { if (switch_core_timer_init(&rtp_session->timer, timer_name, ms_per_packet / 1000, samples_per_interval, rtp_session->pool) ==
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); 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 { } else {
memset(&rtp_session->timer, 0, sizeof(rtp_session->timer)); 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); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error starting timer [%s], async RTP disabled\n", timer_name);
@ -499,7 +502,7 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(char *rx_host,
switch_payload_t payload, switch_payload_t payload,
uint32_t samples_per_interval, uint32_t samples_per_interval,
uint32_t ms_per_packet, 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; switch_rtp_t *rtp_session;
@ -689,10 +692,10 @@ static void do_2833(switch_rtp_t *rtp_session)
4, 4,
0, 0,
rtp_session->te, rtp_session->te,
rtp_session->dtmf_data.timestamp_dtmf, rtp_session->dtmf_data.out_digit_seq, rtp_session->dtmf_data.out_digit_ssrc, &flags); rtp_session->dtmf_data.timestamp_dtmf, rtp_session->dtmf_data.out_digit_seq, rtp_session->dtmf_data.out_digit_ssrc,
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &flags);
"Send %s packet for [%c] ts=%d sofar=%u dur=%d seq=%d\n", loops == 1 ? "middle" : "end", switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Send %s packet for [%c] ts=%d sofar=%u dur=%d seq=%d\n",
rtp_session->dtmf_data.out_digit, rtp_session->dtmf_data.timestamp_dtmf, 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); 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) { if (!switch_strlen_zero(tx_host) && switch_sockaddr_get_port(rtp_session->from_addr) > 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, 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); 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; 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)) { if (!switch_rtp_ready(rtp_session)) {

View File

@ -113,7 +113,7 @@ SWITCH_DECLARE(void) switch_stun_random_string(char *buf, uint16_t len, char *se
SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t *buf, uint32_t len) SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t * buf, uint32_t len)
{ {
switch_stun_packet_t *packet; switch_stun_packet_t *packet;
switch_stun_packet_attribute_t *attr; switch_stun_packet_attribute_t *attr;
@ -183,7 +183,7 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_get_mapped_address(switch_s
char *p = ipstr; char *p = ipstr;
ip = (switch_stun_ip_t *) attribute->value; ip = (switch_stun_ip_t *) attribute->value;
i = (uint8_t *) &ip->address; i = (uint8_t *) & ip->address;
*ipstr = 0; *ipstr = 0;
for (x = 0; x < 4; x++) { for (x = 0; x < 4; x++) {
sprintf(p, "%u%s", i[x], x == 3 ? "" : "."); sprintf(p, "%u%s", i[x], x == 3 ? "" : ".");
@ -201,7 +201,7 @@ SWITCH_DECLARE(char *) switch_stun_packet_attribute_get_username(switch_stun_pac
return memcpy(username, attribute->value, cpylen); return memcpy(username, attribute->value, cpylen);
} }
SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_build_header(switch_stun_message_t type, char *id, uint8_t *buf) SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_build_header(switch_stun_message_t type, char *id, uint8_t * buf)
{ {
switch_stun_packet_header_t *header; switch_stun_packet_header_t *header;
@ -226,14 +226,14 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_binded_address(switch_s
uint8_t *i, x; uint8_t *i, x;
char *p = ipstr; char *p = ipstr;
attribute = (switch_stun_packet_attribute_t *) ((uint8_t *) &packet->first_attribute + ntohs(packet->header.length)); attribute = (switch_stun_packet_attribute_t *) ((uint8_t *) & packet->first_attribute + ntohs(packet->header.length));
attribute->type = htons(SWITCH_STUN_ATTR_MAPPED_ADDRESS); attribute->type = htons(SWITCH_STUN_ATTR_MAPPED_ADDRESS);
attribute->length = htons(8); attribute->length = htons(8);
ip = (switch_stun_ip_t *) attribute->value; ip = (switch_stun_ip_t *) attribute->value;
ip->port = htons(port); ip->port = htons(port);
ip->family = 1; ip->family = 1;
i = (uint8_t *) &ip->address; i = (uint8_t *) & ip->address;
for (x = 0; x < 4; x++) { for (x = 0; x < 4; x++) {
i[x] = (uint8_t) atoi(p); i[x] = (uint8_t) atoi(p);
@ -255,7 +255,7 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_username(switch_stun_pa
if (ulen % 4 != 0) { if (ulen % 4 != 0) {
return 0; return 0;
} }
attribute = (switch_stun_packet_attribute_t *) ((uint8_t *) &packet->first_attribute + ntohs(packet->header.length)); attribute = (switch_stun_packet_attribute_t *) ((uint8_t *) & packet->first_attribute + ntohs(packet->header.length));
attribute->type = htons(SWITCH_STUN_ATTR_USERNAME); attribute->type = htons(SWITCH_STUN_ATTR_USERNAME);
attribute->length = htons(ulen); attribute->length = htons(ulen);
if (username) { if (username) {
@ -269,7 +269,7 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_username(switch_stun_pa
} }
SWITCH_DECLARE(switch_status_t) switch_stun_lookup(char **ip, SWITCH_DECLARE(switch_status_t) switch_stun_lookup(char **ip,
switch_port_t *port, char *stunip, switch_port_t stunport, char **err, switch_memory_pool_t * pool) switch_port_t *port, char *stunip, switch_port_t stunport, char **err, switch_memory_pool_t *pool)
{ {
switch_sockaddr_t *local_addr = NULL, *remote_addr = NULL, *from_addr = NULL; switch_sockaddr_t *local_addr = NULL, *remote_addr = NULL, *from_addr = NULL;
switch_socket_t *sock = NULL; switch_socket_t *sock = NULL;

View File

@ -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, 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; switch_status_t status;

View File

@ -284,7 +284,7 @@ SWITCH_DECLARE(unsigned char) switch_char_to_rfc2833(char key)
return '\0'; return '\0';
} }
SWITCH_DECLARE(char *) switch_escape_char(switch_memory_pool_t * pool, char *in, char *delim, char esc) SWITCH_DECLARE(char *) switch_escape_char(switch_memory_pool_t *pool, char *in, char *delim, char esc)
{ {
char *data, *p, *d; char *data, *p, *d;
int count = 1, i = 0; int count = 1, i = 0;

View File

@ -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, SWITCH_DECLARE(switch_status_t) switch_xml_locate(const char *section,
const char *tag_name, 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 conf = NULL;
switch_xml_t tag = NULL; switch_xml_t tag = NULL;
@ -1209,7 +1210,7 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_open_root(uint8_t reload, const char **e
} }
SWITCH_DECLARE(switch_status_t) switch_xml_init(switch_memory_pool_t * pool, const char **err) SWITCH_DECLARE(switch_status_t) switch_xml_init(switch_memory_pool_t *pool, const char **err)
{ {
switch_xml_t xml; switch_xml_t xml;
XML_MEMORY_POOL = pool; XML_MEMORY_POOL = pool;