dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/15598


Change subject: paging: Send SGsAP-SERVICE-ABORT-REQUEST on paging timeout
......................................................................

paging: Send SGsAP-SERVICE-ABORT-REQUEST on paging timeout

When pagig for a CS-Call via SGs times out, the MME expects to be
informed about this via an SGsAP-SERVICE-ABORT-REQUEST, make sure this
message is sent, but only for CS-Fallback calls.

Change-Id: I3f8f153afe24cf2efa245713509bdc8488902877
Depends: osmo-ttcn3-hacks I99950a17ccf26aaa0eebded5480f33be4c57586a
Related: OS#3614
---
M include/osmocom/msc/sgs_iface.h
M src/libmsc/paging.c
M src/libmsc/sgs_iface.c
3 files changed, 27 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/98/15598/1

diff --git a/include/osmocom/msc/sgs_iface.h b/include/osmocom/msc/sgs_iface.h
index 575468e..a319663 100644
--- a/include/osmocom/msc/sgs_iface.h
+++ b/include/osmocom/msc/sgs_iface.h
@@ -89,4 +89,5 @@
 int sgs_iface_tx_paging(struct vlr_subscr *vsub, enum sgsap_service_ind 
serv_ind);
 int sgs_iface_tx_dtap_ud(struct msc_a *msc_a, struct msgb *msg);
 void sgs_iface_tx_release(struct vlr_subscr *vsub);
+void sgs_iface_tx_serv_abrt(struct vlr_subscr *vsub);

diff --git a/src/libmsc/paging.c b/src/libmsc/paging.c
index 182b036..743ce5c 100644
--- a/src/libmsc/paging.c
+++ b/src/libmsc/paging.c
@@ -49,6 +49,10 @@
 static void paging_response_timer_cb(void *data)
 {
        struct vlr_subscr *vsub = data;
+
+       if (vsub->cs.attached_via_ran == OSMO_RAT_EUTRAN_SGS)
+               sgs_iface_tx_serv_abrt(vsub);
+
        paging_expired(vsub);
 }

diff --git a/src/libmsc/sgs_iface.c b/src/libmsc/sgs_iface.c
index b12991c..2a37f4f 100644
--- a/src/libmsc/sgs_iface.c
+++ b/src/libmsc/sgs_iface.c
@@ -1258,6 +1258,28 @@
        sgs_tx(mme->conn, msg_sgs);
 }

+/*! Send SGsAP-SERVICE-ABORT-REQUEST message to MME
+ *  \param[in] vsub subscriber context */
+void sgs_iface_tx_serv_abrt(struct vlr_subscr *vsub)
+{
+       struct msgb *msg_sgs;
+       struct sgs_mme_ctx *mme;
+
+       OSMO_ASSERT(vsub);
+
+       /* The service abort procedure is only defined for MT calls,
+        * see also 3GPP TS 29.118, chapter 5.13.2 */
+       if (vsub->sgs.paging_serv_ind != SGSAP_SERV_IND_CS_CALL)
+               return;
+
+       mme = sgs_mme_ctx_by_vsub(vsub, SGSAP_MSGT_DL_UD);
+       if (!mme)
+               return;
+
+       msg_sgs = gsm29118_create_service_abort_req(vsub->imsi);
+       sgs_tx(mme->conn, msg_sgs);
+}
+
 /*! initalize SGs new interface
  *  \param[in] ctx talloc context
  *  \param[in] network associated gsm network

--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15598
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I3f8f153afe24cf2efa245713509bdc8488902877
Gerrit-Change-Number: 15598
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>
Gerrit-MessageType: newchange

Reply via email to