Bring sanity to inband notification on PRI
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3773 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
07e1c27c85
commit
3a9df15ca0
|
@ -4174,9 +4174,10 @@ static int zt_indicate(struct ast_channel *chan, int condition)
|
||||||
switch(condition) {
|
switch(condition) {
|
||||||
case AST_CONTROL_BUSY:
|
case AST_CONTROL_BUSY:
|
||||||
#ifdef ZAPATA_PRI
|
#ifdef ZAPATA_PRI
|
||||||
if (p->priindication_oob && p->sig == SIG_PRI)
|
if (p->priindication_oob && p->sig == SIG_PRI) {
|
||||||
res = pri_hangup(p->pri->pri, p->call, PRI_CAUSE_USER_BUSY);
|
chan->hangupcause = AST_CAUSE_USER_BUSY;
|
||||||
else
|
chan->_softhangup |= AST_SOFTHANGUP_DEV;
|
||||||
|
} else
|
||||||
#endif
|
#endif
|
||||||
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_BUSY);
|
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_BUSY);
|
||||||
break;
|
break;
|
||||||
|
@ -4242,9 +4243,10 @@ static int zt_indicate(struct ast_channel *chan, int condition)
|
||||||
case AST_CONTROL_CONGESTION:
|
case AST_CONTROL_CONGESTION:
|
||||||
chan->hangupcause = AST_CAUSE_CONGESTION;
|
chan->hangupcause = AST_CAUSE_CONGESTION;
|
||||||
#ifdef ZAPATA_PRI
|
#ifdef ZAPATA_PRI
|
||||||
if (p->priindication_oob && p->sig == SIG_PRI)
|
if (p->priindication_oob && p->sig == SIG_PRI) {
|
||||||
res = pri_hangup(p->pri->pri, p->call, PRI_CAUSE_SWITCH_CONGESTION);
|
chan->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
|
||||||
else
|
chan->_softhangup |= AST_SOFTHANGUP_DEV;
|
||||||
|
} else
|
||||||
#endif
|
#endif
|
||||||
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_CONGESTION);
|
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_CONGESTION);
|
||||||
break;
|
break;
|
||||||
|
|
Reference in New Issue