code zone experiment: don't offer formats in the outbound INVITE that aren't either passthrough or translatable

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@46153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2006-10-25 00:10:54 +00:00
parent c5f096e220
commit 05eb71c699
2 changed files with 13 additions and 33 deletions

View File

@@ -818,6 +818,11 @@ unsigned int ast_translate_available_formats(unsigned int dest, unsigned int src
unsigned int src_audio = powerof(src & AST_FORMAT_AUDIO_MASK);
unsigned int src_video = powerof(src & AST_FORMAT_VIDEO_MASK);
/* if we don't have a source format, we just have to try all
possible destination formats */
if (!src)
return dest;
AST_LIST_LOCK(&translators);
for (x = 1; x < AST_FORMAT_MAX_AUDIO; x <<= 1) {