aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-10 02:14:13 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-10 02:14:13 +0000
commit8f132ae7cbf665bfc3e4385a5a9588b83bf06921 (patch)
treedcac99d9298f91a9592ae242d2c37b682cf643b8 /channels
parente0c17686858a76e0dc0b62a00e880e183e6f1625 (diff)
This version applies the patch suggested by stevens in bug 7836 (make inbound channel RINGING state consistent with other channels).
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@48371 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_zap.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index fee8475c8..277a152c1 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -3339,7 +3339,7 @@ static int attempt_transfer(struct zt_pvt *p)
stop if now if appropriate */
if (ast_bridged_channel(p->subs[SUB_THREEWAY].owner))
ast_moh_stop(ast_bridged_channel(p->subs[SUB_THREEWAY].owner));
- if (p->subs[SUB_THREEWAY].owner->_state == AST_STATE_RINGING) {
+ if (p->subs[SUB_REAL].owner->_state == AST_STATE_RINGING) {
ast_indicate(ast_bridged_channel(p->subs[SUB_REAL].owner), AST_CONTROL_RINGING);
}
if (p->subs[SUB_REAL].owner->cdr) {
@@ -3363,7 +3363,7 @@ static int attempt_transfer(struct zt_pvt *p)
ast_mutex_unlock(&p->subs[SUB_THREEWAY].owner->lock);
unalloc_sub(p, SUB_THREEWAY);
} else if (ast_bridged_channel(p->subs[SUB_THREEWAY].owner)) {
- if (p->subs[SUB_REAL].owner->_state == AST_STATE_RINGING) {
+ if (p->subs[SUB_THREEWAY].owner->_state == AST_STATE_RINGING) {
ast_indicate(ast_bridged_channel(p->subs[SUB_THREEWAY].owner), AST_CONTROL_RINGING);
}
ast_moh_stop(ast_bridged_channel(p->subs[SUB_THREEWAY].owner));
@@ -4853,11 +4853,10 @@ static int zt_indicate(struct ast_channel *chan, int condition)
}
#endif
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_RINGTONE);
- if (chan->_state != AST_STATE_UP) {
- if ((chan->_state != AST_STATE_RING) ||
- ((p->sig != SIG_FXSKS) &&
+ if (chan->_state != AST_STATE_UP && chan->_state != AST_STATE_RING) {
+ if ((p->sig != SIG_FXSKS) &&
(p->sig != SIG_FXSLS) &&
- (p->sig != SIG_FXSGS)))
+ (p->sig != SIG_FXSGS))
ast_setstate(chan, AST_STATE_RINGING);
}
break;