[asterisk-commits] branch mattf/asterisk-ss7 r37802 - /team/mattf/asterisk-ss7/channels/chan_zap.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jul 17 12:04:17 MST 2006


Author: mattf
Date: Mon Jul 17 14:04:16 2006
New Revision: 37802

URL: http://svn.digium.com/view/asterisk?rev=37802&view=rev
Log:
Updates to make it compile.

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=37802&r1=37801&r2=37802&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/channels/chan_zap.c (original)
+++ team/mattf/asterisk-ss7/channels/chan_zap.c Mon Jul 17 14:04:16 2006
@@ -722,6 +722,7 @@
 	int dsp_features;
 #ifdef HAVE_SS7
 	struct zt_ss7 *ss7;
+	struct isup_call *ss7call;
 	int cic;							/*!< CIC associated with channel */
 #endif
 } *iflist = NULL, *ifend = NULL;
@@ -7858,6 +7859,20 @@
 }
 
 #ifdef HAVE_SS7
+static int zt_setlaw(int zfd, int law);
+
+static int ss7_find_cic(struct zt_ss7 *linkset, int cic)
+{
+	int i;
+	int winner = -1;
+	for (i = 0; i < linkset->numchans; i++) {
+		if (linkset->pvts[i] && (linkset->pvts[i]->cic == cic)) {
+			winner = i;
+		}
+	}
+	return winner;
+}
+
 static void *ss7_linkset(void *data)
 {
 	int res, i;
@@ -7865,6 +7880,9 @@
 	struct zt_ss7 *linkset = (struct zt_ss7 *) data;
 	struct ss7 *ss7 = linkset->ss7;
 	ss7_event *e = NULL;
+	struct ast_channel *c;
+	struct zt_pvt *p;
+	int chanpos;
 	struct pollfd pollers[NUM_DCHANS];
 	int nextms = 0;
 
@@ -7960,9 +7978,8 @@
 				ast_log(LOG_DEBUG, "Got GRA from cic %d to %d.\n", e->gra.startcic, e->gra.endcic);
 				break;
 			case SS7_EVENT_IAM:
-				struct zt_pvt *p;
 				ast_log(LOG_DEBUG, "Got IAM for cic %d and number %s\n", e->iam.cic, e->iam.called_party_num);
-				chanpos = ss7_find_cic(linkset);
+				chanpos = ss7_find_cic(linkset, e->iam.cic);
 				if (chanpos < 0) {
 					ast_log(LOG_WARNING, "IAM on unconfigured CIC %d\n", e->iam.cic);
 					isup_rlc(ss7, e->iam.call);
@@ -8015,10 +8032,10 @@
 					if (c)
 						ast_verbose(VERBOSE_PREFIX_3 "Accepting call to '%s' on CIC %d\n", p->exten, p->cic);
 					else
-						ast_log(LOW_WARNING, "Unable to start PBX on CIC %d\n", p->cic);
+						ast_log(LOG_WARNING, "Unable to start PBX on CIC %d\n", p->cic);
 				} else {
 					ast_log(LOG_DEBUG, "Call on CIC for unconfigured extension %s\n", p->exten);
-					isup_rlc(ss7, e->iam.call, PRI_CAUSE_UNALLOCATED);
+					isup_rlc(ss7, e->iam.call);
 				}
 
 				ast_mutex_unlock(&p->lock);



More information about the asterisk-commits mailing list