[Asterisk-cvs] asterisk/channels chan_zap.c,1.214,1.215
markster at lists.digium.com
markster at lists.digium.com
Tue Apr 27 17:44:04 CDT 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv5246/channels
Modified Files:
chan_zap.c
Log Message:
Make sure we are proceeding when we answer
Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.214
retrieving revision 1.215
diff -u -d -r1.214 -r1.215
--- chan_zap.c 26 Apr 2004 12:30:28 -0000 1.214
+++ chan_zap.c 27 Apr 2004 21:50:24 -0000 1.215
@@ -2066,6 +2066,7 @@
case SIG_PRI:
/* Send a pri acknowledge */
if (!pri_grab(p, p->pri)) {
+ p->proceeding = 1;
res = pri_answer(p->pri->pri, p->call, 0, 1);
pri_rel(p->pri);
} else {
@@ -3883,6 +3884,17 @@
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_BUSY);
break;
case AST_CONTROL_RINGING:
+ if (!p->proceeding && p->sig==SIG_PRI && p->pri && p->pri->overlapdial) {
+ if (p->pri->pri) {
+ if (!pri_grab(p, p->pri)) {
+ pri_acknowledge(p->pri->pri,p->call, p->prioffset, 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_RINGTONE);
if (chan->_state != AST_STATE_UP) {
if ((chan->_state != AST_STATE_RING) ||
More information about the svn-commits
mailing list