[Asterisk-cvs] asterisk/channels chan_modem_i4l.c,1.22,1.23

markster at lists.digium.com markster at lists.digium.com
Mon Jan 24 15:41:14 CST 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv24987/channels

Modified Files:
	chan_modem_i4l.c 
Log Message:
Fix law table (i4l) (bug #3412)


Index: chan_modem_i4l.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_modem_i4l.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- chan_modem_i4l.c	24 Jan 2005 14:00:18 -0000	1.22
+++ chan_modem_i4l.c	24 Jan 2005 21:43:35 -0000	1.23
@@ -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 @@
 		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 @@
 						if (!f)
 							return NULL;
 					} else {
-						*(b++) = AST_ALAW(result[x]);
+						*(b++) = AST_MULAW(result[x]);
 						p->obuflen += 2;
 					}
 				}
@@ -480,7 +480,7 @@
 		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;




More information about the svn-commits mailing list