Compare commits

...

2 Commits

Author SHA1 Message Date
Mychaela N. Falconia
ca45040747 !store-imei: report IMEI in the log without requiring a subscriber
When store-imei is configured, a subscriber record is expected to exist
for receiving that IMEI storage - this mode is expected to be used
together with subscriber-create-on-demand.  However, what about
operation without store-imei?  Standard OsmoHLR still requires a
subscriber record to be present, even though the IMEI is only
emitted into log output.  Change this aspect, and also change the
log message format to make it friendlier to tools that will extract
IMSI-IMEI correspondence pairs from syslog.

Change-Id: If1fae788e943c6ffdb632751899ab5d3286b3428
2024-08-13 04:36:54 +00:00
Mychaela N. Falconia
56ed3a309b own-msisdn: say "Your phone number is %s"
The own-msisdn internal USSD handler in OsmoHLR traditionally says
"Your extension is %s", where %s is the MSISDN in the subscriber db.
However, Themyscira Wireless does not use private extensions, instead
we assign a real, globally routable E.164 number (in the North American
Numbering Plan, beginning with 1) to every subscriber, and our MSISDNs
in OsmoHLR subscriber db are these real E.164 numbers.  Therefore,
the wording "Your extension is 1xxxxxxxxxx" looks very wrong to an
end user, instead it is much better to say "Your phone number is ".

Change-Id: I45f637c532a0397de69e1e385402e42a9a0b3ed2
2024-08-13 04:36:40 +00:00
2 changed files with 4 additions and 8 deletions

View File

@@ -420,13 +420,9 @@ static int rx_check_imei_req(struct osmo_gsup_req *req)
return -1;
}
} else {
/* Check if subscriber exists and print IMEI */
LOGP(DMAIN, LOGL_INFO, "IMSI='%s': has IMEI = %s (consider setting 'store-imei')\n", gsup->imsi, imei);
struct hlr_subscriber subscr;
if (db_subscr_get_by_imsi(g_hlr->dbc, gsup->imsi, &subscr) < 0) {
osmo_gsup_req_respond_err(req, GMM_CAUSE_INV_MAND_INFO, "IMSI unknown");
return -1;
}
/* ThemWi change: report IMSI-IMEI correspondence in syslog */
LOGP(DMAIN, LOGL_NOTICE, "IMEI REPORT: IMSI=%s has IMEI=%s\n",
gsup->imsi, imei);
}
/* Accept all IMEIs */

View File

@@ -386,7 +386,7 @@ static int handle_ussd_own_msisdn(struct ss_session *ss,
if (strlen(subscr.msisdn) == 0)
snprintf(buf, sizeof(buf), "You have no MSISDN!");
else
snprintf(buf, sizeof(buf), "Your extension is %s", subscr.msisdn);
snprintf(buf, sizeof(buf), "Your phone number is %s", subscr.msisdn);
ss_tx_to_ms_ussd_7bit(ss, req->invoke_id, buf);
break;
case -ENOENT: