aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_zap.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-09-13 22:14:34 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-09-13 22:14:34 +0000
commit3a9df15ca031ae95e53bdd2e3117e7df50c03c25 (patch)
treefa86626e892db2dfa6df2fd117e51bb16666e4f1 /channels/chan_zap.c
parent07e1c27c855b372c8ed7fe2a0924cbf613c23008 (diff)
Bring sanity to inband notification on PRI
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3773 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rwxr-xr-xchannels/chan_zap.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 6ef99213f..52cb22fd8 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -4174,9 +4174,10 @@ static int zt_indicate(struct ast_channel *chan, int condition)
switch(condition) {
case AST_CONTROL_BUSY:
#ifdef ZAPATA_PRI
- if (p->priindication_oob && p->sig == SIG_PRI)
- res = pri_hangup(p->pri->pri, p->call, PRI_CAUSE_USER_BUSY);
- else
+ if (p->priindication_oob && p->sig == SIG_PRI) {
+ chan->hangupcause = AST_CAUSE_USER_BUSY;
+ chan->_softhangup |= AST_SOFTHANGUP_DEV;
+ } else
#endif
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_BUSY);
break;
@@ -4242,9 +4243,10 @@ static int zt_indicate(struct ast_channel *chan, int condition)
case AST_CONTROL_CONGESTION:
chan->hangupcause = AST_CAUSE_CONGESTION;
#ifdef ZAPATA_PRI
- if (p->priindication_oob && p->sig == SIG_PRI)
- res = pri_hangup(p->pri->pri, p->call, PRI_CAUSE_SWITCH_CONGESTION);
- else
+ if (p->priindication_oob && p->sig == SIG_PRI) {
+ chan->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
+ chan->_softhangup |= AST_SOFTHANGUP_DEV;
+ } else
#endif
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_CONGESTION);
break;