diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-15 14:40:24 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-15 14:40:24 +0000 |
commit | 25c4230c3989a755ce2621eb1eb4856f6f1574c1 (patch) | |
tree | 7f7c9a6e046161a77148a4e89844dab44da2eff5 /main/features.c | |
parent | 094ecdbbb2680438582862f6ac88de56a8923f2e (diff) |
Merged revisions 164201 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r164201 | russell | 2008-12-15 08:31:37 -0600 (Mon, 15 Dec 2008) | 31 lines
Handle a case where a call can be bridged to a channel that is still ringing.
The issue that was reported was about a case where a RINGING channel got
redirected to an extension to pick up a call from parking. Once the parked
call got taken out of parking, it heard silence until the other side answered.
Ideally, the caller that was parked would get a ringing indication. This patch
fixes this case so that the caller receives ringback once it comes out of
parking until the other side answers.
The fixes are:
- Make sure we remember that a channel was an outgoing channel when doing
a masquerade. This prevents an erroneous ast_answer() call on the channel,
which causes a bogus 200 OK to be sent in the case of SIP.
- Add some additional comments to explain related parts of code.
- Update the handling of the ast_channel visible_indication field. Storing
values that are not stateful is pointless. Control frames that are events
or commands should be ignored.
- When a bridge first starts, check to see if the peer channel needs to be
given ringing indication because the calling side is still ringing.
- Rework ast_indicate_data() a bit for the sake of readability.
(closes issue #13747)
Reported by: davidw
Tested by: russell
Review: http://reviewboard.digium.com/r/90/
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164203 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/features.c')
-rw-r--r-- | main/features.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/features.c b/main/features.c index f791340cf..184196b8f 100644 --- a/main/features.c +++ b/main/features.c @@ -2220,8 +2220,16 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast if (chan && peer) { pbx_builtin_setvar_helper(chan, "BRIDGEPEER", peer->name); pbx_builtin_setvar_helper(peer, "BRIDGEPEER", chan->name); - } else if (chan) + } else if (chan) { pbx_builtin_setvar_helper(chan, "BLINDTRANSFER", NULL); + } + + /* This is an interesting case. One example is if a ringing channel gets redirected to + * an extension that picks up a parked call. This will make sure that the call taken + * out of parking gets told that the channel it just got bridged to is still ringing. */ + if (chan->_state == AST_STATE_RINGING && peer->visible_indication != AST_CONTROL_RINGING) { + ast_indicate(peer, AST_CONTROL_RINGING); + } if (monitor_ok) { const char *monitor_exec; |