[Asterisk-cvs] asterisk/channels chan_zap.c,1.392,1.393

markster at lists.digium.com markster at lists.digium.com
Tue Dec 28 16:37:33 CST 2004


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

Modified Files:
	chan_zap.c 
Log Message:
Make cidrings configurable (bug #2889)


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.392
retrieving revision 1.393
diff -u -d -r1.392 -r1.393
--- chan_zap.c	16 Dec 2004 03:14:59 -0000	1.392
+++ chan_zap.c	28 Dec 2004 21:32:25 -0000	1.393
@@ -277,6 +277,9 @@
 /* How long (ms) to ignore Polarity Switch events after we answer a call */
 static int polarityonanswerdelay = 600;
 
+/* When to send the CallerID signals (rings) */
+static int sendcalleridafter = DEFAULT_CIDRINGS;
+
 /* Protect the monitoring thread, so only one process can kill or start it, and not
    when it's doing something critical. */
 AST_MUTEX_DEFINE_STATIC(monlock);
@@ -566,6 +569,7 @@
 	int hanguponpolarityswitch;
 	int polarityonanswerdelay;
 	struct timeval polaritydelaytv;
+	int sendcalleridafter;
 #ifdef ZAPATA_PRI
 	struct zt_pri *pri;
 	struct zt_pvt *bearer;
@@ -1567,7 +1571,7 @@
 			} else {
 				if (ioctl(p->subs[SUB_REAL].zfd, ZT_SETCADENCE, NULL))
 					ast_log(LOG_WARNING, "Unable to reset default ring on '%s'\n", ast->name);
-				p->cidrings = DEFAULT_CIDRINGS;
+				p->cidrings = p->sendcalleridafter;
 			}
 
 
@@ -6652,6 +6656,7 @@
 
 		tmp->polarityonanswerdelay = polarityonanswerdelay;
 		tmp->hanguponpolarityswitch = hanguponpolarityswitch;
+		tmp->sendcalleridafter = sendcalleridafter;
 
 	}
 	if (tmp && !here) {
@@ -9809,6 +9814,8 @@
 				polarityonanswerdelay = atoi(v->value);
 			} else if (!strcasecmp(v->name, "hanguponpolarityswitch")) {
 				hanguponpolarityswitch = ast_true(v->value);
+			} else if (!strcasecmp(v->name, "sendcalleridafter")) {
+				sendcalleridafter = atoi(v->value);
 			} 
 		} else 
 			ast_log(LOG_WARNING, "Ignoring %s\n", v->name);




More information about the svn-commits mailing list