]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Do not pass audio until the remote side has indicated they are providing early media...
authorJoshua Colp <jcolp@digium.com>
Tue, 1 Apr 2008 17:43:46 +0000 (17:43 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 1 Apr 2008 17:43:46 +0000 (17:43 +0000)
(closes issue #11823)
Reported by: SDamm

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@112204 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 9444282d658cbcaf5d3d938cdc2703fc71ec3e70..45a8b8d964f9005371355b67db978edc583c4c59 100644 (file)
@@ -4378,6 +4378,11 @@ static struct ast_frame *sip_read(struct ast_channel *ast)
                }
        }
 
+       /* Only allow audio through if they sent progress with SDP, or if the channel is actually answered */
+       if (p->invitestate != INV_EARLY_MEDIA && ast->_state != AST_STATE_UP) {
+               fr = &ast_null_frame;
+       }
+
        ast_mutex_unlock(&p->lock);
        return fr;
 }