laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27656 )
Change subject: assignment_fsm: always mark MGCP ci as completed ......................................................................
assignment_fsm: always mark MGCP ci as completed
When the assignment fails, we roll back the MSC side RTP endpoint at the MGW that may have been created before the failure occured. On success, we clear the mgcp_ci pointer so it is not rolled back.
Always clear this, not only when lchan_changed == true. That is because a channel Mode Modify may also have added a voice stream that should retain the newly created RTP endpoint at the MGW.
If no voice stream is involved, the pointer should already be NULL. There is no reason to have a condition for clearing this pointer. Just always clear it.
This fixes all voice calls that modify a TCH lchan from signalling-only to voice mode. Before this patch, their MSC side RTP endpoint was DLCX'd right on assignment success.
In particular, this fixes Emergency Calls (which usually get a TCH lchan assigned right from the start, and hence do a Mode Modify to add voice).
Related: SYS#5916 Change-Id: I5ab10ee7fd9c5d7608e8a06893881d990943feed --- M src/osmo-bsc/assignment_fsm.c 1 file changed, 4 insertions(+), 4 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index 8d5e841..c7fc335 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -283,11 +283,11 @@ } }
- if (lchan_changed) { - /* Rembered this only for error handling: should assignment fail, assignment_reset() will release - * the MGW endpoint right away. If successful, the conn continues to use the endpoint. */ - conn->assignment.created_ci_for_msc = NULL; + /* Rembered this only for error handling: should assignment fail, assignment_reset() will release + * the MGW endpoint right away. If successful, the conn continues to use the endpoint. */ + conn->assignment.created_ci_for_msc = NULL;
+ if (lchan_changed) { /* New RTP information is now accepted */ conn->user_plane.msc_assigned_cic = conn->assignment.req.msc_assigned_cic; osmo_strlcpy(conn->user_plane.msc_assigned_rtp_addr, conn->assignment.req.msc_rtp_addr,