aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-23 22:07:47 +0000
committerroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-23 22:07:47 +0000
commit0bd344c1528ff52ec7e1e18e9504f1bc3bba0474 (patch)
tree79fe82050eee14c89d094c21002bd70a12f4ccad
parentb6de80a0fa1f353ea5bf167414d5cda1495ad3ba (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@14566 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_zap.c22
-rw-r--r--res/res_features.c3
2 files changed, 16 insertions, 9 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index e584a0a67..230465f0e 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;x<strlen(pri->pvts[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;x<strlen(pri->pvts[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 bf248b5f4..131d695ee 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;