[Asterisk-cvs] asterisk/apps app_dial.c, 1.116, 1.117 app_queue.c, 1.108, 1.109

markster at lists.digium.com markster at lists.digium.com
Mon Jan 3 21:56:30 CST 2005


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

Modified Files:
	app_dial.c app_queue.c 
Log Message:
Make features configurable and easier to implement


Index: app_dial.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -d -r1.116 -r1.117
--- app_dial.c	30 Dec 2004 01:17:07 -0000	1.116
+++ app_dial.c	4 Jan 2005 04:01:40 -0000	1.117
@@ -1135,12 +1135,18 @@
 		
 		if (!res) {
 			memset(&config,0,sizeof(struct ast_bridge_config));
-			config.play_to_caller=play_to_caller;
-			config.play_to_callee=play_to_callee;
-			config.allowredirect_in = allowredir_in;
-			config.allowredirect_out = allowredir_out;
-			config.allowdisconnect_in = allowdisconnect_in;
-			config.allowdisconnect_out = allowdisconnect_out;
+			if (play_to_caller)
+				config.features_caller |= AST_FEATURE_PLAY_WARNING;
+			if (play_to_callee)
+				config.features_callee |= AST_FEATURE_PLAY_WARNING;
+			if (allowredir_in)
+				config.features_callee |= AST_FEATURE_REDIRECT;
+			if (allowredir_out)
+				config.features_caller |= AST_FEATURE_REDIRECT;
+			if (allowdisconnect_in)
+				config.features_callee |= AST_FEATURE_DISCONNECT;
+			if (allowdisconnect_out)
+				config.features_caller |= AST_FEATURE_DISCONNECT;
 			config.timelimit = timelimit;
 			config.play_warning = play_warning;
 			config.warning_freq = warning_freq;

Index: app_queue.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- app_queue.c	3 Jan 2005 01:46:19 -0000	1.108
+++ app_queue.c	4 Jan 2005 04:01:40 -0000	1.109
@@ -1480,10 +1480,14 @@
 		time(&callstart);
 
 		memset(&config,0,sizeof(struct ast_bridge_config));
-		config.allowredirect_in = ast_test_flag(&flags, QUEUE_FLAG_REDIR_IN);
-		config.allowredirect_out = ast_test_flag(&flags, QUEUE_FLAG_REDIR_OUT);
-		config.allowdisconnect_in = ast_test_flag(&flags, QUEUE_FLAG_DISCON_IN);
-		config.allowdisconnect_out = ast_test_flag(&flags, QUEUE_FLAG_DISCON_OUT);
+		if (ast_test_flag(&flags, QUEUE_FLAG_REDIR_IN))
+			config.features_callee |= AST_FEATURE_REDIRECT;
+		if (ast_test_flag(&flags, QUEUE_FLAG_REDIR_OUT))
+			config.features_caller |= AST_FEATURE_REDIRECT;
+		if (ast_test_flag(&flags, QUEUE_FLAG_DISCON_IN))
+			config.features_callee |= AST_FEATURE_DISCONNECT;
+		if (ast_test_flag(&flags, QUEUE_FLAG_DISCON_OUT))
+			config.features_caller |= AST_FEATURE_DISCONNECT;
 		bridge = ast_bridge_call(qe->chan,peer,&config);
 
 		if (strcasecmp(oldcontext, qe->chan->context) || strcasecmp(oldexten, qe->chan->exten)) {




More information about the svn-commits mailing list