I'm still having trouble actually getting an Inter-BSC handover to complete.
I'm using two osmo-bts based BTS and all master/nightly etc..
The problem as far as I can see is the the destination BSC complains that:
HO-interBSC-In: incoming inter-BSC Handover: HO Request: Invalid or empty Codec List (MSC Preferred) (handover_fsm.c:620)
Stopping the MSC at ran_a_make_handover_request() and inspecting the stack and local variables I can see that indeed the member
ran_handover_request->codec_list_msc_preferred
at that point is NULL.
Further up the stack in msc_ho_send_handover_request(), is where this ran_msg of type RAN_MSG_HANDOVER_REQUEST comes into being
https://cgit.osmocom.org/osmo-msc/tree/src/libmsc/msc_ho.c#n385
but at no time do we assign anything to codec_list_msc_preferred, therefore, when we get to
https://cgit.osmocom.org/libosmocore/tree/src/gsm/gsm0808.c#n995
we are skipping gsm0808_enc_speech_codec_list(msg, params->codec_list_msc_preferred);
and therefore not calling msgb_put_u8(msg, GSM0808_IE_SPEECH_CODEC_LIST);
I'm not seeing how this is supposed to work. or what am I missing?
I do see code that looks like it is setting up the codec_list_msc_preferred, but that seems to relate ONLY to Inter-MSC Handover.
Thanks
Keith.
I'm still having trouble actually getting an Inter-BSC handover to complete.
Hm! Our ttcn3 tests actually have inter-BSC HO tests which succeed.
Looking at osmo-msc, I see that we indeed do not set a codec_list_msc_preferred in ran_msg_a.c. Wondering how this doesn't show up in the tests ... the answer is that in the BSC tests, we use TTCN3 to compose the Handover Request, and the TTCN3 includes a Codec List. And in the MSC_Tests, we use TTCN3 to verify the Handover Request, which fails to validate presence of the IE.
Also, requiring the Codec List (MSC Preferred) has been added to osmo-bsc only about a month ago; before, we would just continue without a clue about MSC codec choices. So a dirty workaround could be to revert 826ec9ff758c8a40fca2eaf6cca7989ff6471c83 in osmo-bsc or use a version prior to that. Of course then the codec info is missing in the BSC, but at least something happens.
I made the IE mandatory, because it is necessary to make sane codec choices, and the spec also says so:
3GPP TS 48.008 on Codec List (MSC Preferred) in HANDOVER REQUEST:
NOTE 25: This IE is not included, if the Channel Type IE indicates "signalling". Codec List (MSC Preferred) shall be included if the core network supports an IP based user plane interface. The information in Codec List (MSC Preferred) shall be consistent with the information in Channel Type and with the information in Speech Version (Used), if included.
Now looking at how to add the Codec List to the HO Request in osmo-msc. Should be identical to the Speech Codec List included in the Assignment Request.
So far, in Assignment, my branch neels/codecs for historical reasons does sdp_audio_codecs_to_gsm0808_channel_type() and then ran_msg_a.c translates the Channel Type to a Speech Codec List with ran_a_channel_type_to_speech_codec_list(). Instead, I would add a function sdp_audio_codecs_to_speech_codec_list().
On the master branch, we so far do mncc_bearer_cap_to_channel_type() and then also ran_a_channel_type_to_speech_codec_list(). Not sure what I would do to add the Speech Codec List on master branch, and it seems like futile work, I'd rather merge the branch and fix it only there...
So things are definitely not complete in osmo-msc. Could you create an issue on this?
~N