aboutsummaryrefslogtreecommitdiffstats
path: root/channels
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 /channels
parentb6de80a0fa1f353ea5bf167414d5cda1495ad3ba (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@14566 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_zap.c22
1 files changed, 13 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: