Asterisk version 18.13.0
Question:
Is there a way to prevent sample rate downgrading when bridging multiple channels that are muted.
Summary:
I’m trying to setup a softmix bridge (or holding bridge) using the ARI where there’s only one announcer and multiple participants (listeners). The problem I’m having is that the audio is downgraded to 8kHz when muting the channels (even when using the same codec which supports higher sampling rates).
Scenarios
The following assumes there are more than two endpoints, all endpoints are using the same codec (i.e. Opus) and have been created/originated and bridged using the ARI. Opus should be mixed using SLIN48.
Scenario 1 (works but not for my application):
If I originate a channel to each endpoint and add them to a softmix bridge, they will work as expected. However, I only want audio from the announcer and this will mix the audio from all endpoints.
Scenario 2 (downgraded):
If I originate a channel to each endpoint but mute them when adding them to the softmix bridge, the participant endpoints will have their audio down-sampled to 8kHz before being re-sampled back to 48kHz.
Scenario 3 (downgraded):
If I originate a channel to each endpoint, add them to the softmix bridge and then mute them within 2 seconds of being added to the bridge, the audio is down-sampled to 8kHz before being re-sampled back to 48kHz.
Scenario 4 (works but not for my application):
If I originate a channel to each endpoint, add them to the softmix bridge and then mute them 3 or more seconds after they were added to the bridge, the audio is the desired 48kHz sampling rate with no degradation. However, I will get audio from the endpoints mixed together during the beginning of the call when the channels are added to the bridge.
Scenario 5 (downgraded):
If I originate a channel to each endpoint, add them to a holding bridge and specify one as the announcer, the audio is down-sampled to 8kHz before being re-sampled back to 48kHz.
Note: All scenarios above work if only two endpoints are used
I have looked at the confbridge options but they seem to apply specifically to conference bridges which I don’t believe apply to bridges created on-the-fly via the ARI.