[asterisk-commits] moy: branch moy/mfcr2-1.4 r143080 - in /team/moy/mfcr2-1.4: channels/ configs/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Sep 14 14:14:24 CDT 2008
Author: moy
Date: Sun Sep 14 14:14:24 2008
New Revision: 143080
URL: http://svn.digium.com/view/asterisk?view=rev&rev=143080
Log:
added mfcr2_forced_release option
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=143080&r1=143079&r2=143080
==============================================================================
--- team/moy/mfcr2-1.4/channels/chan_zap.c (original)
+++ team/moy/mfcr2-1.4/channels/chan_zap.c Sun Sep 14 14:14:24 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_forced_release = 0;
static int mfcr2_cur_double_answer = 0;
static int mfcr2_cur_immediate_accept = 0;
static char mfcr2_cur_logdir[OR2_MAX_LOGDIR];
@@ -619,6 +620,7 @@
openr2_calling_party_category_t mfcr2_recvd_category;
openr2_calling_party_category_t mfcr2_category;
int mfcr2_allow_collect_calls;
+ int mfcr2_forced_release;
#endif
int polarity;
int dsp_features;
@@ -896,6 +898,7 @@
mfcr2_cur_context_index = 0;
mfcr2_cur_call_files = 0;
mfcr2_cur_allow_collect_calls = 0;
+ mfcr2_cur_forced_release = 0;
mfcr2_cur_double_answer = 0;
mfcr2_cur_immediate_accept = 0;
mfcr2_cur_loglevel = OR2_LOG_ERROR | OR2_LOG_WARNING;
@@ -3003,7 +3006,11 @@
#ifdef HAVE_OPENR2
if (p->mfcr2) {
ast_log(LOG_DEBUG, "disconnecting MFC/R2 call on chan %d\n", p->channel);
- openr2_chan_disconnect_call(p->r2chan, OR2_CAUSE_NORMAL_CLEARING);
+ if (openr2_chan_get_direction(p->r2chan) == OR2_DIR_BACKWARD && p->mfcr2_forced_release) {
+ openr2_chan_disconnect_call(p->r2chan, OR2_CAUSE_FORCED_RELEASE);
+ } else {
+ openr2_chan_disconnect_call(p->r2chan, OR2_CAUSE_NORMAL_CLEARING);
+ }
zt_r2_update_monitor_count(p->mfcr2, 1);
}
#endif
@@ -7903,6 +7910,7 @@
tmp->mfcr2 = zap_r2;
tmp->mfcr2call = 0;
tmp->mfcr2_allow_collect_calls = mfcr2_cur_allow_collect_calls;
+ tmp->mfcr2_forced_release = mfcr2_cur_forced_release;
zap_r2->monitored_count++;
}
}
@@ -11037,6 +11045,8 @@
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 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));
ast_cli(fd, "MFC/R2 R2 Metering Pulse Timeout: %dms\n", openr2_context_get_metering_pulse_timeout(r2context));
ast_cli(fd, "MFC/R2 Rx State: %s\n", openr2_proto_get_rx_state_string(tmp->r2chan));
@@ -12156,6 +12166,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_forced_release")) {
+ mfcr2_cur_forced_release= 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")) {
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=143080&r1=143079&r2=143080
==============================================================================
--- team/moy/mfcr2-1.4/configs/zapata.conf.sample (original)
+++ team/moy/mfcr2-1.4/configs/zapata.conf.sample Sun Sep 14 14:14:24 2008
@@ -773,6 +773,14 @@
; for more info
; mfcr2_advanced_protocol_file=/path/to/r2proto.conf
+; Brazil use a special signal to force the release of the line (hangup) from the
+; backward perspective. When mfcr2_forced_release=no, the normal clear back signal
+; will be sent on hangup, which is OK for all mfcr2 variants I know of, except for
+; Brazilian variant, where the central will leave the line up for several seconds (30, 60)
+; which sometimes is not what people really want. When mfcr2_forced_release=yes, a different
+; signal will be sent to hangup the call indicating that the line should be released immediately
+; mfcr2_forced_release=no
+
; ---------------- END of options to be used with signalling=mfcr2
;
More information about the asterisk-commits
mailing list