From 248c923284bb401c1738849a94e4e487226c280f Mon Sep 17 00:00:00 2001 From: Mark Spencer <markster@digium.com> Date: Mon, 24 Jan 2005 21:43:35 +0000 Subject: [PATCH] Fix law table (i4l) (bug #3412) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4887 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_modem_i4l.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/channels/chan_modem_i4l.c b/channels/chan_modem_i4l.c index bf8eed9730..d268d9c584 100755 --- a/channels/chan_modem_i4l.c +++ b/channels/chan_modem_i4l.c @@ -26,7 +26,7 @@ #include <asterisk/options.h> #include <asterisk/dsp.h> #include <asterisk/callerid.h> -#include <asterisk/alaw.h> +#include <asterisk/ulaw.h> #define STATE_COMMAND 0 #define STATE_VOICE 1 @@ -211,9 +211,9 @@ static int i4l_init(struct ast_modem_pvt *p) return -1; } - if (ast_modem_send(p, "AT+VSM=5", 0) || + if (ast_modem_send(p, "AT+VSM=6", 0) || ast_modem_expect(p, "OK", 5)) { - ast_log(LOG_WARNING, "Unable to set to aLAW mode\n"); + ast_log(LOG_WARNING, "Unable to set to muLAW mode\n"); return -1; } if (ast_modem_send(p, "AT+VLS=2", 0) || @@ -420,7 +420,7 @@ static struct ast_frame *i4l_read(struct ast_modem_pvt *p) if (!f) return NULL; } else { - *(b++) = AST_ALAW(result[x]); + *(b++) = AST_MULAW(result[x]); p->obuflen += 2; } } @@ -480,7 +480,7 @@ static int i4l_write(struct ast_modem_pvt *p, struct ast_frame *f) return -1; } for (x=0;x<f->datalen/2;x++) { - b = AST_LIN2A(((short *)f->data)[x]); + b = AST_LIN2MU(((short *)f->data)[x]); result[bpos++] = b; if (b == CHAR_DLE) result[bpos++]=b; -- GitLab