[Asterisk-cvs] asterisk/channels chan_zap.c,1.376,1.377
markster at lists.digium.com
markster at lists.digium.com
Sat Nov 13 18:55:57 CST 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv18571/channels
Modified Files:
chan_zap.c
Log Message:
Send progress before in-band indications for BUSY/CONGESTION
Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.376
retrieving revision 1.377
diff -u -d -r1.376 -r1.377
--- chan_zap.c 7 Nov 2004 18:59:20 -0000 1.376
+++ chan_zap.c 13 Nov 2004 23:56:50 -0000 1.377
@@ -4262,6 +4262,17 @@
chan->hangupcause = AST_CAUSE_USER_BUSY;
chan->_softhangup |= AST_SOFTHANGUP_DEV;
res = 0;
+ } else if (!p->proceeding && p->sig==SIG_PRI && p->pri && !p->outgoing) {
+ if (p->pri->pri) {
+ if (!pri_grab(p, p->pri)) {
+ pri_progress(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1);
+ pri_rel(p->pri);
+ }
+ else
+ ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);
+ }
+ p->proceeding=1;
+ res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_BUSY);
} else
#endif
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_BUSY);
@@ -4332,6 +4343,17 @@
chan->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
chan->_softhangup |= AST_SOFTHANGUP_DEV;
res = 0;
+ } else if (!p->proceeding && p->sig==SIG_PRI && p->pri && !p->outgoing) {
+ if (p->pri->pri) {
+ if (!pri_grab(p, p->pri)) {
+ pri_progress(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1);
+ pri_rel(p->pri);
+ }
+ else
+ ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);
+ }
+ p->proceeding=1;
+ res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_CONGESTION);
} else
#endif
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_CONGESTION);
More information about the svn-commits
mailing list