diff --git a/channels/chan_zap.c b/channels/chan_zap.c index e584a0a672..230465f0e3 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -9031,15 +9031,19 @@ static void *pri_dchannel(void *vpri) ast_log(LOG_WARNING, "Received SETUP_ACKNOWLEDGE on unconfigured channel %d/%d span %d\n", PRI_SPAN(e->setup_ack.channel), PRI_CHANNEL(e->setup_ack.channel), pri->span); } else { - ast_mutex_lock(&pri->pvts[chanpos]->lock); - pri->pvts[chanpos]->setup_ack = 1; - /* Send any queued digits */ - for (x=0;xpvts[chanpos]->dialdest);x++) { - ast_log(LOG_DEBUG, "Sending pending digit '%c'\n", pri->pvts[chanpos]->dialdest[x]); - pri_information(pri->pri, pri->pvts[chanpos]->call, - pri->pvts[chanpos]->dialdest[x]); - } - ast_mutex_unlock(&pri->pvts[chanpos]->lock); + chanpos = pri_fixup_principle(pri, chanpos, e->ring.call); + if (chanpos > -1) { + ast_mutex_lock(&pri->pvts[chanpos]->lock); + pri->pvts[chanpos]->setup_ack = 1; + /* Send any queued digits */ + for (x=0;xpvts[chanpos]->dialdest);x++) { + ast_log(LOG_DEBUG, "Sending pending digit '%c'\n", pri->pvts[chanpos]->dialdest[x]); + pri_information(pri->pri, pri->pvts[chanpos]->call, + pri->pvts[chanpos]->dialdest[x]); + } + ast_mutex_unlock(&pri->pvts[chanpos]->lock); + } else + ast_log(LOG_WARNING, "Unable to move channel %d!\n", e->setup_ack.channel); } break; case PRI_EVENT_NOTIFY: diff --git a/res/res_features.c b/res/res_features.c index bf248b5f44..131d695ee0 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1144,6 +1144,9 @@ static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *call ast_indicate(caller, AST_CONTROL_RINGING); } else if ((f->subclass == AST_CONTROL_BUSY) || (f->subclass == AST_CONTROL_CONGESTION)) { state = f->subclass; + if (option_verbose > 2) + ast_verbose( VERBOSE_PREFIX_3 "%s is busy\n", chan->name); + ast_indicate(caller, AST_CONTROL_BUSY); ast_frfree(f); f = NULL; break;