Change in osmo-bsc[master]: codec_pref: fix special handling for AMR rate configuration (S15-S0)

dexter gerrit-no-reply at
Wed Mar 13 16:51:37 UTC 2019

Hello Harald Welte, Jenkins Builder, 

I'd like you to reexamine a change. Please visit

to look at the new patch set (#8).

Change subject: codec_pref: fix special handling for AMR rate configuration  (S15-S0)

codec_pref: fix special handling for AMR rate configuration  (S15-S0)

When match_codec_pref() is called and the codec selections from the
ASSIGNMENT COMMAND are matched against the interal capabilities, the
configurations are checked one by one. When a match is found that match
is returned.

However, the implementation currently does not check the AMR S15-S0 bits
when the actual matching happens. This is done afterwards in case AMR
gets picked. Unfortunately if the MSC implementation is not obeying the
settings the MSC has previously communicated in the L3 COMPL message we
may end up with an S15-S0 configuration that has all rate selection
(which eventually end up as active set in RSL) bits set to zero. This is
an invalid configuration and should be prevented. Also the handling of
the S15-S0 bits should happen as part of the matching so that there is a
chance to try the nect codec in the list if AMR is unuseable.

Also S15-S0 has one special setting "Config-NB-Code = 1" (S1 = 1). When
this bit is set, the four (in HR only three) most common rates are
selected into the active set. If there are also other S-bits set besides
S1 we should prefer S1 and discard the other bits.

- Perform handling of S15-S0 while matching
- If S1 is set, prefer this setting and discard all other settings

Change-Id: Ie52376b51fe07ed07056e8df2e9557293ff67a78
Related: SYS#4470
M src/osmo-bsc/codec_pref.c
M tests/codec_pref/codec_pref_test.ok
2 files changed, 62 insertions(+), 35 deletions(-)

  git pull ssh:// refs/changes/93/13093/8
To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie52376b51fe07ed07056e8df2e9557293ff67a78
Gerrit-Change-Number: 13093
Gerrit-PatchSet: 8
Gerrit-Owner: dexter <pmaier at>
Gerrit-Reviewer: Harald Welte <laforge at>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: dexter <pmaier at>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list