[asterisk-commits] moy: branch moy/mfcr2-1.4 r217592 - /team/moy/mfcr2-1.4/channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 9 23:04:29 CDT 2009


Author: moy
Date: Wed Sep  9 23:04:26 2009
New Revision: 217592

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=217592
Log:
added DTMF R2 configuration

Modified:
    team/moy/mfcr2-1.4/channels/chan_dahdi.c

Modified: team/moy/mfcr2-1.4/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/moy/mfcr2-1.4/channels/chan_dahdi.c?view=diff&rev=217592&r1=217591&r2=217592
==============================================================================
--- team/moy/mfcr2-1.4/channels/chan_dahdi.c (original)
+++ team/moy/mfcr2-1.4/channels/chan_dahdi.c Wed Sep  9 23:04:26 2009
@@ -330,6 +330,9 @@
 static int mfcr2_cur_forced_release = 0;
 static int mfcr2_cur_double_answer = 0;
 static int mfcr2_cur_immediate_accept = -1;
+static int mfcr2_cur_dtmf_dialing = -1;
+static int mfcr2_cur_dtmf_time_on = OR2_DEFAULT_DTMF_ON;
+static int mfcr2_cur_dtmf_time_off = OR2_DEFAULT_DTMF_OFF;
 static char mfcr2_cur_logdir[OR2_MAX_PATH];
 static char mfcr2_cur_r2proto_file[OR2_MAX_PATH];
 static openr2_log_level_t mfcr2_cur_loglevel = OR2_LOG_ERROR | OR2_LOG_WARNING;
@@ -1239,6 +1242,9 @@
 	mfcr2_cur_max_ani = 10;
 	mfcr2_cur_max_dnis = 4;
 	mfcr2_cur_get_ani_first = -1;
+	mfcr2_cur_dtmf_dialing = -1;
+	mfcr2_cur_dtmf_time_on = OR2_DEFAULT_DTMF_ON;
+	mfcr2_cur_dtmf_time_off = OR2_DEFAULT_DTMF_OFF;
 	mfcr2_cur_skip_category = -1;
 	mfcr2_cur_call_files = 0;
 	mfcr2_cur_allow_collect_calls = 0;
@@ -8705,6 +8711,7 @@
 					openr2_context_set_metering_pulse_timeout(dahdi_r2->protocol_context, mfcr2_cur_metering_pulse_timeout);
 					openr2_context_set_double_answer(dahdi_r2->protocol_context, mfcr2_cur_double_answer);
 					openr2_context_set_immediate_accept(dahdi_r2->protocol_context, mfcr2_cur_immediate_accept);
+					openr2_context_set_dtmf_dialing(dahdi_r2->protocol_context, mfcr2_cur_dtmf_dialing, mfcr2_cur_dtmf_time_on, mfcr2_cur_dtmf_time_off);
 					if (ast_strlen_zero(mfcr2_cur_logdir)) {
 						if (openr2_context_set_log_directory(dahdi_r2->protocol_context, tmplogdir)) {
 							ast_log(LOG_ERROR, "Failed setting default MFC/R2 log directory %s\n", tmplogdir);
@@ -12067,6 +12074,7 @@
 				ast_cli(fd, "MFC/R2 Variant: %s\n", openr2_proto_get_variant_string(r2variant));
 				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 DTMF Dialing: %s\n", openr2_context_get_dtmf_dialing(r2context, NULL, NULL) ? "Yes" : "No");
 				ast_cli(fd, "MFC/R2 Get ANI First: %s\n", openr2_context_get_ani_first(r2context) ? "Yes" : "No");
 				ast_cli(fd, "MFC/R2 Skip Category: %s\n", openr2_context_get_skip_category_request(r2context) ? "Yes" : "No");
 				ast_cli(fd, "MFC/R2 Immediate Accept: %s\n", openr2_context_get_immediate_accept(r2context) ? "Yes" : "No");
@@ -13324,8 +13332,14 @@
 			} else if (!strcasecmp(v->name, "mfcr2_metering_pulse_timeout")) {
 				mfcr2_cur_metering_pulse_timeout = atoi(v->value);
 				if (mfcr2_cur_metering_pulse_timeout > 500) {
-					ast_log(LOG_WARNING, "Metering pulse timeout greater than 500ms is not recommended, you have been warned!\n");
+					ast_log(LOG_WARNING, "mfcr2_metering_pulse_timeout greater than 500ms is not recommended, you have been warned!\n");
 				}
+			} else if (!strcasecmp(v->name, "mfcr2_dtmf_dialing")) {
+				mfcr2_cur_dtmf_dialing = ast_true(v->value) ? 1 : 0;
+			} else if (!strcasecmp(v->name, "mfcr2_dtmf_time_on")) {
+				mfcr2_cur_dtmf_time_on = atoi(v->value);
+			} else if (!strcasecmp(v->name, "mfcr2_dtmf_time_off")) {
+				mfcr2_cur_dtmf_time_off = atoi(v->value);
 			} else if (!strcasecmp(v->name, "mfcr2_get_ani_first")) {
 				mfcr2_cur_get_ani_first = ast_true(v->value) ? 1 : 0;
 			} else if (!strcasecmp(v->name, "mfcr2_skip_category")) {




More information about the asterisk-commits mailing list