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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jul 20 15:35:57 CDT 2008


Author: moy
Date: Sun Jul 20 15:35:56 2008
New Revision: 132379

URL: http://svn.digium.com/view/asterisk?view=rev&rev=132379
Log:
added mfcr2_advanced_protocol_file parameter to override R2 MF tones and timers

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=132379&r1=132378&r2=132379
==============================================================================
--- team/moy/mfcr2-1.2/channels/chan_zap.c (original)
+++ team/moy/mfcr2-1.2/channels/chan_zap.c Sun Jul 20 15:35:56 2008
@@ -384,6 +384,7 @@
 static int mfcr2_cur_double_answer = 0;
 static int mfcr2_cur_immediate_accept = 0;
 static char mfcr2_cur_logdir[OR2_MAX_LOGDIR];
+static char mfcr2_cur_r2proto_file[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;
 
@@ -7468,6 +7469,11 @@
 							if (openr2_context_set_log_directory(zap_r2->protocol_context, logdir)) {
 								ast_log(LOG_ERROR, "Failed setting MFC/R2 log directory %s\n", logdir);
 							}
+						}
+					}
+					if (!ast_strlen_zero(mfcr2_cur_r2proto_file)) {
+						if (openr2_context_configure_from_advanced_file(zap_r2->protocol_context, mfcr2_cur_r2proto_file)) {
+							ast_log(LOG_ERROR, "Failed to configure r2context from advanced configuration file %s\n", mfcr2_cur_r2proto_file);
 						}
 					}
 					ast_cond_init(&zap_r2->do_monitor, NULL);
@@ -11401,6 +11407,8 @@
 					ast_log(LOG_ERROR, "Unknown signalling method '%s'\n", v->value);
 				}
 #ifdef HAVE_OPENR2
+			} else if (!strcasecmp(v->name, "mfcr2_advanced_protocol_file")) {
+				ast_copy_string(mfcr2_cur_r2proto_file, v->value, sizeof(mfcr2_cur_r2proto_file));
 			} else if (!strcasecmp(v->name, "mfcr2_logdir")) {
 				ast_copy_string(mfcr2_cur_logdir, v->value, sizeof(mfcr2_cur_logdir));
 			} else if (!strcasecmp(v->name, "mfcr2_variant")) {

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=132379&r1=132378&r2=132379
==============================================================================
--- team/moy/mfcr2-1.2/configs/zapata.conf.sample (original)
+++ team/moy/mfcr2-1.2/configs/zapata.conf.sample Sun Jul 20 15:35:56 2008
@@ -679,6 +679,13 @@
 ; to the accepted state for incoming calls
 ; mfcr2_immediate_accept=no
 
+; WARNING: advanced users only! I really mean it
+; this parameter is commented by default because
+; YOU DON'T NEED IT UNLESS YOU REALLY GROK MFC/R2
+; READ COMMENTS on doc/r2proto.conf in openr2 package 
+; for more info
+; mfcr2_advanced_protocol_file=/path/to/r2proto.conf
+
 ; ---------------- END of options to be used with signalling=mfcr2
 
 ;




More information about the asterisk-commits mailing list