summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
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);