Only care about a compatible codec for early bridging if we are actually bridging to another channel. If we are not we actually want to bring the audio back to us.

(closes issue #13545)
Reported by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2008-12-18 17:11:42 +00:00
parent 3a0e7aec6a
commit 3a354c3500

View File

@@ -1540,10 +1540,9 @@ int ast_rtp_early_bridge(struct ast_channel *dest, struct ast_channel *src)
else
destcodec = 0;
/* Ensure we have at least one matching codec */
if (!(srccodec & destcodec)) {
if (srcp && !(srccodec & destcodec)) {
ast_channel_unlock(dest);
if (src)
ast_channel_unlock(src);
ast_channel_unlock(src);
return 0;
}
/* Consider empty media as non-existant */