mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 04:31:50 +00:00
<refactor>
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4944 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -526,6 +526,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_message_send(char *uuid_str,
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_queue_message(switch_core_session_t *session, switch_core_session_message_t *message);
|
||||
|
||||
/*!
|
||||
\brief pass an indication message on a session
|
||||
\param session the session to pass the message across
|
||||
\param indication the indication message to pass
|
||||
\return SWITCH_STATUS_SUCCESS if the message was passed
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_pass_indication(switch_core_session_t *session, switch_core_session_message_types_t indication);
|
||||
|
||||
/*!
|
||||
\brief Queue an indication message on a session
|
||||
\param session the session to queue the message to
|
||||
@@ -639,13 +647,6 @@ SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_
|
||||
switch_caller_profile_t *caller_profile,
|
||||
switch_core_session_t **new_session, switch_memory_pool_t **pool);
|
||||
|
||||
/*!
|
||||
\brief Answer the channel of a given session
|
||||
\param session the session to answer the channel of
|
||||
\return SWITCH_STATUS_SUCCESS if the channel was answered
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_answer_channel(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Receive a message on a given session
|
||||
\param session the session to receive the message from
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
SWITCH_BEGIN_EXTERN_C typedef struct switch_io_event_hooks switch_io_event_hooks_t;
|
||||
|
||||
typedef struct switch_io_event_hook_outgoing_channel switch_io_event_hook_outgoing_channel_t;
|
||||
typedef struct switch_io_event_hook_answer_channel switch_io_event_hook_answer_channel_t;
|
||||
typedef struct switch_io_event_hook_receive_message switch_io_event_hook_receive_message_t;
|
||||
typedef struct switch_io_event_hook_receive_event switch_io_event_hook_receive_event_t;
|
||||
typedef struct switch_io_event_hook_read_frame switch_io_event_hook_read_frame_t;
|
||||
@@ -48,7 +47,6 @@ typedef struct switch_io_event_hook_state_change switch_io_event_hook_state_chan
|
||||
|
||||
|
||||
typedef switch_status_t (*switch_outgoing_channel_hook_t) (switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t *);
|
||||
typedef switch_status_t (*switch_answer_channel_hook_t) (switch_core_session_t *);
|
||||
typedef switch_status_t (*switch_receive_message_hook_t) (switch_core_session_t *, switch_core_session_message_t *);
|
||||
typedef switch_status_t (*switch_receive_event_hook_t) (switch_core_session_t *, switch_event_t *);
|
||||
typedef switch_status_t (*switch_read_frame_hook_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
|
||||
@@ -67,23 +65,16 @@ struct switch_io_event_hook_outgoing_channel {
|
||||
struct switch_io_event_hook_outgoing_channel *next;
|
||||
};
|
||||
|
||||
/*! \brief Node in which to store custom answer channel callback hooks */
|
||||
struct switch_io_event_hook_answer_channel {
|
||||
/*! the answer channel callback hook */
|
||||
switch_answer_channel_hook_t answer_channel;
|
||||
struct switch_io_event_hook_answer_channel *next;
|
||||
};
|
||||
|
||||
/*! \brief Node in which to store custom receive message callback hooks */
|
||||
struct switch_io_event_hook_receive_message {
|
||||
/*! the answer channel callback hook */
|
||||
/*! the message callback hook */
|
||||
switch_receive_message_hook_t receive_message;
|
||||
struct switch_io_event_hook_receive_message *next;
|
||||
};
|
||||
|
||||
/*! \brief Node in which to store custom receive message callback hooks */
|
||||
struct switch_io_event_hook_receive_event {
|
||||
/*! the answer channel callback hook */
|
||||
/*! the event callback hook */
|
||||
switch_receive_event_hook_t receive_event;
|
||||
struct switch_io_event_hook_receive_event *next;
|
||||
};
|
||||
@@ -141,8 +132,6 @@ struct switch_io_event_hook_state_change {
|
||||
struct switch_io_event_hooks {
|
||||
/*! a list of outgoing channel hooks */
|
||||
switch_io_event_hook_outgoing_channel_t *outgoing_channel;
|
||||
/*! a list of answer channel hooks */
|
||||
switch_io_event_hook_answer_channel_t *answer_channel;
|
||||
/*! a list of receive message hooks */
|
||||
switch_io_event_hook_receive_message_t *receive_message;
|
||||
/*! a list of queue message hooks */
|
||||
@@ -180,14 +169,6 @@ extern switch_io_event_hooks_t switch_core_session_get_event_hooks(switch_core_s
|
||||
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
|
||||
\param session session to bind hook to
|
||||
\param answer_channel hook to bind
|
||||
\return SWITCH_STATUS_SUCCESS on suceess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_answer_channel(switch_core_session_t *session, switch_answer_channel_hook_t answer_channel);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session sends a message
|
||||
\param session session to bind hook to
|
||||
@@ -250,7 +231,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_send_dtmf(switch_core
|
||||
\param state_change hook to bind
|
||||
\return SWITCH_STATUS_SUCCESS on suceess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_state_change(switch_core_session_t *session, switch_answer_channel_hook_t state_change);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_state_change(switch_core_session_t *session, switch_state_change_hook_t state_change);
|
||||
///\}
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
|
||||
@@ -81,8 +81,6 @@ struct switch_io_event_hooks;
|
||||
struct switch_io_routines {
|
||||
/*! creates an outgoing session from given session, caller profile */
|
||||
switch_call_cause_t (*outgoing_channel) (switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t **, switch_memory_pool_t **);
|
||||
/*! answers the given session's channel */
|
||||
switch_status_t (*answer_channel) (switch_core_session_t *);
|
||||
/*! read a frame from a session */
|
||||
switch_status_t (*read_frame) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
|
||||
/*! write a frame to a session */
|
||||
|
||||
@@ -349,6 +349,7 @@ typedef enum {
|
||||
<pre>
|
||||
SWITCH_MESSAGE_REDIRECT_AUDIO - Indication to redirect audio to another location if possible
|
||||
SWITCH_MESSAGE_TRANSMIT_TEXT - A text message
|
||||
SWITCH_MESSAGE_INDICATE_ANSWER - indicate answer
|
||||
SWITCH_MESSAGE_INDICATE_PROGRESS - indicate progress
|
||||
SWITCH_MESSAGE_INDICATE_BRIDGE - indicate a bridge starting
|
||||
SWITCH_MESSAGE_INDICATE_UNBRIDGE - indicate a bridge ending
|
||||
@@ -363,6 +364,7 @@ typedef enum {
|
||||
typedef enum {
|
||||
SWITCH_MESSAGE_REDIRECT_AUDIO,
|
||||
SWITCH_MESSAGE_TRANSMIT_TEXT,
|
||||
SWITCH_MESSAGE_INDICATE_ANSWER,
|
||||
SWITCH_MESSAGE_INDICATE_PROGRESS,
|
||||
SWITCH_MESSAGE_INDICATE_BRIDGE,
|
||||
SWITCH_MESSAGE_INDICATE_UNBRIDGE,
|
||||
|
||||
Reference in New Issue
Block a user