Obviously don't send alerting, progress, or proceeding on outbound calls (bug #1700)
authorMark Spencer <markster@digium.com>
Sat, 22 May 2004 19:05:53 +0000 (19:05 +0000)
committerMark Spencer <markster@digium.com>
Sat, 22 May 2004 19:05:53 +0000 (19:05 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3041 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index b5b9665..5c7ab78 100755 (executable)
@@ -1665,7 +1665,6 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout)
                        ast_mutex_unlock(&p->lock);
                        return -1;
                }
-               p->proceeding = 1;
                ast_setstate(ast, AST_STATE_DIALING);
                pri_rel(p->pri);
                break;
@@ -3853,7 +3852,7 @@ static int zt_write(struct ast_channel *ast, struct ast_frame *frame)
        }
        
 #ifdef PRI_EVENT_PROCEEDING
-       if (!p->proceeding && p->sig==SIG_PRI && p->pri) {
+       if (!p->proceeding && p->sig==SIG_PRI && p->pri && !p->outgoing) {
                if (p->pri->pri) {              
                        if (!pri_grab(p, p->pri)) {
 #ifdef PRI_PROGRESS
@@ -3941,7 +3940,7 @@ static int zt_indicate(struct ast_channel *chan, int condition)
                        break;
                case AST_CONTROL_RINGING:
 #ifdef ZAPATA_PRI
-                       if (!p->proceeding && p->sig==SIG_PRI && p->pri) {
+                       if (!p->proceeding && p->sig==SIG_PRI && p->pri && !p->outgoing) {
                                if (p->pri->pri) {              
                                        if (!pri_grab(p, p->pri)) {
                                                pri_acknowledge(p->pri->pri,p->call, p->prioffset, 1);
@@ -3969,7 +3968,7 @@ static int zt_indicate(struct ast_channel *chan, int condition)
                        ast_log(LOG_DEBUG,"Received AST_CONTROL_PROGRESS on %s\n",chan->name);
 #ifdef ZAPATA_PRI
 #ifdef PRI_EVENT_PROCEEDING
-                       if (!p->proceeding && p->sig==SIG_PRI && p->pri) {
+                       if (!p->proceeding && p->sig==SIG_PRI && p->pri && !p->outgoing) {
                                if (p->pri->pri) {              
                                        if (!pri_grab(p, p->pri)) {
 #ifdef PRI_PROGRESS