Add f_expect_paging() rather than using tr_BSSMAP_Paging directly

this will ease the introduction of RANAP support

Change-Id: I213303337373c349676be4f8ac4175acdc701e47
This commit is contained in:
Harald Welte 2019-04-21 17:32:05 +02:00
parent 6811d10af7
commit e035e3e182
2 changed files with 14 additions and 7 deletions

View File

@ -553,6 +553,11 @@ runs on BSC_ConnHdlr {
MNCC.receive(tr_MNCC_SETUP_cnf(cpars.mncc_callref));
}
function f_expect_paging(boolean by_tmsi := true)
runs on BSC_ConnHdlr {
BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi));
}
function f_mt_call_establish(inout CallParameters cpars)
runs on BSC_ConnHdlr {
@ -561,7 +566,7 @@ runs on BSC_ConnHdlr {
/* BSC <- MSC: Expect paging. FIXME: By TMSI or not? */
f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi));
f_expect_paging()
/* Complete the call via BSSAP */
f_mt_call_complete(cpars);

View File

@ -1443,7 +1443,8 @@ private function f_mt_call_start(inout CallParameters cpars) runs on BSC_ConnHdl
hex2str(cpars.called_party), hex2str(g_pars.imsi)));
/* MSC->BSC: expect PAGING from MSC */
BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi));
f_expect_paging();
/* MS -> MSC: PAGING RESPONSE */
f_establish_fully(EST_TYPE_PAG_RESP);
@ -2022,7 +2023,8 @@ private function f_tc_lu_and_mt_sms(charstring id, BSC_ConnHdlrPars pars) runs o
f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS");
/* MSC->BSC: expect PAGING from MSC */
BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi));
f_expect_paging();
/* Establish DTAP / BSSAP / SCCP connection */
f_establish_fully(EST_TYPE_PAG_RESP);
@ -2326,7 +2328,7 @@ runs on BSC_ConnHdlr {
f_gsup_forwardSM_req(spars);
/* Expect Paging Request and Establish DTAP / BSSAP / SCCP connection */
BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi));
f_expect_paging();
f_establish_fully(EST_TYPE_PAG_RESP);
/* Wait for MT SMS on DTAP */
@ -2391,7 +2393,7 @@ runs on BSC_ConnHdlr {
f_gsup_forwardSM_req(spars);
/* Expect Paging Request and Establish DTAP / BSSAP / SCCP connection */
BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi));
f_expect_paging();
f_establish_fully(EST_TYPE_PAG_RESP);
/* Wait for MT SMS on DTAP */
@ -2451,7 +2453,7 @@ runs on BSC_ConnHdlr {
f_gsup_forwardSM_req(spars1);
/* Expect Paging Request and Establish DTAP / BSSAP / SCCP connection */
BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi));
f_expect_paging();
f_establish_fully(EST_TYPE_PAG_RESP);
/* Wait for 1st MT SMS on DTAP */
@ -2785,7 +2787,7 @@ private function f_smpp_mt_sms(SmsParameters spars, boolean trans_mode) runs on
}
/* MSC->BSC: expect PAGING from MSC */
BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi));
f_expect_paging();
/* Establish DTAP / BSSAP / SCCP connection */
f_establish_fully(EST_TYPE_PAG_RESP);
SMPP.receive(tr_SMPP(c_SMPP_command_id_alert_notification, ESME_ROK));