From: David Vossel Date: Mon, 9 May 2011 16:51:45 +0000 (+0000) Subject: Fixes cases where sip_set_rtp_peer can return too early during media path reset. X-Git-Tag: 1.6.2.19-rc1~3^2~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d693f81ab69c0015bd5aac61637acb4f5c4cb21d;p=thirdparty%2Fasterisk.git Fixes cases where sip_set_rtp_peer can return too early during media path reset. (closes issue #19225) Reported by: one47 Patches: sip_set_rtp_peer.patch uploaded by one47 (license 23) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@318230 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index e3dd36ecf1..9c6dd7ebb0 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -26052,8 +26052,11 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struc return -1; /* Disable early RTP bridge */ - if (!ast_bridged_channel(chan) && !sip_cfg.directrtpsetup) /* We are in early state */ - return 0; + if ((rtp || vrtp || trtp) && + !ast_bridged_channel(chan) && + !sip_cfg.directrtpsetup) { + return 0; + } sip_pvt_lock(p); if (p->alreadygone) {