summaryrefslogtreecommitdiff
path: root/channels/sig_pri.c
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2009-07-03 15:44:01 +0000
committerSean Bright <sean@malleable.com>2009-07-03 15:44:01 +0000
commitee0cd5a32c46bdf96f7dddbc90b3677331224429 (patch)
tree2afa7a0121d1e1df081dd367171b5a5b1d08f396 /channels/sig_pri.c
parentc381cf82e72779142b4863e3d49e37fb4612fe7c (diff)
Add a configure check for Reverse Charging Indication support in LibPRI.
Also go back and wrap all of the places that use the specific reverse charge APIs with preprocessor conditionals. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sig_pri.c')
-rw-r--r--channels/sig_pri.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/sig_pri.c b/channels/sig_pri.c
index aac40616e..5111f9181 100644
--- a/channels/sig_pri.c
+++ b/channels/sig_pri.c
@@ -1163,7 +1163,9 @@ static void *pri_dchannel(void *vpri)
pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
if (e->ring.redirectingreason >= 0)
pbx_builtin_setvar_helper(c, "PRIREDIRECTREASON", redirectingreason2str(e->ring.redirectingreason));
+#if defined(HAVE_PRI_REVERSE_CHARGE)
pri->pvts[chanpos]->reverse_charging_indication = e->ring.reversecharge;
+#endif
sig_pri_lock_private(pri->pvts[chanpos]);
ast_mutex_lock(&pri->lock);
@@ -1209,7 +1211,9 @@ static void *pri_dchannel(void *vpri)
if (e->ring.redirectingreason >= 0)
pbx_builtin_setvar_helper(c, "PRIREDIRECTREASON", redirectingreason2str(e->ring.redirectingreason));
+#if defined(HAVE_PRI_REVERSE_CHARGE)
pri->pvts[chanpos]->reverse_charging_indication = e->ring.reversecharge;
+#endif
snprintf(calledtonstr, sizeof(calledtonstr)-1, "%d", e->ring.calledplan);
pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
@@ -1890,7 +1894,7 @@ int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, char *rdest, i
case 'r':
pridialplan = PRI_NPI_RESERVED | (pridialplan & 0xf0);
break;
-#if defined(PRI_REVERSECHARGE_REQUESTED)
+#if defined(HAVE_PRI_REVERSE_CHARGE)
case 'C':
pri_sr_set_reversecharge(sr, PRI_REVERSECHARGE_REQUESTED);
break;