[Asterisk-cvs] asterisk/channels chan_zap.c,1.171.2.21,1.171.2.22

markster at lists.digium.com markster at lists.digium.com
Wed Apr 28 10:26:21 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv9838/channels

Modified Files:
      Tag: v1-0_stable
	chan_zap.c 
Log Message:
Backport DTMF/proceeding changes from -head


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.171.2.21
retrieving revision 1.171.2.22
diff -u -d -r1.171.2.21 -r1.171.2.22
--- chan_zap.c	17 Apr 2004 23:48:34 -0000	1.171.2.21
+++ chan_zap.c	28 Apr 2004 14:32:54 -0000	1.171.2.22
@@ -2027,6 +2027,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 {
@@ -3833,6 +3834,19 @@
 			res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_BUSY);
 			break;
 		case AST_CONTROL_RINGING:
+#ifdef ZAPATA_PRI
+			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;
+			}
+#endif
 			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