summaryrefslogtreecommitdiff
path: root/main/rtp.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2006-09-01 17:54:22 +0000
committerJoshua Colp <jcolp@digium.com>2006-09-01 17:54:22 +0000
commit0be2884d80634e80285ff9ce049fb7ec102f73a1 (patch)
treed3fe4ddb989ebc789fa0dcef20266cb9abde6e03 /main/rtp.c
parent449f311cdac6cb6f9e248a56bd9f1ffd572fb669 (diff)
If we are doing video and we can't reinvite, then resort to generic bridging instead of Packet2Packet since video isn't supported there yet. (reported by PCadach in #asterisk-bugs)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/rtp.c')
-rw-r--r--main/rtp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/rtp.c b/main/rtp.c
index b62ed1480..4656be908 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -3070,7 +3070,13 @@ enum ast_bridge_result ast_rtp_bridge(struct ast_channel *c0, struct ast_channel
audio_p1_res = pr1->get_rtp_info(c1, &p1);
video_p1_res = pr1->get_vrtp_info ? pr1->get_vrtp_info(c1, &vp1) : AST_RTP_GET_FAILED;
- /* Check if bridge is still possible (In SIP canreinvite=no stops this, like NAT) */
+ /* If we are carrying video, and both sides are not reinviting... then fail the native bridge */
+ if (video_p0_res != AST_RTP_GET_FAILED && (audio_p0_res != AST_RTP_TRY_NATIVE || video_p0_res != AST_RTP_TRY_NATIVE))
+ audio_p0_res = AST_RTP_GET_FAILED;
+ if (video_p1_res != AST_RTP_GET_FAILED && (audio_p1_res != AST_RTP_TRY_NATIVE || video_p1_res != AST_RTP_TRY_NATIVE))
+ audio_p1_res = AST_RTP_GET_FAILED;
+
+ /* Check if a bridge is possible (partial/native) */
if (audio_p0_res == AST_RTP_GET_FAILED || audio_p1_res == AST_RTP_GET_FAILED) {
/* Somebody doesn't want to play... */
ast_channel_unlock(c0);