[asterisk-commits] moy: branch moy/mfcr2-1.2 r131907 - in /team/moy/mfcr2-1.2: channels/ configs/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 18 00:04:20 CDT 2008


Author: moy
Date: Fri Jul 18 00:04:20 2008
New Revision: 131907

URL: http://svn.digium.com/view/asterisk?view=rev&rev=131907
Log:
added mfcr2_immediate_accept parameter to allow skipping Group B/II signals

Modified:
    team/moy/mfcr2-1.2/channels/chan_zap.c
    team/moy/mfcr2-1.2/configs/zapata.conf.sample

Modified: team/moy/mfcr2-1.2/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2-1.2/channels/chan_zap.c?view=diff&rev=131907&r1=131906&r2=131907
==============================================================================
--- team/moy/mfcr2-1.2/channels/chan_zap.c (original)
+++ team/moy/mfcr2-1.2/channels/chan_zap.c Fri Jul 18 00:04:20 2008
@@ -382,6 +382,7 @@
 static int mfcr2_cur_call_files = 0;
 static int mfcr2_cur_allow_collect_calls = 0;
 static int mfcr2_cur_double_answer = 0;
+static int mfcr2_cur_immediate_accept = 0;
 static char mfcr2_cur_logdir[OR2_MAX_LOGDIR];
 static openr2_log_level_t mfcr2_cur_loglevel = OR2_LOG_ERROR | OR2_LOG_WARNING;
 static openr2_calling_party_category_t mfcr2_cur_category = OR2_CALLING_PARTY_CATEGORY_NATIONAL_SUBSCRIBER;
@@ -7449,6 +7450,7 @@
 					openr2_context_set_mf_back_timeout(zap_r2->protocol_context, mfcr2_cur_mfback_timeout);
 					openr2_context_set_metering_pulse_timeout(zap_r2->protocol_context, mfcr2_cur_metering_pulse_timeout);
 					openr2_context_set_double_answer(zap_r2->protocol_context, mfcr2_cur_double_answer);
+					openr2_context_set_immediate_accept(zap_r2->protocol_context, mfcr2_cur_double_answer);
 					if (ast_strlen_zero(mfcr2_cur_logdir)) {
 						if (openr2_context_set_log_directory(zap_r2->protocol_context, tmplogdir)) {
 							ast_log(LOG_ERROR, "Failed setting default MFC/R2 log directory %s\n", tmplogdir);
@@ -9974,10 +9976,9 @@
 
 static int handle_mfcr2_show_channels(int fd, int argc, char *argv[])
 {
-#define FORMAT "%7s %-10.10s %-15.15s %-10.10s %-20.20s %-10.10s %-10.10s\n"
-#define FORMAT2 "%7s %-10.10s %-15.15s %-10.10s %-20.20s %-10.10s %-10.10s\n"
+#define FORMAT "%7s %-10.10s %-15.15s %-10.10s %-20.20s %-20.20s %-10.10s %-10.10s\n"
 	int filtertype = 0;
-	int targetnum;
+	int targetnum = 0;
 	char channo[5];
 	char anino[5];
 	char dnisno[5];
@@ -10000,7 +10001,7 @@
 			return RESULT_SHOWUSAGE;
 		}
 	}
-	ast_cli(fd, FORMAT, "Chan", "Variant", "Max ANI", "Max DNIS", "ANI First", "Tx State", "Rx State");
+	ast_cli(fd, FORMAT, "Chan", "Variant", "Max ANI", "Max DNIS", "ANI First", "Immediate Accept", "Tx State", "Rx State");
 	ast_mutex_lock(&iflock);
 	p = iflist;
 	while (p) {
@@ -10033,6 +10034,7 @@
 		snprintf(dnisno, sizeof(dnisno), "%d", openr2_context_get_max_dnis(r2context));
 		ast_cli(fd, FORMAT, channo, openr2_proto_get_variant_string(r2variant), 
 				anino, dnisno, openr2_context_get_ani_first(r2context) ? "Yes" : "No",  
+				openr2_context_get_immediate_accept(r2context) ? "Yes" : "No",
 				openr2_proto_get_tx_state_string(p->r2chan), openr2_proto_get_rx_state_string(p->r2chan));
 		p = p->next;
 	}
@@ -10464,6 +10466,7 @@
 				ast_cli(fd, "MFC/R2 Max ANI: %d\n", openr2_context_get_max_ani(r2context));
 				ast_cli(fd, "MFC/R2 Max DNIS: %d\n", openr2_context_get_max_dnis(r2context));
 				ast_cli(fd, "MFC/R2 Get ANI First: %s\n", openr2_context_get_ani_first(r2context) ? "Yes" : "No");
+				ast_cli(fd, "MFC/R2 Immediate Accept: %s\n", openr2_context_get_immediate_accept(r2context) ? "Yes" : "No");
 				ast_cli(fd, "MFC/R2 MF Back Timeout: %dms\n", openr2_context_get_mf_back_timeout(r2context));
 				ast_cli(fd, "MFC/R2 R2 Metering Pulse Timeout: %dms\n", openr2_context_get_metering_pulse_timeout(r2context));
 				ast_cli(fd, "MFC/R2 Rx State: %s\n", openr2_proto_get_rx_state_string(tmp->r2chan));
@@ -11422,6 +11425,8 @@
 				mfcr2_cur_double_answer = ast_true(v->value);
 			} else if (!strcasecmp(v->name, "mfcr2_allow_collect_calls")) {
 				mfcr2_cur_allow_collect_calls = ast_true(v->value);
+			} else if (!strcasecmp(v->name, "mfcr2_immediate_accept")) {
+				mfcr2_cur_immediate_accept = ast_true(v->value);
 			} else if (!strcasecmp(v->name, "mfcr2_call_files")) {
 				mfcr2_cur_call_files = ast_true(v->value);
 			} else if (!strcasecmp(v->name, "mfcr2_max_ani")) {

Modified: team/moy/mfcr2-1.2/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2-1.2/configs/zapata.conf.sample?view=diff&rev=131907&r1=131906&r2=131907
==============================================================================
--- team/moy/mfcr2-1.2/configs/zapata.conf.sample (original)
+++ team/moy/mfcr2-1.2/configs/zapata.conf.sample Fri Jul 18 00:04:20 2008
@@ -675,6 +675,10 @@
 ; (see also 'mfcr2_allow_collect_calls')
 ; mfcr2_double_answer=no
 
+; This feature allows to skip the use of Group B/II signals and go directly
+; to the accepted state for incoming calls
+; mfcr2_immediate_accept=no
+
 ; ---------------- END of options to be used with signalling=mfcr2
 
 ;




More information about the asterisk-commits mailing list