diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-10 01:39:50 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-10 01:39:50 +0000 |
commit | 5768ab09165f3480de4d420033aa88fb931d34a0 (patch) | |
tree | d789458fd58879c0bd87cb72351827448df53f40 | |
parent | 62c6c0cb542ee14a97986e2af1c715191b16bf9d (diff) |
allow ALERTING even after PROCEEDING (bug #3963)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-0@5614 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | CHANGES | 2 | ||||
-rwxr-xr-x | channels/chan_zap.c | 7 |
2 files changed, 6 insertions, 3 deletions
@@ -8,6 +8,8 @@ -- Asterisk will now also look in the regular context for the fax extension while executing a macro. Previously, for this to work, the fax extension would have to be included in the macro definition. + -- On some systems, ALERTING will be sent after PROCEEDING, so code has been + added to account for this case. -- chan_sip -- We no longer send a "to" tag on "100 Trying" messages, as it is inappropriate to do so. diff --git a/channels/chan_zap.c b/channels/chan_zap.c index d66f11483..fb899d45f 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -558,6 +558,7 @@ static struct zt_pvt { int logicalspan; int alreadyhungup; int proceeding; + int alerting; int setup_ack; /* wheter we received SETUP_ACKNOWLEDGE or not */ #endif #ifdef ZAPATA_R2 @@ -2087,6 +2088,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) { @@ -2577,7 +2579,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); @@ -4231,7 +4232,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), 1); @@ -4240,7 +4241,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); |