aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-16 13:35:44 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-16 13:35:44 +0000
commit4e2960819ad733e4113779c148bd12cfc261a312 (patch)
tree896555baaa9bfecc19177b5773ace97b5092f7dc /include
parentbfa699873067bdb5da1d13e475fc8882946b03ec (diff)
Adding Realtime Text support (T.140) to Asterisk
T.140/RFC 2793 is a live communication channel, originally created for IP based text phones for hearing impaired. Feels very much like the old Unix talk application. This code is developed and disclaimed by John Martin of Aupix, UK. Tested for interoperability by myself and Omnitor in Sweden, the company that wrote most of the specifications. A big thank you to everyone involved in this. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54838 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/channel.h13
-rw-r--r--include/asterisk/frame.h2
-rw-r--r--include/asterisk/rtp.h4
3 files changed, 16 insertions, 3 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index e9695940b..22a08120c 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -155,7 +155,7 @@ extern "C" {
#include "asterisk/compiler.h"
-#define AST_MAX_FDS 8
+#define AST_MAX_FDS 10
/*
* We have AST_MAX_FDS file descriptors in a channel.
* Some of them have a fixed use:
@@ -297,6 +297,9 @@ struct ast_channel_tech {
/*! \brief Write a frame, in standard format */
int (* const write_video)(struct ast_channel *chan, struct ast_frame *frame);
+ /*! \brief Write a text frame, in standard format */
+ int (* const write_text)(struct ast_channel *chan, struct ast_frame *frame);
+
/*! \brief Find bridged channel */
struct ast_channel *(* const bridged_channel)(struct ast_channel *chan, struct ast_channel *bridge);
@@ -888,6 +891,14 @@ int ast_write(struct ast_channel *chan, struct ast_frame *frame);
*/
int ast_write_video(struct ast_channel *chan, struct ast_frame *frame);
+/*! \brief Write text frame to a channel
+ * This function writes the given frame to the indicated channel.
+ * \param chan destination channel of the frame
+ * \param frame frame that will be written
+ * \return It returns 1 on success, 0 if not implemented, and -1 on failure.
+ */
+int ast_write_text(struct ast_channel *chan, struct ast_frame *frame);
+
/*! \brief Send empty audio to prime a channel driver */
int ast_prod(struct ast_channel *chan);
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h
index 8d376b4be..fa0b6f939 100644
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -268,7 +268,7 @@ extern struct ast_frame ast_null_frame;
#define AST_FORMAT_T140 (1 << 25)
/*! Maximum text mask */
#define AST_FORMAT_MAX_TEXT (1 << 26)
-#define AST_FORMAT_TEXT_MASK (((1 << 27)-1) & ~(AST_FORMAT_AUDIO_MASK) & ~(AST_FORMAT_VIDEO_MASK)))
+#define AST_FORMAT_TEXT_MASK (((1 << 27)-1) & ~(AST_FORMAT_AUDIO_MASK) & ~(AST_FORMAT_VIDEO_MASK))
enum ast_control_frame_type {
AST_CONTROL_HANGUP = 1, /*!< Other end has hungup */
diff --git a/include/asterisk/rtp.h b/include/asterisk/rtp.h
index 85f3b1903..5eea063db 100644
--- a/include/asterisk/rtp.h
+++ b/include/asterisk/rtp.h
@@ -75,8 +75,10 @@ struct ast_rtp_protocol {
enum ast_rtp_get_result (* const get_rtp_info)(struct ast_channel *chan, struct ast_rtp **rtp);
/*! Get RTP struct, or NULL if unwilling to transfer */
enum ast_rtp_get_result (* const get_vrtp_info)(struct ast_channel *chan, struct ast_rtp **rtp);
+ /*! Get RTP struct, or NULL if unwilling to transfer */
+ enum ast_rtp_get_result (* const get_trtp_info)(struct ast_channel *chan, struct ast_rtp **rtp);
/*! Set RTP peer */
- int (* const set_rtp_peer)(struct ast_channel *chan, struct ast_rtp *peer, struct ast_rtp *vpeer, int codecs, int nat_active);
+ int (* const set_rtp_peer)(struct ast_channel *chan, struct ast_rtp *peer, struct ast_rtp *vpeer, struct ast_rtp *tpeer, int codecs, int nat_active);
int (* const get_codec)(struct ast_channel *chan);
const char * const type;
AST_LIST_ENTRY(ast_rtp_protocol) list;