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

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


Author: moy
Date: Thu Jul 17 23:14:05 2008
New Revision: 131905

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

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

Modified: team/moy/mfcr2/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/channels/chan_zap.c?view=diff&rev=131905&r1=131904&r2=131905
==============================================================================
--- team/moy/mfcr2/channels/chan_zap.c (original)
+++ team/moy/mfcr2/channels/chan_zap.c Thu Jul 17 23:14:05 2008
@@ -423,6 +423,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;
@@ -8856,6 +8857,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);
@@ -12540,10 +12542,9 @@
 
 static char *handle_mfcr2_show_channels(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-#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];
@@ -12576,7 +12577,7 @@
 			return CLI_SHOWUSAGE;
 		}
 	}
-	ast_cli(a->fd, FORMAT, "Chan", "Variant", "Max ANI", "Max DNIS", "ANI First", "Tx State", "Rx State");
+	ast_cli(a->fd, FORMAT, "Chan", "Variant", "Max ANI", "Max DNIS", "ANI First", "Immediate Accept", "Tx State", "Rx State");
 	ast_mutex_lock(&iflock);
 	p = iflist;
 	while (p) {
@@ -12609,6 +12610,7 @@
 		snprintf(dnisno, sizeof(dnisno), "%d", openr2_context_get_max_dnis(r2context));
 		ast_cli(a->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;
 	}
@@ -13195,6 +13197,7 @@
 				ast_cli(a->fd, "MFC/R2 Max ANI: %d\n", openr2_context_get_max_ani(r2context));
 				ast_cli(a->fd, "MFC/R2 Max DNIS: %d\n", openr2_context_get_max_dnis(r2context));
 				ast_cli(a->fd, "MFC/R2 Get ANI First: %s\n", openr2_context_get_ani_first(r2context) ? "Yes" : "No");
+				ast_cli(a->fd, "MFC/R2 Immediate Accept: %s\n", openr2_context_get_immediate_accept(r2context) ? "Yes" : "No");
 				ast_cli(a->fd, "MFC/R2 MF Back Timeout: %dms\n", openr2_context_get_mf_back_timeout(r2context));
 				ast_cli(a->fd, "MFC/R2 R2 Metering Pulse Timeout: %dms\n", openr2_context_get_metering_pulse_timeout(r2context));
 				ast_cli(a->fd, "MFC/R2 Rx State: %s\n", openr2_proto_get_rx_state_string(tmp->r2chan));
@@ -15149,6 +15152,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/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/configs/zapata.conf.sample?view=diff&rev=131905&r1=131904&r2=131905
==============================================================================
--- team/moy/mfcr2/configs/zapata.conf.sample (original)
+++ team/moy/mfcr2/configs/zapata.conf.sample Thu Jul 17 23:14:05 2008
@@ -964,6 +964,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
 
 ; ---------------- Options for use with signalling=ss7 -----------------




More information about the svn-commits mailing list