--- chan_zap.c.orig 2004-05-03 11:48:40.000000000 +0300 +++ chan_zap.c 2004-05-03 14:24:55.000000000 +0300 @@ -6374,6 +6374,8 @@ break; case PRI_EVENT_INFO_RECEIVED: chan = e->ring.channel; + ast_log(LOG_WARNING, "INFO received on channel number %d span %d\n", chan, pri->span); /* KOUT_DEBUG */ + if (pri->overlapdial) { ast_log(LOG_WARNING, "INFO is in overlap state\n"); } /* KOUT_DEBUG */ if ((chan < 1) || (chan > pri->channels)) { ast_log(LOG_WARNING, "INFO received on odd channel number %d span %d\n", chan, pri->span); chan = 0; @@ -6385,7 +6387,7 @@ chan = pri_fixup(pri, chan, e->ring.call); if (chan) { /* queue DTMF frame if the PBX for this call was already started (we're forwarding INFORMATION further on */ - if (pri->overlapdial && pri->pvt[chan]->call==e->ring.call && pri->pvt[chan]->owner) { + if (pri->pvt[chan]->call==e->ring.call && pri->pvt[chan]->owner) { /* how to do that */ int digitlen = strlen(e->ring.callednum); char digit; @@ -6402,6 +6404,7 @@ } break; case PRI_EVENT_RING: + ast_log(LOG_WARNING, "Ring requested on channel number %d span %d\n", chan, pri->span); /* KOUT_DEBUG */ chan = e->ring.channel; /* if no channel specified find one empty */ if (chan == -1) @@ -6454,7 +6457,10 @@ strcpy(pri->pvt[chan]->exten, "s"); } /* Make sure extension exists (or in overlap dial mode, can exist) */ - if ((pri->overlapdial && ast_canmatch_extension(NULL, pri->pvt[chan]->context, pri->pvt[chan]->exten, 1, pri->pvt[chan]->callerid)) || + if (pri->overlapdial) { ast_log(LOG_WARNING, "Overlap Dial\n"); } /* KOUT_DEBUG */ + if (ast_canmatch_extension(NULL, pri->pvt[chan]->context, pri->pvt[chan]->exten, 1, pri->pvt[chan]->callerid)) { ast_log(LOG_WARNING, "Can match extension\n"); } /* KOUT_DEBUG */ + if (ast_exists_extension(NULL, pri->pvt[chan]->context, pri->pvt[chan]->exten, 1, pri->pvt[chan]->callerid)) { ast_log(LOG_WARNING, "Extension exists\n"); } /* KOUT_DEBUG */ + if (ast_canmatch_extension(NULL, pri->pvt[chan]->context, pri->pvt[chan]->exten, 1, pri->pvt[chan]->callerid) || ast_exists_extension(NULL, pri->pvt[chan]->context, pri->pvt[chan]->exten, 1, pri->pvt[chan]->callerid)) { /* Setup law */ int law; @@ -6472,7 +6478,8 @@ res = set_actual_gain(pri->pvt[chan]->subs[SUB_REAL].zfd, 0, pri->pvt[chan]->rxgain, pri->pvt[chan]->txgain, law); if (res < 0) ast_log(LOG_WARNING, "Unable to set gains on channel %d\n", pri->pvt[chan]->channel); - if (e->ring.complete || !pri->overlapdial) { + if (e->ring.complete) { + ast_log(LOG_WARNING, "Ring complete!\n"); /* KOUT_DEBUG */ pri_acknowledge(pri->pri, e->ring.call, chan, 1); } else { pri_need_more_info(pri->pri, e->ring.call, chan, 1); @@ -6480,7 +6487,7 @@ /* Get the use_callingpres state */ pri->pvt[chan]->callingpres = e->ring.callingpres; /* Start PBX */ - if (pri->overlapdial && ast_matchmore_extension(NULL, pri->pvt[chan]->context, pri->pvt[chan]->exten, 1, pri->pvt[chan]->callerid)) { + if (ast_matchmore_extension(NULL, pri->pvt[chan]->context, pri->pvt[chan]->exten, 1, pri->pvt[chan]->callerid)) { c = zt_new(pri->pvt[chan], AST_STATE_RING, 0, SUB_REAL, law, e->ring.ctype); if (c && !pthread_create(&threadid, &attr, ss_thread, c)) { if (option_verbose > 2)