diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-24 21:35:08 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-24 21:35:08 +0000 |
commit | 3d74939961544a4ff77dbe4fd42eb6d63e6d3f77 (patch) | |
tree | facf7f20f229b65901d7cc9123c85e191310d37d /channels | |
parent | e3133099230e888a65f4700a6b8569211db025ec (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@114632 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d6d5411c3..e3fab9232 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3804,6 +3804,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; } if (option_debug > 2) |