Commit Graph

7358 Commits

Author SHA1 Message Date
Neels Hofmeyr 9e63d47df4 sdp
Change-Id: Iad35a810669b9824c393af149b7680d42f3df793
2024-02-25 03:49:31 +01:00
Neels Hofmeyr f2fca2a2b1 ws
Change-Id: Ib872882dd06f4240990abacbe22f32aadc7018ac
2024-02-25 03:49:31 +01:00
Neels Hofmeyr 5c905ff873 sdp
Change-Id: Ie425fb586b25fabdc85a42261168f22fae9c3d90
2024-02-25 03:49:31 +01:00
Neels Hofmeyr 183344cd84 msc_vlr_test_call: sane codecs from ran_infra defaults
Change-Id: I83407a1e487237b8805726f9918a3f9186a387cf
2024-02-25 03:49:28 +01:00
Neels Hofmeyr a7918c2241 ran_infra codecs init
Change-Id: I7f7d50eecbd1dcde3a31eb34789e385815bb5a72
2024-02-25 03:48:51 +01:00
Neels Hofmeyr 521f0664a2 all AMR rates in codec_mapping
Change-Id: I1b3fde18a903a8072fecc49ee8ba60307bb2a94e
2024-02-25 03:47:56 +01:00
Neels Hofmeyr bc1dc3bfb8 update_exp
Change-Id: I5e411106ee9206dce6862fec7bc64aaf651e4c2b
2024-02-25 03:43:13 +01:00
Neels Hofmeyr 992baaf205 codecs_match
Change-Id: I5975519e04472b5fd6bf447950c0f8a4147c8d00
2024-02-25 03:43:13 +01:00
Neels Hofmeyr 9d7aa7fcbc update_exp
Change-Id: Ie3389c1a8e0e9718d1564f63335eadf0f61c127e
2024-02-25 03:43:13 +01:00
Neels Hofmeyr f5bd47848f dbg log
Change-Id: Id63ec713e2a8156858f37a2d04159265f36309c7
2024-02-25 03:43:13 +01:00
Neels Hofmeyr 015ebd730e dbg log
Change-Id: I228155695031377e892f844537f9f9d8e80526f6
2024-02-25 03:43:13 +01:00
Neels Hofmeyr d3b270cd02 dbg log
Change-Id: I2e0d5ef66a97b0d8f82f74f12b16884509710c47
2024-02-25 03:43:13 +01:00
Neels Hofmeyr 934c263e0e dbg log
Change-Id: Ia3332166bd2d599c8c12fe9c699c93f40eb1391c
2024-02-25 03:43:12 +01:00
Neels Hofmeyr cd7bcc3df2 tmp dbg log
Change-Id: I1341abf450c2b183bc8b0cf08ce13325512b18c7
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 28a805a6fb tmp dbg validate_perm_speech
Change-Id: Ic853e43a4d2f1db32f20dc2ac7dcfd5b5c20aea8
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 1802478428 tmp dbg
Change-Id: If8b30d6efc1c70ed0e5b0de5b27309f6fc3a2f1b
2024-02-25 03:43:12 +01:00
Neels Hofmeyr cb75da2e30 update_exp
Change-Id: I356992c3aa1de7a8e38c25bf7fd4574b8e36ce18
2024-02-25 03:43:12 +01:00
Neels Hofmeyr de8a282d8d protect re-assignment codec choice from previous codec
Change-Id: I268e19c032429e87ad8f6c949957a887bcb67650
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 7eead3672c base re-assignment based on remote's *first* codec
Change-Id: I51b4b9e511743ea56b84a4584d7d1cb15c08417e
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 02c466e224 codec_mapping: list FR-in-HR-compat last
Change-Id: I04a3baaced36bc99310e1a811cceda6c88030533
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 189a262206 select remote's first codec
Change-Id: I21452edfce34ced393ebb83a5a8b2a746f78d9c6
2024-02-25 03:43:12 +01:00
Neels Hofmeyr dcb6ce71c2 make sdp_audio_codecs_select() safe for any codec
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
2024-02-25 03:43:12 +01:00
Neels Hofmeyr d94fe1cd37 hr test 2
Change-Id: I1ae2dc48c42fda62ab875242b31ed2ea9e3cea53
2024-02-25 03:43:12 +01:00
Neels Hofmeyr b3d0d4eb28 new_test
Change-Id: Ib14146edd633a4f8c82c018932b5f21336422295
2024-02-25 03:43:12 +01:00
Neels Hofmeyr f07366de22 msc_vlr_test_call tweaks
Change-Id: I3dfd35c76e85c9caf6c320b1cb21cdf214c1ffd3
2024-02-25 03:43:12 +01:00
Neels Hofmeyr d015da36ee hr_first
Change-Id: Id098b39bc55df691aae09b6d6096a73f9d911f79
2024-02-25 03:43:12 +01:00
Neels Hofmeyr c7ea1352e9 msc_vlr_test_call: add test for AMR-HR to AMR-FR matching
Change-Id: I4d8f9ef19c6b1b0016dade027f2ab667da7858d3
2024-02-25 03:43:12 +01:00
Neels Hofmeyr d70e0e355f only first AMR mode-set wip
Change-Id: I66d7822357648c5eb8e2edf27f4f6ce31f4091b4
2024-02-25 03:43:12 +01:00
Neels Hofmeyr e72a58d4bf codecs_node
Change-Id: Ib5655214ce48c66d095e8f1b7b7106ac3ee43ec0
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 10d47901fd make default RAN codecs configurable in ran_infra
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
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 390df2f954 pass dynamically configured AMR rates to BSS and RNC [3/3]
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
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 11365c62c5 pass dynamically configured AMR rates to BSS and RNC [2/3]
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
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 03d015e786 pass dynamically configured AMR rates to BSS and RNC [1/3]
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
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 87c6243b3d sdp_msg: increase max codecs to 64
Change-Id: I3f88eb954de2f50b833297627f9717313778fd12
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 8216b39ead new test
Change-Id: Ic01dd2b5243137d9a9799ff315ffb5713dcf8108
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 2b83b385cd msc_vlr_test_call: assignment indicate FR or HR
Change-Id: I47c18a56a86005d6ae270bfd78bc13b2a7560192
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 602961bc5d msc_vlr_tests: allow more detail for assigned codec
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
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 60ff867cb5 msc_vlr_test_call: log tweak
Change-Id: I64604634fd7eedc088442f8d21d682095c397a63
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 4f16f742bb tweak comment
Change-Id: I27d8af3cad57d6cef646f341d78ec52159ffa4b5
2024-02-25 03:43:12 +01:00
Neels Hofmeyr f73c91838b whitespace
Change-Id: I0eb7db3a48d1972dd01dcf8483922dfb4dc380c9
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 788a47fe23 amr_mode_set.txt
Change-Id: If6cce37b37018ec0f138bd14fc5d3bdfb455ac04
2024-02-25 03:43:12 +01:00
Neels Hofmeyr f091db0f20 bearer_cap_set_radio() traverse all matches
It's a minor technicality, but it seems the newly added API to
iterate the codec_mapping can slightly improve this implementation:

For some reason, the Bearer Capabilities should reflect whether any HR
codec is possible with its listed Speech Versions. So far we looked only
whether the first match for a given Speech Version in the global const
codec_mapping is a HR codec. Instead, look through *all* entries for a
Speech Version, and see if any one of them indicates HR.

For example, an AMR-FR codec with a well adjusted mode-set can work with
a half rate channel.

Change-Id: Ic964af4bec21598836748279f3fee480e470738c
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 3e4429af5e rtp_stream use fmtp FU
Change-Id: If98a04d782d5a975d96e73d4dc74b4d20c363ffc
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 333f586578 full fmtp FU
Change-Id: I6156eaab2eb88f81848e61add5b62f435ac4739a
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 3cd26dc53b fully use new AMR fmtp matching
Enable fmtp matching in sdp_audio_codecs_by_descr(). This has profound
effects on the codec_filter and other loops that collect codec matches.

By properly matching the meaning of fmtp, msc_vlr_test_call.c now works
as expected: all AMR variants are picked up properly. Adjust
expectations.

Change-Id: I63dc27e76243074ae0f019d219cae4412d322a84
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 00f8fcbc86 implement intelligent matching of AMR fmtp
Change-Id: I5a1e11e762a0ac511085377aeeb0a371fd2940f5
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 314cc11a45 sdp_audio_codecs(): add 'once', 'pick_unused_pt_nr' args
So far the API is pivoting on the payload type numbers as the "primary
key" for codec lists. However, working with variants of codecs, the
payload type numbers are just incidental, and the API isn't helpful.

- change the behavior to regard the subtype name and fmtp as the
  defining identity of a codec: use sdp_audio_codec_cmp() to match.
- add argument 'once': flag to make sure a given subtype+fmtp exists
  only once, regardless of payload type nr.
- add argument 'pick_unused_pt_nr': flag to make sure a new entry
  doesn't duplicate payload type numbers.

This is preparation to properly match AMR variants, in order to fix the
expected error currently visible in msc_vlr_test_call.c:875.

Change-Id: I87db779dbab39dfdef2724488ccdb6959e6731ed
2024-02-25 03:43:12 +01:00
Neels Hofmeyr d5c45dc580 codecs: match all AMR rates and modes
In msc_a_up_call_assignment_complete(), iterate all the new AMR modes
and rates recently added to codec_mapping, and enlist all possible
matches.

Change-Id: I6163a51765efff998e05c9ee4e82a0a3759f2043
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 64475fc6d8 codec_mapping: add amr flags
These flags are redundant, the aim is to speed up comparisons of AMR
fmtp when traversing a long list of codec variants. It can skip a lot of
repetitive strcmp and fmtp string parsing when used by a loop.

Change-Id: Ic2c9b4983b5374621e02389900e3622faa29cad9
2024-02-25 03:43:12 +01:00
Neels Hofmeyr 3083b970b3 codec_mapping: add all AMR variants
Change-Id: I09233c8c17fce591195b7762740f4d82a9961db6
2024-02-25 03:43:12 +01:00