aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-24 21:43:35 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-24 21:43:35 +0000
commitb4edb3b925ce811c2123e5100ae7aaa7d081b681 (patch)
treef6295328d7339953f4708f9e13cf69b8d1a9f011 /channels
parent2894ed5364d4c3e44762933ecf909d4ff7517eec (diff)
Fix law table (i4l) (bug #3412)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4887 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_modem_i4l.c10
1 files changed, 5 insertions, 5 deletions
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 <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;