So far, the selected codec needs to be a member of the list. Instead,
make this API safe for any instance, member or not, by looking it up.
Remove the lookup from the only caller.
A subsequent patch adds another caller that would have needed a manual
lookup before calling sdp_audio_codecs_select().
Change-Id: Ic1b5ba46c6f4c58e518b080bcb9b5741cb70ccc3
Instead of generating the default codecs list for a RAN for each call,
place a pre-composed list in ran_infra.c.
(1) The main aim is to allow configuring this list -- subsequent commit
Ib5655214ce48c66d095e8f1b7b7106ac3ee43ec0 will add the VTY commands to
modify the predefined lists.
(2) As a free side effect, this also allows configuring the order of
preference for specific codecs.
(3) It may also save us some iterations of the codec_map[], which may
grow a lot more variants; for example, we could add one entry for each
possible AMR mode-set...
Change-Id: If46231a53f7512dbd81790fd30462d65fe059aa3
In ran_msg_iu.c for 3G:
Compose a list of RAB subflows from the AMR codecs present in the codec
list passed in from msc_a. These will hopefully result in the correct
RFCIs configured in the IuUP Initialization that the MGW receives.
Depends: osmo-iuh I61e0e9e75e3239662846fd797532acdefa9f73dc
Change-Id: Ia9f4ad7f3646556aadc632bc5ffa477941626c5f
In ran_msg_a.c for 2G:
Use sdp_audio_codecs_to_speech_codec_list() to get the correct AMR cfg
bits in the outgoing Speech Codec List (MSC Preferred).
The static function to convert from Speech Versions is no longer used,
move its special-case for CSD to the caller location.
With this patch, a BSC now has a chance to select AMR rates matching the
other call leg, dynamically.
Change-Id: Ia9f4ad7f3646556aadc632bc5ffa477941626c5f
These changes will allow dynamically negotiating AMR rates between 2G
and 3G, and between full-rate and half-rate, spanning from 2G and 3G RAN
all the way across to SDP over MNCC / SIP and back.
To ran_msg_assignment, add a full codecs list (sdp_audio_codecs).
So far, there was only the gsm0808_channel_type with a list of
permitted-speech entries, which is not a complete representation.
This patch only adds the list, the two users of this are added in
separate patches:
[2/3] In ran_msg_a.c for 2G:
Before this, we pass a gsm0808_channel_type to ran_msg_assignment, and
from *that* we derive a gsm0808_speech_codec_list -- this loses the AMR
rate config bits. So far, we always transmitted the default cfg bits
defined in gsm0808_speech_codec_defaults, enabling all supported S0-S15
AMR rate combinations. Instead, we'll directly derive the available AMR
rates from the list of SDP codecs resulting from the codecs filter.
[3/3] In ran_msg_iu.c for 3G:
Before this, we compose a fixed set of RAB SDU subflows, i.e. for
exactly and only AMR 12k2. Now, we'll ask for RAB subflows corresponding
to the AMR codec's mode-set fmtp present in the codec list.
Change-Id: Ia9f4ad7f3646556aadc632bc5ffa477941626c5f
An upcoming test needs to model assignment of a specific AMR variant.
Use sdp_codec_from_str(), which adds the ability to add specific AMR
modes to Assignment Complete messages.
Change-Id: I37680b9bef5ff989b1fcb0816eedae09282d9351