]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixes cases where sip_set_rtp_peer can return too early during media path reset.
authorDavid Vossel <dvossel@digium.com>
Mon, 9 May 2011 16:51:45 +0000 (16:51 +0000)
committerDavid Vossel <dvossel@digium.com>
Mon, 9 May 2011 16:51:45 +0000 (16:51 +0000)
(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

channels/chan_sip.c

index e3dd36ecf1d2b9cb7fc0795ea81d5cb0fa2f19ff..9c6dd7ebb02f8e3a8cc5f29d98d971d0a7a7a75d 100644 (file)
@@ -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) {