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

Modified Files:
      Tag: v1-0
        chan_zap.c 
Log Message:
allow ALERTING even after PROCEEDING (bug #3963)


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.344.2.15
retrieving revision 1.344.2.16
diff -u -d -r1.344.2.15 -r1.344.2.16
--- chan_zap.c  15 Apr 2005 07:15:39 -0000      1.344.2.15
+++ chan_zap.c  10 May 2005 01:39:50 -0000      1.344.2.16
@@ -558,6 +558,7 @@
        int logicalspan;
        int alreadyhungup;
        int proceeding;
+       int alerting;
        int setup_ack;          /* wheter we received SETUP_ACKNOWLEDGE or not 
*/
 #endif 
 #ifdef ZAPATA_R2
@@ -2087,6 +2088,7 @@
                p->onhooktime = time(NULL);
 #ifdef ZAPATA_PRI
                p->proceeding = 0;
+               p->alerting = 0;
                p->setup_ack = 0;
 #endif         
                if (p->dsp) {
@@ -2577,7 +2579,6 @@
        if (flags & (AST_BRIDGE_DTMF_CHANNEL_0 | AST_BRIDGE_DTMF_CHANNEL_1))
                return -2;
                
-               
        ast_mutex_lock(&c0->lock);
        ast_mutex_lock(&c1->lock);
 
@@ -4231,7 +4232,7 @@
                        break;
                case AST_CONTROL_RINGING:
 #ifdef ZAPATA_PRI
-                       if ((p->proceeding < 2) && p->sig==SIG_PRI && p->pri && 
!p->outgoing) {
+                       if ((!p->alerting) && p->sig==SIG_PRI && p->pri && 
!p->outgoing && (chan->_state != AST_STATE_UP)) {
                                if (p->pri->pri) {              
                                        if (!pri_grab(p, p->pri)) {
                                                
pri_acknowledge(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1);
@@ -4240,7 +4241,7 @@
                                        else
                                                ast_log(LOG_WARNING, "Unable to 
grab PRI on span %d\n", p->span);
                                }
-                               p->proceeding=2;
+                               p->alerting=1;
                        }
 #endif
                        res = tone_zone_play_tone(p->subs[index].zfd, 
ZT_TONE_RINGTONE);

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to