Commit Graph

417 Commits

Author SHA1 Message Date
Neels Hofmeyr a820ea1f67 implement removal of MSISDN
Add the first "official" way to remove the MSISDN from a subscriber entry, to
go back to 'MSISDN: none' like just after 'subscriber create'.

Add VTY command 'subscriber <ID> update msisdn none' to drop the MSISDN from
the subscriber. (Like 'subscriber <ID> update aud3g none')

Add DB_STMT_DELETE_MSISDN_BY_IMSI.

In db_subscr_update_msisdn_by_imsi(), allow passing a NULL msisdn, and if NULL,
call above delete SQL statement.

Change-Id: I15419105ea461137776adb92d384d8985210c90e
2018-12-02 20:16:31 +01:00
Neels Hofmeyr 8aa780bf80 add 'show subscriber' command, alias for 'subscriber ... show'
When I wrote the osmo-hlr subscriber command, I failed to heed the common
'show foo' scheme and instead created a 'subscriber [...] show' command.
Relieve that weirdness by creating an alias that has 'show' at the start.

Arrange string macros so that the 'show subscriber' cmd doesn't end in a space
(the SUBSCR macro ends in a space ' ' to implicitly include the space to
commands like 'create', 'show', 'update').

Add the new command to test_nodes.vty and test_subscriber.vty.

Change-Id: I01ce9b0868302d40ed05c6a588316a194d6071e4
2018-12-02 20:06:24 +01:00
Oliver Smith f08da2459b build manuals moved here from osmo-gsm-manuals.git
Moved to doc/manuals/, with full commit history, in preceding merge commit.
Now incorporate in the build system.

Build with:

$ autoreconf -fi
$ ./configure --enable-manuals
$ make

Shared files from osmo-gsm-manuals.git are found automatically if
- the repository is checked out in ../osmo-gsm-manuals; or
- if it osmo-gsm-manuals was installed with "make install"; or
- OSMO_GSM_MANUALS_DIR is set.

Related: OS#3385
Change-Id: I52b7b06fddd77c6dc272004f434e9e7651f6b349
2018-11-27 18:02:06 +01:00
Neels Hofmeyr 62ce834fbf Merge history from osmo-gsm-manuals.git
Change-Id: I175d694bea8f0be4edb2be75de780dee82469849
2018-11-27 18:01:37 +01:00
Neels Hofmeyr bf6b4eb0b9 hlr: update vty reference
Change-Id: I5a2322c0488cb36b089303bbfec5d4db18c41099
2018-11-27 18:01:17 +01:00
Daniel Willmann 79efdf3474 OsmoBSC/HLR/MSC: Fix default config file name
Mention that the default is not openbsc.cfg, but osmo-*.cfg

Change-Id: I139e6004e28d6f918f31792e634214a6153edd0e
2018-11-27 18:01:17 +01:00
Harald Welte b41394a700 hlr: Add chapter on USSD configuration
Change-Id: Ie5196ece9f340303bcb4868e3333a9698e28c3d0
2018-11-27 18:01:17 +01:00
Neels Hofmeyr 0c331abdbc hlr: clarify that aud_3g also applies to 2G
(and tweak wording)

Related: OS#3091
Change-Id: I2ae03625ccc1364f953db0611e9a29d935dab803
2018-11-27 18:01:17 +01:00
Harald Welte 25e716c849 vty-ref: Update URI of docbook 5.0 schema
... to match the /etc/xml/catalog file on debian (no "www" in hostname)

Change-Id: Id9f3579c7f2bc3af13fe30b5268f249b6f59ed0d
2018-11-27 18:01:17 +01:00
Neels Hofmeyr 92e49ef363 OsmoHLR: update vty reference
Add new (generic) logging commands, talloc context print commands.
Add the jitter buffer logging category.

Remove the common commands from the individual sections.

Change-Id: I8e92c821b26908d4baa37745c57b9e15bda2a373
2018-11-27 18:01:17 +01:00
Harald Welte 95380ab037 share chapters/gsup.adoc from OsmoSGSN to OsmoMSC + OsmoHLR
Since the NITB split, GSUP is used in all three network elements, so
make the protocol a shared chapter

Change-Id: Id2d7c27ef16eb0ebe5f60d625a1fcf42f1603f4f
2018-11-27 18:01:17 +01:00
Neels Hofmeyr 849bfd0bef OsmoHLR: update section 'Bootstrap the Database'
Change-Id: I1b7b99cc77d8cd8cce42e7cf93f5e2cd3c2344db
2018-11-27 18:01:17 +01:00
Neels Hofmeyr 7e2d3c7f4c OsmoHLR: update ctrl description and examples
The patch to refactor ctrl commands to osmo-hlr, change
I98ee6a06b3aa6a67adb868e0b63b0e04eb42eb50, was tweaked. Adjust accordingly.

Change-Id: Ie4da6115bb2eb005a9f95bf4de1bfe36468fd607
2018-11-27 18:01:17 +01:00
Neels Hofmeyr 8f725ae655 OsmoHLR: add make target to update the example ctrl and vty files
Change-Id: I88027396ec15101697a79aa5e964387d47abdae2
2018-11-27 18:01:17 +01:00
Neels Hofmeyr 1ed4bb4ff1 refactor Makefile build rules, don't use the FORCE
The initial goal was to make sure we don't have overall FORCE rules causing
unnecessary rebuilds -- annoying while writing documentation. As I looked
through possible dependencies, I finally understood what's going on here.

Remove code dup and nicely sort which belongs where in build/Makefile.*.inc. In
each, describe in a top comment how to use it, and also unify how they are
used:

- Rename Makefile.inc to Makefile.docbook.inc and refactor
- Add Makefile.vty-reference.inc
- Add Makefile.common.inc

Make sure that we accurately pick up all dependencies.

Drop use of the macro called 'command', that silenced the actual command lines
invoked and replaced them with short strings: it obscures what is actually
going on and makes the Makefiles hard to read and understand.

Each manual's makefile is greatly reduced to few definitions and a Makefile
include, e.g. one for asciidoc, one for VTY reference.

Move common/bsc_vty_additions.xml to OsmoBSC/vty/libbsc_vty_additions.xml, link
from OsmoNITB. It applies only to OsmoBSC and OsmoNITB.

Add a script that combines a VTY reference file with *all* additions files
found in a manual's vty/ dir. Call this from Makefile.vty-reference.inc.

Change-Id: I9758e04162a480e28c7dc83475b514cf7fd25ec0
2018-11-27 18:01:17 +01:00
Neels Hofmeyr 25dd785157 add OsmoHLR manual, OsmoHLR VTY reference
Change-Id: Ieb6a362a26a7e65199f68f5cd32d9b6b0e5d0fbf
2018-11-27 18:01:17 +01:00
Neels Hofmeyr 4f5f6f83f3 Importing history from osmo-gsm-manuals.git
Change-Id: I2907e34a3bdba41142ffd4be43ce0e3e9a86aa42
2018-11-27 17:59:14 +01:00
Neels Hofmeyr e66e525e09 fix and re-enable osmo_hlr_subscriber_update_notify()
Send updated subscriber data out to exactly those GSUP clients that match the
last LU operations (depending on each client sending distinct identification).

As this adds logging on DLGSUP, also change adjacent GSUP related logging from
DMAIN to DLGSUP.

Related: OS#2785
Change-Id: I7c317de8329d9a115d072fc61ddb9abc21b7e8d8
2018-10-16 13:04:00 +02:00
Vadim Yanitskiy 4a4bdcdf97 hlr_ussd.c: fix: reject 'structured' SS requests
As we don't store any SS related information (e.g. call forwarding
preferences) in the database, we don't handle 'structured' SS
requests at all. Let's reject them by sending error message
with FACILITY_NOT_SUPPORTED code.

Change-Id: Ia1317c5d372a42473cce65c0c985103e43be77fd
Related: OS#3651
2018-10-12 21:46:11 +02:00
Neels Hofmeyr cb364bb429 store gsup peer upon accepting LU
Store the GSUP client's IPA_IDTAG_SERNR in vlr_number or sgsn_number (depending
on is_ps), just before sending the Insert Subscriber Data message after a
successful LU Req. Log about it.

Original patch: Ib2611421f3638eadc361787af801fffe9a34bd8a by laforge
Related: OS#2796

Change-Id: If438664faa5d68404f465f8b2002c6d03bbf3ceb
2018-10-05 17:55:18 +02:00
Neels Hofmeyr d646207553 more space for vlr_number and sgsn_number
To be able to handle our 20 chars long IPA tags, enlarge the vlr_number and
sgsn_number storage in struct hlr_subscriber.

Technically, osmo-hlr should be able to store any type of Global Title, blob of
arbitrary size. For our purposes, 32 is enough for now.

Related: OS#2796
Change-Id: I0121f1c4dbda3a076d780a3834281b21dab85493
2018-10-04 14:31:18 +02:00
Neels Hofmeyr 6cee799d5e fix is_ps logic in rx_upd_loc_req(), store CS as is_ps = false
A missing 'else' in rx_upd_loc_req() causes *all* clients to be indicated as
is_ps=true regardless of the GSUP CN Domain IE that was received.

Replace that odd if cascade with a switch() that fixes the flawed logic. Hence
osmo-hlr now correctly indicates each client's is_ps, iff the client sends CN
Domain IEs in GSUP LU Request messages.

Related: OS#2796, OS#3601
Change-Id: I2c5fa9f5cae25cfd66afbf088303edff7d045a00
2018-09-28 03:01:02 +02:00
Harald Welte c88bdab96d fix VTY tests to expect well-formed output of logging configuration
In libosmocore Change-Id Ia75c7067284ea225cffe13ca71bad05a7747ae66
we fixed the generation (saving) of logging configuration to use
one level of indent, rather than the previous broken implementation
with two levels of indent.  This means we have to adjust the VTY
test expectations here.

Change-Id: I9282a59bbfad4cfc86e86c1212c74cccfe187ff8
2018-09-26 09:23:37 +02:00
Harald Welte 607ce5ca93 osmo-hlr.cfg: Ensure well-formed config file example
Change-Id: I136fdda6f4088f2e8094eed6fe9481f5d6476d4f
2018-09-25 20:36:40 +02:00
Neels Hofmeyr ccdb970c57 make: always allow running python tests manually
Keep the rules to run the external-tests in tests/Makefile available for
invocation, to allow conveniently launching the tests manualy without the need
to pass --with-external-tests to ./configure first.

Change-Id: Ic28dbeabddee6b41af12b977e3fe59e663ee51a1
2018-09-18 15:09:05 +02:00
Neels Hofmeyr a5b36a0904 tweak example config
Remove 'logging level all' setting.
Tweak some more logging details (to my current favorite).

Add USSD example for showing the IMSI.

Change-Id: I8296832704d779df5f1b20a595b568c99780e64d
2018-09-18 15:09:05 +02:00
Neels Hofmeyr 13000d8d14 fix build: adjust test_nodes.vty to logging change
Since libosmocore
commit eb9284ba577d338f74653fcf09ebca0c397823eb
Change-Id I36f17c131cc70ce5a1aef62fd9693097de230cd4
"logging vty: deprecate 'all', introduce 'force-all'"
,
'logging level all' is replaced by 'force-all'.
Adjust the test script to not expect 'logging level all'.

While at it, remove some more expectations that aren't important.

Change-Id: Ia170f8416ebb60c499d2536078f43f28b61d0554
2018-09-13 18:14:05 +02:00
Pau Espin 7ebfd065da Install sample cfg file to /etc/osmocom
Change-Id: I2ac73f426d9489fcd64c2eea547eb1f3ec26ae2c
2018-09-12 18:31:09 +02:00
Pau Espin 966fcb2ca8 Move doc/Makefile.am to doc/examples/Makefile.am
Change-Id: I89ef3abe86e7ceb7b389ac1cb227ea065bfbce37
2018-09-12 18:28:24 +02:00
Pau Espin 6fe1c2220a Install systemd services with autotools
Change-Id: Id81ae8e2d8a2c9456ac0dac2c30c0d24dab3b694
2018-09-10 16:09:59 +02:00
Harald Welte 0da9f2f19c libosmo-gsup-client: License is GPLv2-or-later
Fix the unintentional AGPLv3-or-later license header in gsup_client.c

Change-Id: I6378bd59fdbe8d95cd6132a1cbc40ae29b558c42
2018-09-03 15:19:24 +02:00
Harald Welte 1eb9869d81 USSD: Fix "ussd default-route"
Before this patch, the default route logic was not implemented.  The
user could specify a default-route, but it wouldn't be used by the
actual routing logic.  Let's fix that.

Change-Id: I0b04a75dc297f088f13da413d08c52e0747e46e6
2018-08-08 08:58:54 +02:00
Vadim Yanitskiy 3adb33de93 hlr_ussd.c: avoid using CR and NL in IUSE responses
According to GSM TS 03.38, section 6.1.2.1, CR symbol at the end
is optional, and moreover libosmogsm encoding API will carry
about the bit padding itself.

Change-Id: I09e8a67758698f3b7a578eab956311e269d091ee
2018-08-08 06:21:26 +00:00
Harald Welte 791ea72ee4 debian: Make libosmo-gsup-client-dev depend on libosmo-gsup-client0
The -dev package should depend on the binary package.

Change-Id: I01e58788e8485cadecad8b8788887743b41b9f1f
2018-08-06 18:38:20 +02:00
Harald Welte 9f7b69a618 gitignore: Add .tarball-version
Change-Id: I2ed792ef248e2b62f63acc7d83add240df03336f
2018-08-06 14:23:33 +02:00
Vadim Yanitskiy e6c839ed2d hlr_ussd.c: fix: properly print a EUSE / IUSE name
We need to distinguish between both EUSE and IUSE, and properly
print their names. Otherwise, garbage is printed in case of IUSE.

Change-Id: I497e7c1fe41279afdb1256ee69e166066a6462bb
2018-08-03 00:00:28 +07:00
Vadim Yanitskiy b93c44f32e USSD/hlr_vty.c: print error if EUSE is not found
Change-Id: I18045c5e544a99b2414a6f0268f1343df119b9f3
2018-08-02 23:58:32 +07:00
Vadim Yanitskiy a05efe8803 hlr_ussd.h: drop meaningless forward declaration
Change-Id: I70a5c7c83c2356b779fb1ea7ffe07ccc1e279c22
2018-08-01 10:24:06 +00:00
Martin Hauke 764514198b debian: Fix typo in package description
Change-Id: Iaa5a3b9e249ce493221569cf9411cc04c4044a0c
2018-07-31 20:13:09 +02:00
Harald Welte 5198609a5e pkg-config: Fix libosmo-gsup-client pkg-config file
Both description and actual "Libs" line were broken.

Change-Id: I92e625418d53a2f17feca87c72624b84183f8cdb
2018-07-31 19:37:45 +02:00
Harald Welte 7c2f430fc5 debian: Add sub-package for libosmo-gsup-client
Change-Id: Iad227bb477d64da30dd6bfbbe1bd0c0a55be9474
2018-07-31 19:19:43 +02:00
Vadim Yanitskiy 633fddebcd Update .gitignore: ignore osmo-euse-demo
Change-Id: I1e2fb003d507a00f9255e021dd8956269f0657ee
2018-07-31 06:52:16 +00:00
Vadim Yanitskiy 7c5e930aa8 hlr_ussd.h: use proper libc headers
Change-Id: I2b9485be08c6cbf188ed1f4059ff28ab65c61dbf
2018-07-31 01:38:40 +07:00
Vadim Yanitskiy 83df349045 hlr_ussd.h: add #pragma once include guard
Change-Id: Iba9470e11af2f2609486b9b0b6bfa3207b883a3a
2018-07-31 01:17:25 +07:00
Vadim Yanitskiy 05fe0233d2 tests/Makefile.am: also remove temporary sqlite files
The osmo_verify_transcript_*.py do terminate the osmo-hlr process
in some unusual way, so the database file is not closed properly.

Let's remove temporary files after the tests execution.

Change-Id: I9e4c98e86c1d6b627bfee1acb4fa116460687483
2018-07-30 16:37:27 +00:00
Vadim Yanitskiy 2781bb767e Update .gitignore: add missing build products
Change-Id: I71809105c631703477d8226ba28a57121807b5ed
2018-07-30 16:37:27 +00:00
Vadim Yanitskiy f473c7b23c hlr_vty_subscr.c: fix subscriber creation command help
Change-Id: Id8dda53cdd10aeedf5451109f9e61d6438c3e09b
2018-07-30 16:37:27 +00:00
Harald Welte dab544e14b USSD: Add support for internal USSD handlers
There are some requests that are best served inside the HLR, as it
has access to subscriber information such as MSISDN and IMSI.

This unfortunately required quite some restructuring of the USSD
related structures including the VTY syntax for adding routes.

The default config file has been updated to replicate the *#100#
built-in behavior of old OsmoNITB.

Closes: OS#2566
Change-Id: I1d09fab810a6bb9ab02904de72dbc9e8a414f9f9
2018-07-30 17:43:10 +02:00
Harald Welte 7d29d59292 Add osmo-euse-demo as minimalistic test of a External USSD (EUSE) handler
This is a small program which simply echo's the USSD request message it
gets in a quote back to the sender.  Its purpose is to illustrate how
EUSEs can be implemented using libosmo-gsup-client.

Change-Id: I3fb8554ca329cb609c591058254117006f665e73
2018-07-30 17:32:15 +02:00
Harald Welte 55d32a1e3c USSD: fix null-pointer deref in "default-route" vty/config cmd
Change-Id: I5ebaea77be6beaf88771fb584477358a4d80a47f
2018-07-30 17:26:35 +02:00