[Asterisk-cvs] asterisk/channels chan_agent.c, 1.93, 1.94 chan_zap.c, 1.384, 1.385

jim at lists.digium.com jim at lists.digium.com
Thu Dec 9 17:41:45 CST 2004


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

Modified Files:
	chan_agent.c chan_zap.c 
Log Message:
Fixed call parking, added separate paramater to allow/disallow call parking on
Zaptel interfaces (canpark=yes/no in zapata.conf), added urlbase paramater to
Monitor so that a url can optionally be included in CDR (user field), cleaned up a couple of minor things


Index: chan_agent.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_agent.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- chan_agent.c	7 Dec 2004 20:38:43 -0000	1.93
+++ chan_agent.c	9 Dec 2004 22:39:14 -0000	1.94
@@ -1366,9 +1366,14 @@
 					exten = NULL;
 			}
 		}
-		if ( options ) {
+		if (options) {
 			while (*options) {
 				option = (char)options[0];
+				if ((option >= 0) && (option <= '9'))
+				{
+					options++;
+					continue;
+				}
 				if (option=='s')
 					play_announcement = 0;
 				else {

Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.384
retrieving revision 1.385
diff -u -d -r1.384 -r1.385
--- chan_zap.c	7 Dec 2004 20:38:43 -0000	1.384
+++ chan_zap.c	9 Dec 2004 22:39:14 -0000	1.385
@@ -196,6 +196,8 @@
 
 static int transfer = 0;
 
+static int canpark = 0;
+
 static int cancallforward = 0;
 
 static float rxgain = 0.0;
@@ -521,6 +523,7 @@
 	int callwaitingcallerid;
 	int threewaycalling;
 	int transfer;
+	int canpark;
 	int digital;
 	int outgoing;
 	int dnd;
@@ -5129,7 +5132,7 @@
 				getforward = 0;
 				memset(exten, 0, sizeof(exten));
 				len = 0;
-			} else if (p->transfer && !strcmp(exten, ast_parking_ext()) && 
+			} else if ((p->transfer || p->canpark) && !strcmp(exten, ast_parking_ext()) && 
 						p->subs[SUB_THREEWAY].owner &&
 						ast_bridged_channel(p->subs[SUB_THREEWAY].owner)) {
 				/* This is a three way call, the main call being a real channel, 
@@ -6596,6 +6599,7 @@
 			tmp->confno = -1;
 			tmp->propconfno = -1;
 		}
+		tmp->canpark = canpark;
 		tmp->transfer = transfer;
 		strncpy(tmp->defcontext,context,sizeof(tmp->defcontext)-1);
 		strncpy(tmp->language, language, sizeof(tmp->language)-1);
@@ -9333,6 +9337,8 @@
 			adsi = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "transfer")) {
 			transfer = ast_true(v->value);
+		} else if (!strcasecmp(v->name, "canpark")) {
+			canpark = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "echocancelwhenbridged")) {
 			echocanbridged = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "busydetect")) {




More information about the svn-commits mailing list