[asterisk-commits] moy: branch moy/mfcr2-1.4 r145020 - in /team/moy/mfcr2-1.4: channels/ configs/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Sep 27 20:32:54 CDT 2008


Author: moy
Date: Sat Sep 27 20:32:53 2008
New Revision: 145020

URL: http://svn.digium.com/view/asterisk?view=rev&rev=145020
Log:
added support for mfcr2_charge_calls parameter in order to charge or not the calls

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=145020&r1=145019&r2=145020
==============================================================================
--- team/moy/mfcr2-1.4/channels/chan_zap.c (original)
+++ team/moy/mfcr2-1.4/channels/chan_zap.c Sat Sep 27 20:32:53 2008
@@ -321,6 +321,7 @@
 static int mfcr2_cur_context_index = 0;
 static int mfcr2_cur_call_files = 0;
 static int mfcr2_cur_allow_collect_calls = 0;
+static int mfcr2_cur_charge_calls = 1;
 static int mfcr2_cur_forced_release = 0;
 static int mfcr2_cur_double_answer = 0;
 static int mfcr2_cur_immediate_accept = 0;
@@ -619,6 +620,7 @@
 	openr2_chan_t *r2chan;
 	openr2_calling_party_category_t mfcr2_recvd_category;
 	openr2_calling_party_category_t mfcr2_category;
+	int mfcr2_charge_calls;
 	int mfcr2_allow_collect_calls;
 	int mfcr2_forced_release;
 	int mfcr2_dnis_index;
@@ -1019,7 +1021,11 @@
 				p->channel, p->exten, p->context);
 		openr2_chan_disconnect_call(r2chan, OR2_CAUSE_UNALLOCATED_NUMBER);
 	} else {
-		openr2_chan_accept_call(r2chan, OR2_CALL_WITH_CHARGE);
+		if (p->mfcr2_charge_calls) {
+			openr2_chan_accept_call(r2chan, OR2_CALL_WITH_CHARGE);
+		} else {
+			openr2_chan_accept_call(r2chan, OR2_CALL_NO_CHARGE);
+		}	
 	}	
 }
 
@@ -7970,6 +7976,7 @@
 					tmp->mfcr2_category = mfcr2_cur_category;
 					tmp->mfcr2 = zap_r2;
 					tmp->mfcr2call = 0;
+					tmp->mfcr2_charge_calls = mfcr2_cur_charge_calls;
 					tmp->mfcr2_ani_index = 0;
 					tmp->mfcr2_dnis_index = 0;
 					tmp->mfcr2_allow_collect_calls = mfcr2_cur_allow_collect_calls;
@@ -11108,6 +11115,7 @@
 				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 Charge Calls: %s\n", tmp->mfcr2_charge_calls ? "Yes" : "No");
 				ast_cli(fd, "MFC/R2 Allow Collect Calls: %s\n", tmp->mfcr2_allow_collect_calls ? "Yes" : "No");
 				ast_cli(fd, "MFC/R2 Forced Release: %s\n", tmp->mfcr2_forced_release ? "Yes" : "No");
 				ast_cli(fd, "MFC/R2 MF Back Timeout: %dms\n", openr2_context_get_mf_back_timeout(r2context));
@@ -12227,6 +12235,8 @@
 				mfcr2_cur_get_ani_first = ast_true(v->value);
 			} else if (!strcasecmp(v->name, "mfcr2_double_answer")) {
 				mfcr2_cur_double_answer = ast_true(v->value);
+			} else if (!strcasecmp(v->name, "mfcr2_charge_calls")) {
+				mfcr2_cur_charge_calls = 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_forced_release")) {

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=145020&r1=145019&r2=145020
==============================================================================
--- team/moy/mfcr2-1.4/configs/zapata.conf.sample (original)
+++ team/moy/mfcr2-1.4/configs/zapata.conf.sample Sat Sep 27 20:32:53 2008
@@ -781,6 +781,13 @@
 ; signal will be sent to hangup the call indicating that the line should be released immediately
 ; mfcr2_forced_release=no
 
+; Whether or not report to the other end 'accept call with charge'
+; This setting has no effect with most telecos, usually is safe
+; leave the default (yes), but once in a while when interconnecting with
+; old PBXs this may be useful.
+; Concretely this affects the Group B signal used to accept calls
+; mfcr2_charge_calls=yes
+
 ; ---------------- END of options to be used with signalling=mfcr2
 
 ;




More information about the asterisk-commits mailing list