mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Bridging: Eliminate the unnecessary make channel compatible with bridge operation.
When a channel enters the bridging system it is first made compatible with the bridge and then the bridge technology makes the channel compatible with the technology. For all but the DAHDI native and softmix bridge technologies the make channel compatible with the bridge step is an effective noop because the other technologies allow all audio formats. For the DAHDI native bridge technology it doesn't matter because it is not an initial bridge technology and chan_dahdi allows only one native format per channel. For the softmix bridge technology, it is a noop at best and harmful at worst because the wrong translation path could be setup if the channel's native formats allow more than one audio format. This is an intermediate patch for a series of patches aimed at improving translation path choices. * Removed code dealing with the unnecessary step of making the channel compatible with the bridge. ASTERISK-24841 Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/4600/ ........ Merged revisions 434424 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -893,7 +893,6 @@ static struct ast_bridge_technology native_bridge = {
|
||||
void dahdi_native_unload(void)
|
||||
{
|
||||
ast_bridge_technology_unregister(&native_bridge);
|
||||
ao2_cleanup(native_bridge.format_capabilities);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -908,18 +907,10 @@ int dahdi_native_load(struct ast_module *mod, const struct ast_channel_tech *tec
|
||||
{
|
||||
dahdi_tech = tech;
|
||||
|
||||
native_bridge.format_capabilities = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT);
|
||||
if (!native_bridge.format_capabilities) {
|
||||
if (__ast_bridge_technology_register(&native_bridge, mod)) {
|
||||
dahdi_native_unload();
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is used to make channels compatible with the bridge
|
||||
* itself not with each other.
|
||||
*/
|
||||
ast_format_cap_append(native_bridge.format_capabilities, ast_format_slin, 0);
|
||||
ast_format_cap_append(native_bridge.format_capabilities, ast_format_ulaw, 0);
|
||||
ast_format_cap_append(native_bridge.format_capabilities, ast_format_alaw, 0);
|
||||
|
||||
return __ast_bridge_technology_register(&native_bridge, mod);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user