The lchan_rtp_fsm is a child FSM that manages the MGW/RTP endpoint. When the parent lchan_fsm transitions away before the child has finished its work (e.g. a CRCX timeout or a DLCX completing after the lchan is already idle), the child can still deliver LCHAN_EV_RTP_RELEASED or LCHAN_EV_RTP_ERROR to the parent.
Currently these late events are not in the in_event_mask of every state that can be reached with the child still running:
* LCHAN_ST_UNUSED: entered from WAIT_AFTER_ERROR after the error timer fires, while a DLCX triggered at error time may still be in flight. * LCHAN_ST_WAIT_AFTER_ERROR: already handles LCHAN_EV_RTP_RELEASED but misses LCHAN_EV_RTP_ERROR (e.g. CRCX timeout arriving after the NACK was handled).
Add the missing events to both states' in_event_mask and provide a no-op handler in lchan_fsm_unused() so that the assert is not hit.