aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_phone.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2002-11-29 02:14:13 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2002-11-29 02:14:13 +0000
commit69399315991bf7f9679e2d9b22f42415653cfc04 (patch)
treee3349bbc37c69394a11f4358e9af9f7a5d2a2329 /channels/chan_phone.c
parent2d459a804c0512bbceafe63a934770c2aa3f5edd (diff)
Version 0.3.0 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@556 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_phone.c')
-rwxr-xr-xchannels/chan_phone.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index 09f5b1b04..9a6bc9bcd 100755
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -320,7 +320,7 @@ static struct ast_frame *phone_exception(struct ast_channel *ast)
/* Some nice norms */
p->fr.datalen = 0;
- p->fr.timelen = 0;
+ p->fr.samples = 0;
p->fr.data = NULL;
p->fr.src = type;
p->fr.offset = 0;
@@ -381,7 +381,7 @@ static struct ast_frame *phone_read(struct ast_channel *ast)
/* Some nice norms */
p->fr.datalen = 0;
- p->fr.timelen = 0;
+ p->fr.samples = 0;
p->fr.data = NULL;
p->fr.src = type;
p->fr.offset = 0;
@@ -415,6 +415,7 @@ static struct ast_frame *phone_read(struct ast_channel *ast)
res = 4;
break;
}
+ p->fr.samples = 240;
p->fr.datalen = res;
p->fr.frametype = AST_FRAME_VOICE;
p->fr.subclass = p->lastinput;
@@ -630,6 +631,8 @@ static struct ast_channel *phone_new(struct phone_pvt *i, int state, char *conte
strncpy(tmp->context, context, sizeof(tmp->context)-1);
if (strlen(i->ext))
strncpy(tmp->exten, i->ext, sizeof(tmp->exten)-1);
+ else
+ strncpy(tmp->exten, "s", sizeof(tmp->exten) - 1);
if (strlen(i->language))
strncpy(tmp->language, i->language, sizeof(tmp->language)-1);
if (strlen(i->callerid))