summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMoises Silva <moises.silva@gmail.com>2009-06-16 02:24:30 +0000
committerMoises Silva <moises.silva@gmail.com>2009-06-16 02:24:30 +0000
commit2c8cd1db9276340df36f23cee281a22e1566895e (patch)
tree79875b99579868e195a187e28ffea37cdf8129ac /channels
parent4af5dd813c040d30bcb0666a09300997a5d7f46d (diff)
keep backwards compatible chan_dahdi with older openr2 versions by not using the new skip category feature unless supported
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index ee62405a2..3567aa9e9 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -583,7 +583,9 @@ struct dahdi_mfcr2_conf {
int max_ani;
int max_dnis;
int get_ani_first:1;
+#if defined(OR2_LIB_INTERFACE) && OR2_LIB_INTERFACE > 1
int skip_category_request:1;
+#endif
int call_files:1;
int allow_collect_calls:1;
int charge_calls:1;
@@ -1419,7 +1421,9 @@ static struct dahdi_chan_conf dahdi_chan_conf_default(void)
.max_ani = 10,
.max_dnis = 4,
.get_ani_first = -1,
+#if defined(OR2_LIB_INTERFACE) && OR2_LIB_INTERFACE > 1
.skip_category_request = -1,
+#endif
.call_files = 0,
.allow_collect_calls = 0,
.charge_calls = 1,
@@ -11082,7 +11086,9 @@ static int dahdi_r2_set_context(struct dahdi_mfcr2 *r2_link, const struct dahdi_
}
openr2_context_set_log_level(r2_link->protocol_context, conf->mfcr2.loglevel);
openr2_context_set_ani_first(r2_link->protocol_context, conf->mfcr2.get_ani_first);
+#if defined(OR2_LIB_INTERFACE) && OR2_LIB_INTERFACE > 1
openr2_context_set_skip_category_request(r2_link->protocol_context, conf->mfcr2.skip_category_request);
+#endif
openr2_context_set_mf_threshold(r2_link->protocol_context, threshold);
openr2_context_set_mf_back_timeout(r2_link->protocol_context, conf->mfcr2.mfback_timeout);
openr2_context_set_metering_pulse_timeout(r2_link->protocol_context, conf->mfcr2.metering_pulse_timeout);
@@ -16197,7 +16203,9 @@ static char *dahdi_show_channel(struct ast_cli_entry *e, int cmd, struct ast_cli
ast_cli(a->fd, "MFC/R2 Max ANI: %d\n", openr2_context_get_max_ani(r2context));
ast_cli(a->fd, "MFC/R2 Max DNIS: %d\n", openr2_context_get_max_dnis(r2context));
ast_cli(a->fd, "MFC/R2 Get ANI First: %s\n", openr2_context_get_ani_first(r2context) ? "Yes" : "No");
+#if defined(OR2_LIB_INTERFACE) && OR2_LIB_INTERFACE > 1
ast_cli(a->fd, "MFC/R2 Skip Category Request: %s\n", openr2_context_get_skip_category_request(r2context) ? "Yes" : "No");
+#endif
ast_cli(a->fd, "MFC/R2 Immediate Accept: %s\n", openr2_context_get_immediate_accept(r2context) ? "Yes" : "No");
ast_cli(a->fd, "MFC/R2 Accept on Offer: %s\n", tmp->mfcr2_accept_on_offer ? "Yes" : "No");
ast_cli(a->fd, "MFC/R2 Charge Calls: %s\n", tmp->mfcr2_charge_calls ? "Yes" : "No");