Version 0.1.3 from FTP

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2000-03-26 01:59:06 +00:00
parent c44f9f168a
commit 5e0525cc65
7 changed files with 365 additions and 12 deletions

View File

@@ -28,11 +28,14 @@ extern "C" {
#define AST_CHANNEL_NAME 80
#define AST_CHANNEL_MAX_STACK 32
#define MAX_LANGUAGE 20
/* Max length an extension can be (unique) is this number */
#define AST_MAX_EXTENSION 80
struct ast_channel {
char name[AST_CHANNEL_NAME]; /* ASCII Description of channel name */
char language[MAX_LANGUAGE]; /* Language requested */
pthread_t blocker; /* If anyone is blocking, this is them */
pthread_mutex_t lock; /* Lock, can be used to lock a channel for some operations */
char *blockproc; /* Procedure causing blocking */
@@ -132,6 +135,9 @@ struct ast_frame *ast_read(struct ast_channel *chan);
/* Write a frame to a channel */
int ast_write(struct ast_channel *chan, struct ast_frame *frame);
/* Write text to a display on a channel */
int ast_sendtext(struct ast_channel *chan, char *text);
/* Browse the channels currently in use */
struct ast_channel *ast_channel_walk(struct ast_channel *prev);

View File

@@ -37,6 +37,8 @@ struct ast_channel_pvt {
struct ast_frame * (*read)(struct ast_channel *chan);
/* Write a frame, in standard format */
int (*write)(struct ast_channel *chan, struct ast_frame *frame);
/* Display or transmit text */
int (*send_text)(struct ast_channel *chan, char *text);
};
/* Create a channel structure */

View File

@@ -55,6 +55,7 @@ struct ast_frame_chain {
#define AST_FRAME_CONTROL 4 /* A control frame, subclass is AST_CONTROL_* */
#define AST_FRAME_NULL 5 /* An empty, useless frame */
#define AST_FRAME_IAX 6 /* Inter Aterisk Exchange private frame type */
#define AST_FRAME_TEXT 7 /* Text messages */
/* Data formats for capabilities and frames alike */
#define AST_FORMAT_G723_1 (1 << 0) /* G.723.1 compression */