summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2008-04-24 21:35:39 +0000
committerMark Michelson <mmichelson@digium.com>2008-04-24 21:35:39 +0000
commitcb80defb685a1eb8c9105e48cebab18837e2f600 (patch)
treec90887733a0c88f80360b82531e25581606a522d /channels
parent14fc93e72106fa26aec76c53fc9bb26b617e6770 (diff)
Merged revisions 114632 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114632 | mmichelson | 2008-04-24 16:35:08 -0500 (Thu, 24 Apr 2008) | 11 lines Re-invite RTP during a masquerade so that, for instance, an AMI redirect of two channels which are natively bridged will preserve audio on both channels. This prevents a problem with Asterisk not re-inviting due to one of the channels having being a zombie. (closes issue #12513) Reported by: mneuhauser Patches: asterisk-1.4-114602_restore-RTP-on-fixup.patch uploaded by mneuhauser (license 425) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index dc43decc9..fb1f1967d 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5266,6 +5266,13 @@ static int sip_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
ast_log(LOG_WARNING, "old channel wasn't %p but was %p\n", oldchan, p->owner);
else {
p->owner = newchan;
+ /* Re-invite RTP back to Asterisk. Needed if channel is masqueraded out of a native
+ RTP bridge (i.e., RTP not going through Asterisk): RTP bridge code might not be
+ able to do this if the masquerade happens before the bridge breaks (e.g., AMI
+ redirect of both channels). Note that a channel can not be masqueraded *into*
+ a native bridge. So there is no danger that this breaks a native bridge that
+ should stay up. */
+ sip_set_rtp_peer(newchan, NULL, NULL, 0, 0);
ret = 0;
}
ast_debug(3, "SIP Fixup: New owner for dialogue %s: %s (Old parent: %s)\n", p->callid, p->owner->name, oldchan->name);