mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
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:
11
channel.c
11
channel.c
@@ -126,6 +126,7 @@ struct ast_channel *ast_channel_alloc(void)
|
||||
tmp->data = NULL;
|
||||
pthread_mutex_init(&tmp->lock, NULL);
|
||||
strncpy(tmp->context, "default", sizeof(tmp->context));
|
||||
strncpy(tmp->language, defaultlanguage, sizeof(tmp->language));
|
||||
strncpy(tmp->exten, "s", sizeof(tmp->exten));
|
||||
tmp->priority=1;
|
||||
tmp->next = channels;
|
||||
@@ -387,6 +388,16 @@ struct ast_frame *ast_read(struct ast_channel *chan)
|
||||
return f;
|
||||
}
|
||||
|
||||
int ast_sendtext(struct ast_channel *chan, char *text)
|
||||
{
|
||||
int res = 0;
|
||||
CHECK_BLOCKING(chan);
|
||||
if (chan->pvt->send_text)
|
||||
res = chan->pvt->send_text(chan, text);
|
||||
chan->blocking = 0;
|
||||
return res;
|
||||
}
|
||||
|
||||
int ast_write(struct ast_channel *chan, struct ast_frame *fr)
|
||||
{
|
||||
int res = -1;
|
||||
|
Reference in New Issue
Block a user