diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-15 16:26:09 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-15 16:26:09 +0000 |
commit | c6ec2a9abfc186a55a32124054e1d86d61dd1ad1 (patch) | |
tree | 1f085a60279381759ca80142df398c742d30b60e /main/features.c | |
parent | 12065ae5ff72479e0b3a23bc47b04f06311dfb8c (diff) |
Merged revisions 164203 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r164203 | russell | 2008-12-15 08:40:24 -0600 (Mon, 15 Dec 2008) | 39 lines
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/branches/1.6.0@164279 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 a0e557e1f..5dbfc9bd8 100644 --- a/main/features.c +++ b/main/features.c @@ -1937,8 +1937,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; |