From b4edb3b925ce811c2123e5100ae7aaa7d081b681 Mon Sep 17 00:00:00 2001 From: markster Date: Mon, 24 Jan 2005 21:43:35 +0000 Subject: Fix law table (i4l) (bug #3412) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4887 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_modem_i4l.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'channels/chan_modem_i4l.c') diff --git a/channels/chan_modem_i4l.c b/channels/chan_modem_i4l.c index bf8eed973..d268d9c58 100755 --- a/channels/chan_modem_i4l.c +++ b/channels/chan_modem_i4l.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #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;xdatalen/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; -- cgit v1.2.3