fix support for non voice configuration
At the moment osmo-bsc does not permit non voice configurations. A valid voice codec configuration must be in place, otherwise the COMPLETE LAYER 3 INFORMATION message generation will fail because the SPEECH CODEC LIST (BSS supported) IE can not be generated. The speech codec list is a mandatory IE, but only if the network supports an IP based user plane interface. In networks that intentionally do not support voice, it could be garmented that those networks do not have such an interface and therefore the inclusion of the speech codec list is not needed. Also a speech codec list with 0 elements is indeed permitted by the spec. We could also include a speech codec list with 0 elements for the non-voice configurations.
#2 Updated by dexter over 2 years ago
- % Done changed from 0 to 90
The problem should be fixed now. First of all I have taken some actions to allow
zero length codec list. I have fixed both, the encoding and the decoding and
added a unit test for the zero length corner case.
See also: https://gerrit.osmocom.org/11373
The BSC uses the speech codec list decoding functionality once, I have fixed it
so that it now checks the length, before this it was relying on the fact that
the decoding function fails for the zero length case.
Then I have removed the check for zero length that the BSC does before it
generates the COMPLETE LAYER 3 INFORMATION message. It now sends a possibly
empty speech codec list to the encoder function that now happly encodecs it.
The last thing I added is optional. I am not sure if it is really needed or if
we should abandon it. I now again check for zero length codec list and if this
is the case the codec list will be completely excluded. I should be permitted
by the spec because in general the IE is optional, it is only required if the
network supports an IP based user-plane interface. If we have no codecs
available we effectively don't support an IP based user-plane interface and
therefore we may exclude the IE completely. I think in the end it is a matter
of taste what. Having a zero length speech codec element inside the
COMPLETE LAYER 3 INFORMATION message wouln't look that nice, but it still would
be spec compliant.