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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Jul 20 15:27:40 CDT 2008


Author: moy
Date: Sun Jul 20 15:27:39 2008
New Revision: 132378

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

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=132378&r1=132377&r2=132378
==============================================================================
--- team/moy/mfcr2-1.4/channels/chan_zap.c (original)
+++ team/moy/mfcr2-1.4/channels/chan_zap.c Sun Jul 20 15:27:39 2008
@@ -324,6 +324,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;
 
@@ -7846,7 +7847,12 @@
 								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);
 					ast_mutex_init(&zap_r2->monitored_count_lock);
 					zap_r2->monitored_count = 0;
@@ -12065,6 +12071,9 @@
 #endif /* PRI_GETSET_TIMERS */
 #endif /* HAVE_PRI */
 #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));
+				ast_log(LOG_WARNING, "MFC/R2 Protocol file '%s' will be used, you only should use this if you *REALLY  KNOW WHAT YOU ARE DOING*.\n", 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.4/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2-1.4/configs/zapata.conf.sample?view=diff&rev=132378&r1=132377&r2=132378
==============================================================================
--- team/moy/mfcr2-1.4/configs/zapata.conf.sample (original)
+++ team/moy/mfcr2-1.4/configs/zapata.conf.sample Sun Jul 20 15:27:39 2008
@@ -766,6 +766,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 svn-commits mailing list