mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
unicast framework
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4900 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -42,6 +42,28 @@
|
||||
#include <switch.h>
|
||||
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
|
||||
struct switch_unicast_conninfo {
|
||||
switch_core_session_t *session;
|
||||
switch_codec_t read_codec;
|
||||
switch_frame_t write_frame;
|
||||
switch_byte_t write_frame_data[SWITCH_RECOMMENDED_BUFFER_SIZE];
|
||||
switch_socket_t *socket;
|
||||
char *local_ip;
|
||||
uint32_t local_port;
|
||||
char *remote_ip;
|
||||
uint32_t remote_port;
|
||||
switch_sockaddr_t *local_addr;
|
||||
switch_sockaddr_t *remote_addr;
|
||||
switch_mutex_t *flag_mutex;
|
||||
int32_t flags;
|
||||
int type;
|
||||
int transport;
|
||||
int stream_id;
|
||||
};
|
||||
typedef struct switch_unicast_conninfo switch_unicast_conninfo_t;
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup switch_ivr IVR Library
|
||||
* @ingroup core1
|
||||
@@ -49,6 +71,15 @@ SWITCH_BEGIN_EXTERN_C
|
||||
* building blocks for a higher level IVR interface.
|
||||
* @{
|
||||
*/
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_deactivate_unicast(switch_core_session_t *session);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_activate_unicast(switch_core_session_t *session,
|
||||
char *local_ip,
|
||||
uint32_t local_port,
|
||||
char *remote_ip,
|
||||
uint32_t remote_port,
|
||||
char *transport);
|
||||
|
||||
/*!
|
||||
\brief Generate an XML CDR report.
|
||||
\param session the session to get the data from.
|
||||
|
||||
@@ -117,6 +117,13 @@ SWITCH_BEGIN_EXTERN_C
|
||||
#define SWITCH_BITS_PER_BYTE 8
|
||||
typedef uint8_t switch_byte_t;
|
||||
|
||||
|
||||
typedef enum {
|
||||
SUF_NONE = 0,
|
||||
SUF_THREAD_RUNNING = (1 << 0),
|
||||
SUF_READY = (1 << 1)
|
||||
} switch_unicast_flag_t;
|
||||
|
||||
typedef enum {
|
||||
SWITCH_FALSE = 0,
|
||||
SWITCH_TRUE = 1
|
||||
@@ -531,6 +538,7 @@ CF_GEN_RINGBACK = (1 << 17) - Channel is generating it's own ringback
|
||||
CF_RING_READY = (1 << 18) - Channel is ready to send ringback
|
||||
CF_BREAK = (1 << 19) - Channel should stop what it's doing
|
||||
CF_BROADCAST = (1 << 20) - Channel is broadcasting
|
||||
CF_UNICAST = (1 << 21) - Channel has a unicast connection
|
||||
</pre>
|
||||
*/
|
||||
|
||||
@@ -555,7 +563,8 @@ typedef enum {
|
||||
CF_GEN_RINGBACK = (1 << 17),
|
||||
CF_RING_READY = (1 << 18),
|
||||
CF_BREAK = (1 << 19),
|
||||
CF_BROADCAST = (1 << 20)
|
||||
CF_BROADCAST = (1 << 20),
|
||||
CF_UNICAST = (1 << 21)
|
||||
} switch_channel_flag_t;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user