laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39951?usp=email )
Change subject: msc: add/expect network-originated MT-Forward-SM.Err ......................................................................
msc: add/expect network-originated MT-Forward-SM.Err
The idea is to have two variants of the MT-Forward-SM.Err:
* _MS: originated by the MS/UE (via RP-ERROR), * _NET: originated by the network (MSC) itself.
In both testcase scenarios we expect the network to indicate the MT_FORWARD_SM_ERROR on its own, due to the lack of response from MS/UE. Use the right template kind for that, expect a specific Cause value.
Change-Id: Ic27d943645fdff8d34f958e3bf16c8ee6e8368d2 Related: osmo-msc.git I51d92752471147e6d21a5059bebb0702b32642a5 Related: e9de1515 ("msc: add TC_gsup_mt_sms_{paging,conn}_timeout") Related: SYS#7323 --- M library/GSUP_Templates.ttcn M msc/MSC_Tests.ttcn 2 files changed, 39 insertions(+), 7 deletions(-)
Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn index cbe4566..327f7f6 100644 --- a/library/GSUP_Templates.ttcn +++ b/library/GSUP_Templates.ttcn @@ -1679,7 +1679,8 @@ } );
-template (value) GSUP_PDU ts_GSUP_MT_FORWARD_SM_ERR( +/* MT delivery error indicated by the MS/UE */ +template (value) GSUP_PDU ts_GSUP_MT_FORWARD_SM_ERR_MS( hexstring imsi, OCT1 sm_rp_mr, /* Message Reference, see GSM TS 04.11, 8.2.3 */ OCT1 sm_rp_cause /* RP-Cause value, see GSM TS 04.11, 8.2.5.4 */ @@ -1692,7 +1693,7 @@ valueof(ts_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS)) } ); -template GSUP_PDU tr_GSUP_MT_FORWARD_SM_ERR( +template GSUP_PDU tr_GSUP_MT_FORWARD_SM_ERR_MS( template hexstring imsi := ?, template OCT1 sm_rp_mr := ?, /* Message Reference, see GSM TS 04.11, 8.2.3 */ template OCT1 sm_rp_cause := ? /* RP-Cause value, see GSM TS 04.11, 8.2.5.4 */ @@ -1707,6 +1708,37 @@ } );
+/* MT delivery error indicated by the network */ +template (value) GSUP_PDU ts_GSUP_MT_FORWARD_SM_ERR_NET( + hexstring imsi, + OCT1 sm_rp_mr, /* Message Reference, see GSM TS 04.11, 8.2.3 */ + integer cause /* Cause (indicated by network) */ +) := ts_GSUP( + OSMO_GSUP_MSGT_MT_FORWARD_SM_ERROR, + { + valueof(ts_GSUP_IE_IMSI(imsi)), + valueof(ts_GSUP_IE_Cause(cause)), + valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr)), + /* Cause IE replaces the SM-RP-Cause IE */ + valueof(ts_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS)) + } +); +template GSUP_PDU tr_GSUP_MT_FORWARD_SM_ERR_NET( + template hexstring imsi := ?, + template OCT1 sm_rp_mr := ?, /* Message Reference, see GSM TS 04.11, 8.2.3 */ + template integer cause := ? /* Cause (indicated by network) */ +) := tr_GSUP( + OSMO_GSUP_MSGT_MT_FORWARD_SM_ERROR, + { + tr_GSUP_IE_IMSI(imsi), + tr_GSUP_IE_Cause(cause), + tr_GSUP_IE_SM_RP_MR(sm_rp_mr), + /* Cause IE replaces the SM-RP-Cause IE */ + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS), + tr_GSUP_IE_Source_Name(?) + } +); + template (value) GSUP_PDU ts_GSUP_MO_READY_FOR_SM_REQ( hexstring imsi, OCT1 sm_rp_mr, /* Message Reference, see GSM TS 04.11, 8.2.3 */ diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index a36dbb8..492a551 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -2945,7 +2945,7 @@ /* Register an 'expect' for given IMSI (+TMSI) */ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
- var template GSUP_PDU mt_forwardSM_err := tr_GSUP_MT_FORWARD_SM_ERR( + var template GSUP_PDU mt_forwardSM_err := tr_GSUP_MT_FORWARD_SM_ERR_MS( imsi := g_pars.imsi, /* NOTE: MSC should assign RP-MR itself */ sm_rp_mr := ?, @@ -3297,6 +3297,7 @@ /* Test sending of GSUP MT-forwardSM-Err if MS does not respond to paging */ friend function f_TC_gsup_mt_sms_paging_timeout(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + const integer cause := 17; /* GMM_CAUSE_NET_FAIL */ var SmsParameters spars := valueof(t_SmsPars); var boolean released := false; timer T; @@ -3321,9 +3322,8 @@ T.start(10.0 + 2.0); /* X4 + 2 seconds */ alt { /* Expect the MSC to indicate an error after paging timeout - * TODO: expect a specific SM-RP-Cause value * XXX: should we expect SM-RP-REF to be 'FF'O? */ - [] GSUP.receive(tr_GSUP_MT_FORWARD_SM_ERR(g_pars.imsi, ?, ?)); + [] GSUP.receive(tr_GSUP_MT_FORWARD_SM_ERR_NET(g_pars.imsi, ?, cause)); [] as_unexp_gsup_msg(); [] as_unexp_bssap_msg(); [] T.timeout { @@ -3343,6 +3343,7 @@ /* Test sending of GSUP MT-forwardSM-Err if MS does not send RP-ACK */ friend function f_TC_gsup_mt_sms_conn_timeout(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + const integer cause := 17; /* GMM_CAUSE_NET_FAIL */ var SmsParameters spars := valueof(t_SmsPars); var boolean released := false; timer T; @@ -3372,9 +3373,8 @@ T.start(5.0 + 2.0); /* X1 + 2 seconds */ alt { /* Expect the MSC to indicate an error after connection timeout - * TODO: expect a specific SM-RP-Cause value * XXX: should we expect SM-RP-REF to be 'FF'O? */ - [] GSUP.receive(tr_GSUP_MT_FORWARD_SM_ERR(g_pars.imsi, ?, ?)); + [] GSUP.receive(tr_GSUP_MT_FORWARD_SM_ERR_NET(g_pars.imsi, ?, cause)); /* Timeout of X1 (5s) will trigger connection release */ [not released] as_expect_clear() { released := true;