]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't send INFORMATION's with the number when we shouldn't
authorMartin Pycko <martinp@digium.com>
Fri, 18 Apr 2003 15:55:50 +0000 (15:55 +0000)
committerMartin Pycko <martinp@digium.com>
Fri, 18 Apr 2003 15:55:50 +0000 (15:55 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@869 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 4d4554514cd638cbaa134df9d0a9c0c16c91927a..1e429af30ea27aaf6cf246532771651e88074f57 100755 (executable)
@@ -446,6 +446,9 @@ static struct zt_pvt {
        int resetting;
        int prioffset;
        int alreadyhungup;
+#ifdef PRI_EVENT_PROCEEDING
+       int proceeding;
+#endif
 #endif 
 #ifdef ZAPATA_R2
        int r2prot;
@@ -656,7 +659,11 @@ static int zt_digit(struct ast_channel *ast, char digit)
        index = zt_get_index(ast, p, 0);
        if (index == SUB_REAL) {
 #ifdef ZAPATA_PRI
+#ifdef PRI_EVENT_PROCEEDING
+               if (p->sig == SIG_PRI && ast->_state == AST_STATE_DIALING && !p->proceeding) {
+#else
                if (p->sig == SIG_PRI && ast->_state == AST_STATE_DIALING) {
+#endif
                        pri_information(p->pri->pri,p->call,digit);
                } else {
 #else
@@ -1556,6 +1563,7 @@ static int zt_hangup(struct ast_channel *ast)
                p->faxhandled = 0;
                p->pulsedial = 0;
                p->onhooktime = time(NULL);
+               p->proceeding = 0;
                if (p->dsp) {
                        ast_dsp_free(p->dsp);
                        p->dsp = NULL;
@@ -5721,6 +5729,14 @@ static void *pri_dchannel(void *vpri)
                                        }
                                }
                                break;
+#ifdef PRI_EVENT_PROCEEDING
+                       case PRI_EVENT_PROCEEDING:
+                               chan = e->proceeding.channel;
+                                if ((chan >= 1) && (chan <= pri->channels))
+                                               if (pri->pvt[chan])
+                                                       pri->pvt[chan]->proceeding=1;
+                               break;
+#endif 
                        default:
                                ast_log(LOG_DEBUG, "Event: %d\n", e->e);
                        }