This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/9685 Change subject: msc/USSD: expect and reply SS/USSD messages over GSUP ...................................................................... msc/USSD: expect and reply SS/USSD messages over GSUP As we are about to finish the implementation of GSM TS 09.11, OsmoMSC will forward all SS/USSD messages over GSUP to HLR, and will expect responses back from HLR. The SS/USSD payload processing will be out of scope for OsmoMSC itself. Let's modify the existing test cases in order to expect and reply SS/USSD messages over GSUP protocol. Change-Id: I01de73aced6057328a121577a5a83bc2615fb2d4 --- M msc/MSC_Tests.ttcn 1 file changed, 105 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/85/9685/1 diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index dc5303e..1af77cd 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -2120,31 +2120,71 @@ /* Send CM Service Request for SS/USSD */ f_establish_fully(EST_TYPE_SS_ACT); + /* We need to inspect GSUP activity */ + f_create_gsup_expect(hex2str(g_pars.imsi)); + + var template OCTN facility_req := f_USSD_FACILITY_IE_INVOKE( + invoke_id := 5, /* Phone may not start from 0 or 1 */ + op_code := SS_OP_CODE_PROCESS_USS_REQ, + ussd_string := "*#100#" + ); + + var template OCTN facility_rsp := f_USSD_FACILITY_IE_RETURN_RESULT( + invoke_id := 5, /* InvokeID shall be the same for both REQ and RSP */ + op_code := SS_OP_CODE_PROCESS_USS_REQ, + ussd_string := "Your extension is " & hex2str(g_pars.msisdn) & "\r" + ) + /* Compose a new SS/REGISTER message with request */ var template (value) PDU_ML3_MS_NW ussd_req := ts_ML3_MO_SS_REGISTER( tid := 1, /* We just need a single transaction */ ti_flag := c_TIF_ORIG, /* Sent from the side that originates the TI */ - facility := f_USSD_FACILITY_IE_INVOKE( - invoke_id := 5, /* Phone may not start from 0 or 1 */ - op_code := SS_OP_CODE_PROCESS_USS_REQ, - ussd_string := "*#100#" - ) + facility := valueof(facility_req) ); /* Compose SS/RELEASE_COMPLETE template with expected response */ var template PDU_ML3_NW_MS ussd_rsp := tr_ML3_MT_SS_RELEASE_COMPLETE( tid := 1, /* Response should arrive within the same transaction */ ti_flag := c_TIF_REPL, /* Sent to the side that originates the TI */ - facility := f_USSD_FACILITY_IE_RETURN_RESULT( - invoke_id := 5, /* InvokeID shall be the same for both REQ and RSP */ - op_code := SS_OP_CODE_PROCESS_USS_REQ, - ussd_string := "Your extension is " & hex2str(g_pars.msisdn) & "\r" - ) + facility := valueof(facility_rsp) ); - /* Request own number request */ + /* Compose expected MSC -> HLR message */ + var template GSUP_PDU gsup_req := tr_GSUP_PROC_SS_REQ( + imsi := g_pars.imsi, + state := OSMO_GSUP_SESSION_STATE_BEGIN, + ss := valueof(facility_req) + ); + + /* To be used for sending response with correct session ID */ + var GSUP_PDU gsup_req_complete; + + /* Request own number request, wait for GSUP-request */ BSSAP.send(ts_PDU_DTAP_MO(ussd_req)); alt { + [] GSUP.receive(gsup_req) -> value gsup_req_complete { + setverdict(pass); + } + [] GSUP.receive { + setverdict(fail, "Unknown/unexpected GSUP received"); + self.stop; + } + [] BSSAP.receive { + setverdict(fail, "Unexpected BSSAP message received"); + self.stop; + } + } + + /* Compose the response from HLR using received session ID */ + var template GSUP_PDU gsup_rsp := ts_GSUP_PROC_SS_REQ( + imsi := g_pars.imsi, + sid := gsup_req_complete.ies[1].val.session_id, + state := OSMO_GSUP_SESSION_STATE_END, + ss := valueof(facility_rsp) + ); + + GSUP.send(gsup_rsp); + alt { /* We expect RELEASE_COMPLETE message with the response */ [] BSSAP.receive(tr_PDU_DTAP_MT(ussd_rsp)) { setverdict(pass); @@ -2153,6 +2193,10 @@ setverdict(fail, "Unknown/unexpected BSSAP received"); self.stop; } + [] GSUP.receive { + setverdict(fail, "Unexpected GSUP message received"); + self.stop; + } } f_expect_clear(); @@ -2185,29 +2229,66 @@ /* Hold the call for some time */ f_sleep(1.0); + var template OCTN facility_req := f_USSD_FACILITY_IE_INVOKE( + op_code := SS_OP_CODE_PROCESS_USS_REQ, + ussd_string := "*#100#" + ); + + var template OCTN facility_rsp := f_USSD_FACILITY_IE_RETURN_RESULT( + op_code := SS_OP_CODE_PROCESS_USS_REQ, + ussd_string := "Your extension is " & hex2str(g_pars.msisdn) & "\r" + ) + /* Compose a new SS/REGISTER message with request */ var template (value) PDU_ML3_MS_NW ussd_req := ts_ML3_MO_SS_REGISTER( tid := 1, /* We just need a single transaction */ ti_flag := c_TIF_ORIG, /* Sent from the side that originates the TI */ - facility := f_USSD_FACILITY_IE_INVOKE( - op_code := SS_OP_CODE_PROCESS_USS_REQ, - ussd_string := "*#100#" - ) + facility := valueof(facility_req) ); /* Compose SS/RELEASE_COMPLETE template with expected response */ var template PDU_ML3_NW_MS ussd_rsp := tr_ML3_MT_SS_RELEASE_COMPLETE( tid := 1, /* Response should arrive within the same transaction */ ti_flag := c_TIF_REPL, /* Sent to the side that originates the TI */ - facility := f_USSD_FACILITY_IE_RETURN_RESULT( - op_code := SS_OP_CODE_PROCESS_USS_REQ, - ussd_string := "Your extension is " & hex2str(g_pars.msisdn) & "\r" - ) + facility := valueof(facility_rsp) ); - /* Request own number request */ + /* Compose expected MSC -> HLR message */ + var template GSUP_PDU gsup_req := tr_GSUP_PROC_SS_REQ( + imsi := g_pars.imsi, + state := OSMO_GSUP_SESSION_STATE_BEGIN, + ss := valueof(facility_req) + ); + + /* To be used for sending response with correct session ID */ + var GSUP_PDU gsup_req_complete; + + /* Request own number request, wait for GSUP-request */ BSSAP.send(ts_PDU_DTAP_MO(ussd_req)); alt { + [] GSUP.receive(gsup_req) -> value gsup_req_complete { + setverdict(pass); + } + [] GSUP.receive { + setverdict(fail, "Unknown/unexpected GSUP received"); + self.stop; + } + [] BSSAP.receive { + setverdict(fail, "Unexpected BSSAP message received"); + self.stop; + } + } + + /* Compose the response from HLR using received session ID */ + var template GSUP_PDU gsup_rsp := ts_GSUP_PROC_SS_REQ( + imsi := g_pars.imsi, + sid := gsup_req_complete.ies[1].val.session_id, + state := OSMO_GSUP_SESSION_STATE_END, + ss := valueof(facility_rsp) + ); + + GSUP.send(gsup_rsp); + alt { /* We expect RELEASE_COMPLETE message with the response */ [] BSSAP.receive(tr_PDU_DTAP_MT(ussd_rsp)) { setverdict(pass); @@ -2216,6 +2297,10 @@ setverdict(fail, "Unknown/unexpected BSSAP received"); self.stop; } + [] GSUP.receive { + setverdict(fail, "Unexpected GSUP message received"); + self.stop; + } } /* Hold the call for some time */ -- To view, visit https://gerrit.osmocom.org/9685 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I01de73aced6057328a121577a5a83bc2615fb2d4 Gerrit-Change-Number: 9685 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180619/7c373530/attachment.htm>