[Asterisk-cvs] asterisk/res res_features.c,1.2,1.3

markster at lists.digium.com markster at lists.digium.com
Wed Jul 28 15:39:10 CDT 2004


Update of /usr/cvsroot/asterisk/res
In directory localhost.localdomain:/tmp/cvs-serv19862/res

Modified Files:
	res_features.c 
Log Message:
Merge alternate hangup and meetme patches from Matt N.


Index: res_features.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_features.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- res_features.c	24 Jul 2004 02:29:40 -0000	1.2
+++ res_features.c	28 Jul 2004 19:25:14 -0000	1.3
@@ -226,9 +226,10 @@
 	struct ast_channel *transferer;
 	struct ast_channel *transferee;
 	char *transferer_real_context;
-	int allowdisconnect,allowredirect_in,allowredirect_out;
+	int allowdisconnect_in,allowdisconnect_out,allowredirect_in,allowredirect_out;
 
-	allowdisconnect = config->allowdisconnect;
+	allowdisconnect_in = config->allowdisconnect_in;
+	allowdisconnect_out = config->allowdisconnect_out;
 	allowredirect_in = config->allowredirect_in;
 	allowredirect_out = config->allowredirect_out;
 
@@ -283,14 +284,16 @@
 					ast_channel_setoption(chan, ntohs(aoh->option), aoh->data, f->datalen - sizeof(struct ast_option_header), 0);
 			}
 		}
-            if (f && (f->frametype == AST_FRAME_DTMF) && (who == chan) && allowdisconnect &&
-		     (f->subclass == '*')) {
-		if (option_verbose > 3)
-			ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
+		/* check for '*', if we find it it's time to disconnect */
+		if (f && (f->frametype == AST_FRAME_DTMF) &&
+			(((who == chan) && allowdisconnect_out) || ((who == peer) && allowdisconnect_in)) &&
+			(f->subclass == '*')) {
+			
+			if (option_verbose > 3)
+				ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
 			res = -1;
 			break;
-
-			}
+		}
 
 		if ((f->frametype == AST_FRAME_DTMF) &&
 			((allowredirect_in && who == peer) || (allowredirect_out && who == chan)) &&
@@ -586,7 +589,8 @@
 		memset(&config,0,sizeof(struct ast_bridge_config));
 		config.allowredirect_in = 1;
 		config.allowredirect_out = 1;
-		config.allowdisconnect = 0;
+		config.allowdisconnect_out = 0;
+		config.allowdisconnect_in = 0;
 		config.timelimit = 0;
 		config.play_warning = 0;
 		config.warning_freq = 0;




More information about the svn-commits mailing list