[svn-commits] moy: branch moy/mfcr2-1.4 r131906 - in /team/moy/mfcr2-1.4: channels/ configs/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jul 17 23:36:22 CDT 2008


Author: moy
Date: Thu Jul 17 23:36:22 2008
New Revision: 131906

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

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

Modified: team/moy/mfcr2-1.4/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2-1.4/channels/chan_zap.c?view=diff&rev=131906&r1=131905&r2=131906
==============================================================================
--- team/moy/mfcr2-1.4/channels/chan_zap.c (original)
+++ team/moy/mfcr2-1.4/channels/chan_zap.c Thu Jul 17 23:36:22 2008
@@ -322,6 +322,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;
@@ -7826,6 +7827,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_immediate_accept);
 					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);
@@ -10474,10 +10476,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];
@@ -10500,7 +10501,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) {
@@ -10533,6 +10534,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;
 	}
@@ -10977,6 +10979,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));
@@ -12086,6 +12089,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.4/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2-1.4/configs/zapata.conf.sample?view=diff&rev=131906&r1=131905&r2=131906
==============================================================================
--- team/moy/mfcr2-1.4/configs/zapata.conf.sample (original)
+++ team/moy/mfcr2-1.4/configs/zapata.conf.sample Thu Jul 17 23:36:22 2008
@@ -762,6 +762,9 @@
 ; (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 svn-commits mailing list