aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-05 19:40:37 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-05 19:40:37 +0000
commit1e2f7adce254d1e82c18f090ce625e232d039f22 (patch)
treed231e1bf1aa7c69c54e40920c3e75ff1c0d02986 /channels
parent76222ab30ea59b8dd39eacf6c4a78c3ad2c41730 (diff)
Alerting *can* be sent after proceeding (bug #3963)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5411 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_zap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 8eb891141..8c5cb8eb9 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -601,6 +601,7 @@ static struct zt_pvt {
int logicalspan;
int alreadyhungup;
int proceeding;
+ int alerting;
int setup_ack; /* whether we received SETUP_ACKNOWLEDGE or not */
int dsp_features;
#endif
@@ -2216,6 +2217,7 @@ static int zt_hangup(struct ast_channel *ast)
p->onhooktime = time(NULL);
#ifdef ZAPATA_PRI
p->proceeding = 0;
+ p->alerting = 0;
p->setup_ack = 0;
#endif
if (p->dsp) {
@@ -2715,7 +2717,6 @@ static int zt_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags,
if (flags & (AST_BRIDGE_DTMF_CHANNEL_0 | AST_BRIDGE_DTMF_CHANNEL_1))
return -2;
-
ast_mutex_lock(&c0->lock);
ast_mutex_lock(&c1->lock);
@@ -4473,7 +4474,7 @@ static int zt_indicate(struct ast_channel *chan, int condition)
break;
case AST_CONTROL_RINGING:
#ifdef ZAPATA_PRI
- if ((p->proceeding < 2) && p->sig==SIG_PRI && p->pri && !p->outgoing) {
+ if ((!p->alerting) && p->sig==SIG_PRI && p->pri && !p->outgoing && (chan->_state != AST_STATE_UP)) {
if (p->pri->pri) {
if (!pri_grab(p, p->pri)) {
pri_acknowledge(p->pri->pri,p->call, PVT_TO_CHANNEL(p), !p->digital);
@@ -4482,7 +4483,7 @@ static int zt_indicate(struct ast_channel *chan, int condition)
else
ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);
}
- p->proceeding=2;
+ p->alerting=1;
}
#endif
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_RINGTONE);