[asterisk-commits] moy: branch moy/mfcr2-1.2 r143081 - in /team/moy/mfcr2-1.2: channels/ configs/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Sep 14 14:34:12 CDT 2008
Author: moy
Date: Sun Sep 14 14:34:12 2008
New Revision: 143081
URL: http://svn.digium.com/view/asterisk?view=rev&rev=143081
Log:
added mfcr2_forced_release option
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=143081&r1=143080&r2=143081
==============================================================================
--- team/moy/mfcr2-1.2/channels/chan_zap.c (original)
+++ team/moy/mfcr2-1.2/channels/chan_zap.c Sun Sep 14 14:34:12 2008
@@ -381,6 +381,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];
@@ -400,6 +401,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;
@@ -804,6 +806,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
struct zt_distRings drings;
@@ -3053,7 +3056,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
@@ -7526,6 +7533,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++;
}
}
@@ -10511,6 +10519,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));
@@ -11479,6 +11489,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.2/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2-1.2/configs/zapata.conf.sample?view=diff&rev=143081&r1=143080&r2=143081
==============================================================================
--- team/moy/mfcr2-1.2/configs/zapata.conf.sample (original)
+++ team/moy/mfcr2-1.2/configs/zapata.conf.sample Sun Sep 14 14:34:12 2008
@@ -686,6 +686,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