OsmoBSC sends BSSMAP ASSIGNMENT COMPLETE before RSL MODE MODIFY succeeds
OsmoBSC sends the BSSMAP ASSIGNMENT COMPLETE when it receives the RR CHANNEL MODE MODIFY ACK from the MS, but before it has successfully modified the mode on the BTS side.
See attached protocol trace snippet.
In Theory this can still happen with the GSCON FSM. I suspect the reason for this is that we make the FSM depended on the S_ABISIP_MDCX_ACK in osmo_bsc_audio.c and that S_ABISIP_MDCX_ACK arrives earlyer than the MODE MODIFY REQuest.
When S_ABISIP_MDCX_ACK arrives an GSCON_EV_RR_ASS_COMPL is generated in osmo_bsc_audio.c. The FSM is then expected to be in ST_WAIT_ASS_CMPL.
There is also a second location where GSCON_EV_RR_ASS_COMPL can be sent. This is when GSM48_MT_RR_CHAN_MODE_MODIF_ACK arrives in bsc_api.c and the bsc_assign_compl() in osmo_bsc_api.c runs. This looks completely correct. In order to resolve this, the RR assignement and the IPACC RTP negotiation should be untangled and the sending of GSCON_EV_RR_ASS_COMPL should be removed. This should solve the problem cleanly.