osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28240 )
Change subject: subscr_conn_fsm: handle dialing invalid number
......................................................................
subscr_conn_fsm: handle dialing invalid number
Reset the FSM to idle when receiving a clear command from the MSC during
ST_WAITING_FOR_ASSIGNMENT_COMPLETE.
Related: SYS#5560
Change-Id: Ic0589be21f0ee4dbbbe0ffa6b0acdbe152909700
---
M src/osmo-bsc-nat/subscr_conn_fsm.c
1 file changed, 9 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/src/osmo-bsc-nat/subscr_conn_fsm.c b/src/osmo-bsc-nat/subscr_conn_fsm.c
index f4b9fb6..848204d 100644
--- a/src/osmo-bsc-nat/subscr_conn_fsm.c
+++ b/src/osmo-bsc-nat/subscr_conn_fsm.c
@@ -267,6 +267,14 @@
* reset the FSM to idle here (clears the mgw endpoint). */
osmo_fsm_inst_state_chg(fi, SUBSCR_CONN_FSM_ST_IDLE, 0, 0);
break;
+ case SUBSCR_CONN_FSM_EV_BSSMAP_CLEAR_COMMAND:
+ /* Dialing an invalid number results in receiving a clear
+ * command from the MSC in ST_WAITING_FOR_ASSIGNMENT_COMPLETE.
+ * The original message gets forwarded from CN to RAN by
+ * bssmap_cn_handle_clear_cmd() already, so just reset the FSM
+ * to idle here (clears the mgw endpoint). */
+ osmo_fsm_inst_state_chg(fi, SUBSCR_CONN_FSM_ST_IDLE, 0, 0);
+ break;
default:
OSMO_ASSERT(false);
}
@@ -395,6 +403,7 @@
.in_event_mask = 0
| X(SUBSCR_CONN_FSM_EV_BSSMAP_ASSIGNMENT_COMPLETE)
| X(SUBSCR_CONN_FSM_EV_BSSMAP_ASSIGNMENT_FAILURE)
+ | X(SUBSCR_CONN_FSM_EV_BSSMAP_CLEAR_COMMAND)
,
.out_state_mask = 0
| X(SUBSCR_CONN_FSM_ST_IDLE)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28240
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: Ic0589be21f0ee4dbbbe0ffa6b0acdbe152909700
Gerrit-Change-Number: 28240
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28249
to look at the new patch set (#2).
Change subject: subscr_conn_fsm: refactor timeouts
......................................................................
subscr_conn_fsm: refactor timeouts
Use osmo_tdef_state_timeout instead of passing timers every time. Rename
g_mgw_tdefs to g_bsc_nat_tdefs and add the new TDEF_ASS_COMPL there, so
the TDEF_MGCP can be used in subscr_conn_fsm and by mgcp client without
duplicating it.
Related: SYS#5560
Change-Id: Ib34e6ccc34901ebc37d2dbe347d9644cb70921ca
---
M include/osmocom/bsc_nat/bsc_nat.h
M src/osmo-bsc-nat/bsc_nat.c
M src/osmo-bsc-nat/subscr_conn_fsm.c
3 files changed, 41 insertions(+), 25 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc-nat refs/changes/49/28249/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28249
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: Ib34e6ccc34901ebc37d2dbe347d9644cb70921ca
Gerrit-Change-Number: 28249
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
Attention is currently required from: neels, laforge, pespin, fixeria.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27712 )
Change subject: Add subscr_conn_fsm
......................................................................
Patch Set 7: Code-Review+2
(6 comments)
Patchset:
PS7:
re-applying +2 after minor changes
File include/osmocom/bsc_nat/subscr_conn_fsm.h:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27712/comment/3c1f6b7d_e591ce54
PS6, Line 31:
> (doesn't the linter complain about trailing blank lines?)
nope
File src/osmo-bsc-nat/bssap_conn.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27712/comment/50f57106_08e5de5d
PS4, Line 47: uint8_t tag = tag_order[i];
> Pau is correct that it would indeed be possible to copy the part leading up to the changed IE and th […]
Done
File src/osmo-bsc-nat/bssap_conn.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27712/comment/4b9e740f_bbe3a730
PS6, Line 49: goto error;
bug: rc would be uninitialized here, fixed in patchset 7
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27712/comment/576c8e95_4ac7c524
PS6, Line 228:
> (1 blank line)
Done
File src/osmo-bsc-nat/subscr_conn_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27712/comment/ebfed292_af5fcd6d
PS6, Line 262: osmo_fsm_inst_state_chg(fi, SUBSCR_CONN_FSM_ST_PROCESSING_ASSIGNMENT_COMPLETE_MDCX_RAN, TIMEOUT_MGW, 0);
> Did you think about using osmo_tdef_state_timeout instead of passing timers every time? It's easier […]
Thanks! Done in new patch: https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28249/1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27712
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I7e491aada6f5db0eb35ef2039869c6ba07f9ca3b
Gerrit-Change-Number: 27712
Gerrit-PatchSet: 7
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 09 Jun 2022 09:30:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: osmith, laforge, pespin, fixeria.
Hello Jenkins Builder, neels, laforge, pespin, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27712
to look at the new patch set (#7).
Change subject: Add subscr_conn_fsm
......................................................................
Add subscr_conn_fsm
Insert the BSCNAT's MGW into phone calls by replacing the AoIP
transport layer address IE inside BSSMAP Assignment Request and
Assignment Confirm. Accomplish this with a new subscr_conn_fsm that
parses and stores the original ass_req / ass_conf messages, communicates
with the BSCNAT MGW, and then creates new ass_req / ass_conf messages
based on the original ones but with new RTP information.
With this patch it is possible to do a successful voice call with the
following network:
MS1 --- BTS1 --- BSC1 --.
| | BSCNAT ----------- MSC
| | | | |
'-- MGW-BSC1 --|-- MGW-BSCNAT --- MGW-MSC
| |
MS2 --- BTS2 --- BSC2 --' |
| | |
'-- MGW-BSC2 ------'
Related: SYS#5560
Related: https://osmocom.org/projects/osmo-bscnat/wiki/Ladder_diagrams_for_key_proce…
Change-Id: I7e491aada6f5db0eb35ef2039869c6ba07f9ca3b
---
M include/osmocom/bsc_nat/Makefile.am
M include/osmocom/bsc_nat/bsc_nat.h
M include/osmocom/bsc_nat/bssap.h
M include/osmocom/bsc_nat/subscr_conn.h
A include/osmocom/bsc_nat/subscr_conn_fsm.h
M src/osmo-bsc-nat/Makefile.am
M src/osmo-bsc-nat/bssap_conn.c
M src/osmo-bsc-nat/subscr_conn.c
A src/osmo-bsc-nat/subscr_conn_fsm.c
9 files changed, 776 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc-nat refs/changes/12/27712/7
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27712
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I7e491aada6f5db0eb35ef2039869c6ba07f9ca3b
Gerrit-Change-Number: 27712
Gerrit-PatchSet: 7
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset