diff options
author | Matthew Fredrickson <creslin@digium.com> | 2008-11-05 20:45:03 +0000 |
---|---|---|
committer | Matthew Fredrickson <creslin@digium.com> | 2008-11-05 20:45:03 +0000 |
commit | 5250201d8bb45a90213ba8127e167e27bc1953c6 (patch) | |
tree | b65af76e03e36e55918bfc4ae6b08babeebc47fb /channels | |
parent | 9838dac7331ee9aef8e5567c095245c26e71919b (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: https://origsvn.digium.com/svn/asterisk/trunk@154875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_dahdi.c | 12 |
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); |