[asterisk-commits] mattf: branch mattf/asterisk-ss7 r42387 - /team/mattf/asterisk-ss7/channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Sep 7 20:21:15 MST 2006


Author: mattf
Date: Thu Sep  7 22:21:14 2006
New Revision: 42387

URL: http://svn.digium.com/view/asterisk?rev=42387&view=rev
Log:
Make sure we use ulaw instead of alaw for ANSI links

Modified:
    team/mattf/asterisk-ss7/channels/chan_zap.c

Modified: team/mattf/asterisk-ss7/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/channels/chan_zap.c?rev=42387&r1=42386&r2=42387&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/channels/chan_zap.c (original)
+++ team/mattf/asterisk-ss7/channels/chan_zap.c Thu Sep  7 22:21:14 2006
@@ -424,6 +424,7 @@
 	int numsigchans;
 	int linkstate[NUM_DCHANS];
 	int numchans;
+	int type;
 	struct ss7 *ss7;
 	struct zt_pvt *pvts[MAX_CHANNELS];				/*!< Member channel pvt structs */
 };
@@ -8162,7 +8163,11 @@
 	if (ioctl(p->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &law) == -1)
 		ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d\n", p->channel, law);
 	
-	law = ZT_LAW_ALAW;
+	if (linkset->type == SS7_ITU)
+		law = ZT_LAW_ALAW;
+	else
+		law = ZT_LAW_MULAW;
+
 	res = zt_setlaw(p->subs[SUB_REAL].zfd, law);
 	if (res < 0) 
 		ast_log(LOG_WARNING, "Unable to set law on channel %d\n", p->channel);
@@ -10986,6 +10991,8 @@
 		ast_log(LOG_ERROR, "Can't create new SS7!\n");
 		return -1;
 	}
+
+	link->type = cur_ss7type;
 
 	if (cur_pointcode < 0) {
 		ast_log(LOG_ERROR, "Unspecified pointcode!\n");



More information about the asterisk-commits mailing list