aboutsummaryrefslogtreecommitdiffstats
path: root/main/rtp.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-09 19:06:14 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-09 19:06:14 +0000
commit5887d5222d7837dd980d38d26defe6b274a22e62 (patch)
tree219c934369c668d611ae1316101f77846d96b884 /main/rtp.c
parentda16f32ce784f7ad469714e646649cb6beb8ad4b (diff)
Take video into account when early bridging RTP.
(closes issue #13535) Reported by: davidw git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@162188 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/rtp.c')
-rw-r--r--main/rtp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/rtp.c b/main/rtp.c
index fa9da999a..2cdfeedc1 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -1524,18 +1524,18 @@ int ast_rtp_early_bridge(struct ast_channel *dest, struct ast_channel *src)
}
/* Check if bridge is still possible (In SIP canreinvite=no stops this, like NAT) */
- if (audio_dest_res != AST_RTP_TRY_NATIVE) {
+ if (audio_dest_res != AST_RTP_TRY_NATIVE || (video_dest_res != AST_RTP_GET_FAILED && video_dest_res != AST_RTP_TRY_NATIVE)) {
/* Somebody doesn't want to play... */
ast_channel_unlock(dest);
if (src)
ast_channel_unlock(src);
return 0;
}
- if (audio_src_res == AST_RTP_TRY_NATIVE && srcpr->get_codec)
+ if (audio_src_res == AST_RTP_TRY_NATIVE && (video_src_res == AST_RTP_GET_FAILED || video_src_res == AST_RTP_TRY_NATIVE) && srcpr->get_codec)
srccodec = srcpr->get_codec(src);
else
srccodec = 0;
- if (audio_dest_res == AST_RTP_TRY_NATIVE && destpr->get_codec)
+ if (audio_dest_res == AST_RTP_TRY_NATIVE && (video_dest_res == AST_RTP_GET_FAILED || video_dest_res == AST_RTP_TRY_NATIVE) && destpr->get_codec)
destcodec = destpr->get_codec(dest);
else
destcodec = 0;
@@ -1613,7 +1613,7 @@ int ast_rtp_make_compatible(struct ast_channel *dest, struct ast_channel *src, i
destcodec = 0;
/* Check if bridge is still possible (In SIP canreinvite=no stops this, like NAT) */
- if (audio_dest_res != AST_RTP_TRY_NATIVE || audio_src_res != AST_RTP_TRY_NATIVE || !(srccodec & destcodec)) {
+ if (audio_dest_res != AST_RTP_TRY_NATIVE || (video_dest_res != AST_RTP_GET_FAILED && video_dest_res != AST_RTP_TRY_NATIVE) || audio_src_res != AST_RTP_TRY_NATIVE || (video_src_res != AST_RTP_GET_FAILED && video_src_res != AST_RTP_TRY_NATIVE) || !(srccodec & destcodec)) {
/* Somebody doesn't want to play... */
ast_channel_unlock(dest);
ast_channel_unlock(src);