laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/34453?usp=email )
Change subject: dahdi: Fix compilation with ancient DAHDI
......................................................................
dahdi: Fix compilation with ancient DAHDI
We had an #ifndef DAHDI_SPECIFY clause which clearly wouldn't compile
as it used a wrong variable name. Apparently nobody is building against
such ancient DAHDI for a long time...
Change-Id: Ib18343c0914ef25e673b930fa86b2dec6129065d
---
M src/input/dahdi.c
1 file changed, 14 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/53/34453/1
diff --git a/src/input/dahdi.c b/src/input/dahdi.c
index adae121..efed38d 100644
--- a/src/input/dahdi.c
+++ b/src/input/dahdi.c
@@ -600,7 +600,7 @@
char name[32];
#ifndef DAHDI_SPECIFY
char openstr[128];
- snprintf(openstr, sizeof(openstr), "/dev/dahdi/%d", dev_nr);
+ snprintf(openstr, sizeof(openstr), "/dev/dahdi/%d", dahdi_chan_nr);
#else
const char *openstr = "/dev/dahdi/channel";
#endif
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/34453?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ib18343c0914ef25e673b930fa86b2dec6129065d
Gerrit-Change-Number: 34453
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: falconia.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hlr/+/34448?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: SMS over GSUP: implement vty config of SMSC routing
......................................................................
SMS over GSUP: implement vty config of SMSC routing
At the user-visible level (advanced settings menus on phones,
GSM 07.05 AT commands, SIM programming) each SMSC is identified
by a numeric address that looks like a phone number, originally
meant to be a Global Title. OsmoMSC passes these SMSC addresses
through as-is to MO-forwardSM.req GSUP message - however, SMSCs
that connect to OsmoHLR via GSUP identify themselves by their
IPA names instead. Hence we need a mapping mechanism in OsmoHLR
config.
To accommodate different styles of network design ranging from
strict recreation of classic GSM architecture to guest roaming
arrangements, a two-level configuration is implemented, modeled
after EUSE/USSD configuration: first one defines which SMSCs exist
as entities, identified only by their IPA names, and then one
defines which numeric SMSC address (in SM-RP-DA) should go to which
configured SMSC, with the additional possibility of a default route.
Related: OS#6135
Change-Id: I1624dcd9d22b4efca965ccdd1c74f0063a94a33c
---
M include/osmocom/hlr/Makefile.am
M include/osmocom/hlr/hlr.h
A include/osmocom/hlr/hlr_sms.h
M include/osmocom/hlr/hlr_vty.h
M src/Makefile.am
M src/hlr.c
A src/hlr_sms.c
M src/hlr_vty.c
M tests/test_nodes.vty
9 files changed, 339 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/48/34448/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/34448?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I1624dcd9d22b4efca965ccdd1c74f0063a94a33c
Gerrit-Change-Number: 34448
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-MessageType: newpatchset
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/34450?usp=email )
Change subject: SMS over GSUP: implement forwarding of MT SMS
......................................................................
SMS over GSUP: implement forwarding of MT SMS
When an SMSC tries to deliver an SM to a subscriber, it will send us
an MT-forwardSM.req GSUP message. We look up the subscriber by IMSI
and see if they are attached to a VLR. If the subscriber is attached,
we forward the message to the MSC/VLR, otherwise return an error
to the SMSC.
Related: OS#6135
Change-Id: Ib3551bf7839690606c677461758c5cfef5f0aa7b
---
M include/osmocom/hlr/hlr_sms.h
M src/hlr.c
M src/hlr_sms.c
3 files changed, 48 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/50/34450/1
diff --git a/include/osmocom/hlr/hlr_sms.h b/include/osmocom/hlr/hlr_sms.h
index 6e68a85..b3beea6 100644
--- a/include/osmocom/hlr/hlr_sms.h
+++ b/include/osmocom/hlr/hlr_sms.h
@@ -29,3 +29,4 @@
void smsc_route_del(struct hlr_smsc_route *rt);
void forward_mo_sms(struct osmo_gsup_req *req);
+void forward_mt_sms(struct osmo_gsup_req *req);
diff --git a/src/hlr.c b/src/hlr.c
index 501eabc..eae9e84 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -560,6 +560,9 @@
case OSMO_GSUP_MSGT_MO_FORWARD_SM_REQUEST:
forward_mo_sms(req);
break;
+ case OSMO_GSUP_MSGT_MT_FORWARD_SM_REQUEST:
+ forward_mt_sms(req);
+ break;
default:
LOGP(DMAIN, LOGL_DEBUG, "Unhandled GSUP message type %s\n",
osmo_gsup_message_type_name(req->gsup.message_type));
diff --git a/src/hlr_sms.c b/src/hlr_sms.c
index ebf4099..ac4d50d 100644
--- a/src/hlr_sms.c
+++ b/src/hlr_sms.c
@@ -191,3 +191,31 @@
strlen(smsc->name) + 1);
osmo_gsup_forward_to_local_peer(req->cb_data, &dest_peer, req, NULL);
}
+
+/***********************************************************************
+ * forwarding of MT SMS from SMSCs to MSC/VLR based on IMSI
+ ***********************************************************************/
+
+void forward_mt_sms(struct osmo_gsup_req *req)
+{
+ struct hlr_subscriber subscr;
+ struct osmo_cni_peer_id dest_peer;
+ int rc;
+
+ rc = db_subscr_get_by_imsi(g_hlr->dbc, req->gsup.imsi, &subscr);
+ if (rc < 0) {
+ osmo_gsup_req_respond_err(req, GMM_CAUSE_IMSI_UNKNOWN,
+ "IMSI unknown");
+ return;
+ }
+ /* is this subscriber currently attached to a VLR? */
+ if (!subscr.vlr_number[0]) {
+ osmo_gsup_req_respond_err(req, GMM_CAUSE_IMPL_DETACHED,
+ "subscriber not attached to a VLR");
+ return;
+ }
+ osmo_cni_peer_id_set(&dest_peer, OSMO_CNI_PEER_ID_IPA_NAME,
+ (const uint8_t *) subscr.vlr_number,
+ strlen(subscr.vlr_number) + 1);
+ osmo_gsup_forward_to_local_peer(req->cb_data, &dest_peer, req, NULL);
+}
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/34450?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ib3551bf7839690606c677461758c5cfef5f0aa7b
Gerrit-Change-Number: 34450
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-MessageType: newchange
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/34451?usp=email )
Change subject: SMS over GSUP: handle READY-FOR-SM.req from MSCs
......................................................................
SMS over GSUP: handle READY-FOR-SM.req from MSCs
When an MS indicates that it is ready to receive MT SMS, the MSC will
send us a READY-FOR-SM.req message. Handle it by sending copies of
the same message to all connected SMSCs and returning OK result
to the MS that indicates its ready status.
Related: OS#6135
Change-Id: I731545a3a0d0804289e24a7769e13bfd3f645132
---
M include/osmocom/hlr/hlr_sms.h
M src/hlr.c
M src/hlr_sms.c
3 files changed, 75 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/51/34451/1
diff --git a/include/osmocom/hlr/hlr_sms.h b/include/osmocom/hlr/hlr_sms.h
index b3beea6..0a75b05 100644
--- a/include/osmocom/hlr/hlr_sms.h
+++ b/include/osmocom/hlr/hlr_sms.h
@@ -30,3 +30,4 @@
void forward_mo_sms(struct osmo_gsup_req *req);
void forward_mt_sms(struct osmo_gsup_req *req);
+void rx_ready_for_sm_req(struct osmo_gsup_req *req);
diff --git a/src/hlr.c b/src/hlr.c
index eae9e84..8ad3dfc 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -563,6 +563,9 @@
case OSMO_GSUP_MSGT_MT_FORWARD_SM_REQUEST:
forward_mt_sms(req);
break;
+ case OSMO_GSUP_MSGT_READY_FOR_SM_REQUEST:
+ rx_ready_for_sm_req(req);
+ break;
default:
LOGP(DMAIN, LOGL_DEBUG, "Unhandled GSUP message type %s\n",
osmo_gsup_message_type_name(req->gsup.message_type));
diff --git a/src/hlr_sms.c b/src/hlr_sms.c
index ac4d50d..918d094 100644
--- a/src/hlr_sms.c
+++ b/src/hlr_sms.c
@@ -219,3 +219,59 @@
strlen(subscr.vlr_number) + 1);
osmo_gsup_forward_to_local_peer(req->cb_data, &dest_peer, req, NULL);
}
+
+/***********************************************************************
+ * READY-FOR-SM handling
+ *
+ * An MSC indicates that an MS is ready to receive messages. If one
+ * or more SMSCs have previously tried to send MT SMS to this MS and
+ * failed, we should pass this READY-FOR-SM message to them so they
+ * can resend their queued SMS right away. But which SMSC do we
+ * forward the message to? 3GPP specs call for a complicated system
+ * where the HLR remembers which SMSCs have tried and failed to deliver
+ * MT SMS, and those SMSCs then get notified - but that design is too
+ * much complexity for the current state of Osmocom. So we keep it
+ * simple: we iterate over all configured SMSCs and forward a copy
+ * of the READY-FOR-SM.req message to each.
+ *
+ * Routing of responses is another problem: the MSC that sent
+ * READY-FOR-SM.req expects only one response, and one can even argue
+ * that the operation is a "success" from the perspective of the MS
+ * irrespective of whether each given SMSC handled the notification
+ * successfully or not. Hence our approach: we always return success
+ * to the MS, and when we forward copies of READY-FOR-SM.req to SMSCs,
+ * we list the HLR as the message source - this way SMSC responses
+ * will terminate at this HLR and won't be forwarded to the MSC.
+ ***********************************************************************/
+
+static void forward_req_copy_to_smsc(const struct osmo_gsup_req *req,
+ const struct hlr_smsc *smsc)
+{
+ const char *my_ipa_name = g_hlr->gsup_unit_name.serno;
+ struct osmo_gsup_message forward = req->gsup;
+ struct osmo_ipa_name smsc_ipa_name;
+
+ /* set the source to this HLR */
+ forward.source_name = (const uint8_t *) my_ipa_name;
+ forward.source_name_len = strlen(my_ipa_name) + 1;
+
+ /* send it off */
+ LOG_GSUP_REQ(req, LOGL_INFO, "Forwarding source-reset copy to %s\n",
+ smsc->name);
+ osmo_ipa_name_set(&smsc_ipa_name, (const uint8_t *) smsc->name,
+ strlen(smsc->name) + 1);
+ osmo_gsup_enc_send_to_ipa_name(g_hlr->gs, &smsc_ipa_name, &forward);
+}
+
+void rx_ready_for_sm_req(struct osmo_gsup_req *req)
+{
+ struct hlr_smsc *smsc;
+
+ /* fan request msg out to all SMSCs */
+ llist_for_each_entry(smsc, &g_hlr->smsc_list, list)
+ forward_req_copy_to_smsc(req, smsc);
+
+ /* send OK response to the MSC and the MS */
+ osmo_gsup_req_respond_msgt(req, OSMO_GSUP_MSGT_READY_FOR_SM_RESULT,
+ true);
+}
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/34451?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I731545a3a0d0804289e24a7769e13bfd3f645132
Gerrit-Change-Number: 34451
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-MessageType: newchange