aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-01 17:43:46 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-01 17:43:46 +0000
commit403406029ea17c2f057a0e370cb7ce6ad983397e (patch)
tree7ba6b8a24364dad2b0f6d149d30d7c97941bd324
parenta3039a9bd607e515c3cfc68db9d9f9dd6e2dab6a (diff)
Do not pass audio until the remote side has indicated they are providing early media, or if the channel has been answered.
(closes issue #11823) Reported by: SDamm git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@112204 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 9444282d6..45a8b8d96 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -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;
}