git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1222 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-04-21 22:31:08 +00:00
parent c0e494a7d6
commit a9f86cb58a
17 changed files with 382 additions and 36 deletions
+6
View File
@@ -77,8 +77,12 @@ struct switch_caller_profile {
char *ani;
/*! ANI II (when applicable) */
char *ani2;
/*! RDNIS */
char *rdnis;
/*! Destination Number */
char *destination_number;
/*! channel type */
char *source;
/*! channel name */
char *chan_name;
/*! unique id */
@@ -154,6 +158,8 @@ SWITCH_DECLARE(switch_caller_profile *) switch_caller_profile_new(switch_memory_
char *network_addr,
char *ani,
char *ani2,
char *rdnis,
char *source,
char *destination_number);
/*!
+17
View File
@@ -263,6 +263,23 @@ SWITCH_DECLARE(switch_status) switch_rtp_zerocopy_read_frame(switch_rtp *rtp_ses
*/
SWITCH_DECLARE(int) switch_rtp_write(switch_rtp *rtp_session, void *data, uint32_t datalen, uint32_t ts, switch_frame_flag *flags);
/*!
\brief Enable VAD on an RTP Session
\param rtp_session the RTP session
\param session the core session associated with the RTP session
\param codec the codec the channel is currenty using
\param flags flags for control
\return SWITCH_STAUTS_SUCCESS on success
*/
SWITCH_DECLARE(switch_status) switch_rtp_enable_vad(switch_rtp *rtp_session, switch_core_session *session, switch_codec *codec, switch_vad_flag_t flags);
/*!
\brief Disable VAD on an RTP Session
\param rtp_session the RTP session
\return SWITCH_STAUTS_SUCCESS on success
*/
SWITCH_DECLARE(switch_status) switch_rtp_disable_vad(switch_rtp *rtp_session);
/*!
\brief Write data to a given RTP session
\param rtp_session the RTP session to write to
+35 -11
View File
@@ -94,27 +94,47 @@ SWITCH_DECLARE_DATA extern switch_directories SWITCH_GLOBAL_dirs;
#define SWITCH_TRUE 1
#define SWITCH_FALSE 0
/*!
\enum switch_vad_flags
\brief RTP Related Flags
<pre>
SWITCH_VAD_FLAG_TALKING - Currently Talking
SWITCH_VAD_FLAG_EVENTS_TALK - Fire events when talking is detected
SWITCH_VAD_FLAG_EVENTS_NOTALK - Fire events when not talking is detected
</pre>
*/
typedef enum {
SWITCH_VAD_FLAG_TALKING = ( 1 << 0 ),
SWITCH_VAD_FLAG_EVENTS_TALK = ( 1 << 1 ),
SWITCH_VAD_FLAG_EVENTS_NOTALK = ( 1 << 2 ),
} switch_vad_flag_t;
/*!
\enum switch_rtp_flag_t
\brief RTP Related Flags
<pre>
SWITCH_RTP_FLAG_NOBLOCK - Do not block
SWITCH_RTP_FLAG_IO - IO is ready
SWITCH_RTP_FLAG_USE_TIMER - Timeout Reads and replace with a CNG Frame
SWITCH_RTP_FLAG_SECURE - Secure RTP
SWITCH_RTP_FLAG_AUTOADJ - Auto-Adjust the dest based on the source
SWITCH_RTP_FLAG_RAW_WRITE - Try to forward packets unscathed
SWITCH_RTP_FLAG_GOOGLEHACK - Convert payload from 102 to 97
SWITCH_RTP_FLAG_NOBLOCK - Do not block
SWITCH_RTP_FLAG_IO - IO is ready
SWITCH_RTP_FLAG_USE_TIMER - Timeout Reads and replace with a CNG Frame
SWITCH_RTP_FLAG_TIMER_RECLOCK - Resync the timer to the current clock on slips
SWITCH_RTP_FLAG_SECURE - Secure RTP
SWITCH_RTP_FLAG_AUTOADJ - Auto-Adjust the dest based on the source
SWITCH_RTP_FLAG_RAW_WRITE - Try to forward packets unscathed
SWITCH_RTP_FLAG_GOOGLEHACK - Convert payload from 102 to 97
SWITCH_RTP_FLAG_VAD - Enable VAD
</pre>
*/
typedef enum {
SWITCH_RTP_FLAG_NOBLOCK = ( 1 << 0),
SWITCH_RTP_FLAG_IO = (1 << 1),
SWITCH_RTP_FLAG_USE_TIMER = (1 << 2),
SWITCH_RTP_FLAG_SECURE = (1 << 3),
SWITCH_RTP_FLAG_AUTOADJ = (1 << 4),
SWITCH_RTP_FLAG_RAW_WRITE = (1 << 5),
SWITCH_RTP_FLAG_GOOGLEHACK = (1 << 6)
SWITCH_RTP_FLAG_TIMER_RECLOCK = (1 << 3),
SWITCH_RTP_FLAG_SECURE = (1 << 4),
SWITCH_RTP_FLAG_AUTOADJ = (1 << 5),
SWITCH_RTP_FLAG_RAW_WRITE = (1 << 6),
SWITCH_RTP_FLAG_GOOGLEHACK = (1 << 7),
SWITCH_RTP_FLAG_VAD = (1 << 8)
} switch_rtp_flag_t;
/*!
@@ -484,6 +504,8 @@ typedef enum {
SWITCH_EVENT_SHUTDOWN - The system has been shutdown
SWITCH_EVENT_PUBLISH - Publish
SWITCH_EVENT_UNPUBLISH - UnPublish
SWITCH_EVENT_TALK - Talking Detected
SWITCH_EVENT_NOTALK - Not Talking Detected
SWITCH_EVENT_ALL - All events at once
</pre>
@@ -505,6 +527,8 @@ typedef enum {
SWITCH_EVENT_SHUTDOWN,
SWITCH_EVENT_PUBLISH,
SWITCH_EVENT_UNPUBLISH,
SWITCH_EVENT_TALK,
SWITCH_EVENT_NOTALK,
SWITCH_EVENT_ALL
} switch_event_t;