aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-05 20:45:03 +0000
committermattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-05 20:45:03 +0000
commit2e86ed61ac7a962c291df0cec39ccfd234ccdc75 (patch)
treeb65af76e03e36e55918bfc4ae6b08babeebc47fb /channels
parentbf697924acee54ba3b07d1562d6d30d2769cd59c (diff)
Make compilation of chan_dahdi so that it does not require the new pri_progress_with_cause function to have libpri support work.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154875 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 4752294e5..b9f44485f 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -5806,7 +5806,11 @@ static int dahdi_indicate(struct ast_channel *chan, int condition, const void *d
&& p->pri && !p->outgoing) {
if (p->pri->pri) {
if (!pri_grab(p, p->pri)) {
+#ifdef HAVE_PRI_PROG_W_CAUSE
pri_progress_with_cause(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1, PRI_CAUSE_USER_BUSY); /* cause = 17 */
+#else
+ pri_progress(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1);
+#endif
pri_rel(p->pri);
}
else
@@ -5903,7 +5907,11 @@ static int dahdi_indicate(struct ast_channel *chan, int condition, const void *d
&& p->pri && !p->outgoing) {
if (p->pri->pri) {
if (!pri_grab(p, p->pri)) {
+#ifdef HAVE_PRI_PROG_W_CAUSE
pri_progress_with_cause(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1, -1); /* no cause at all */
+#else
+ pri_progress(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1);
+#endif
pri_rel(p->pri);
}
else
@@ -5939,7 +5947,11 @@ static int dahdi_indicate(struct ast_channel *chan, int condition, const void *d
&& p->pri && !p->outgoing) {
if (p->pri) {
if (!pri_grab(p, p->pri)) {
+#ifdef HAVE_PRI_PROG_W_CAUSE
pri_progress_with_cause(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1, PRI_CAUSE_SWITCH_CONGESTION); /* cause = 42 */
+#else
+ pri_progress(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1);
+#endif
pri_rel(p->pri);
} else
ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);