mechanism for determining IP/IMSI mapping
higher-level applications want to know the IP address allocated for a given IMSI (and vice-versa)
The details are TBD, but it might be easiest if there was an event-based interface every time the GGSN allocates a new address or releases an existing address. The application(s) then would simply subscribe to such a feed of events and keep their own list locally.
#5 Updated by msuraev almost 2 years ago
One option would be to implement standalone tool which translate CTRL interface TRAP events into Server-Side Events https://html.spec.whatwg.org/multipage/comms.html#server-sent-events
#6 Updated by laforge almost 2 years ago
- OpenGGSN would export every IP/IMSI mapping that's being created as a TRAP on the Osmocom control interface (this is a "osmocom standard" interface to get programmatig access to internal data, see e.g. chapter 6 adn 12 of http://ftp.osmocom.org/docs/latest/osmobsc-usermanual.pdf for the NITB)
- an external tool is developed for translating a REST / JSON interface into the control interface
- mapping TRAP to server-sent events, i.e. every time a mapping is created or removed, a server-side event (containing a JSON object) is delivered via HTTP to the client
- as a side-effect, it also translates control interface get/set operations into a REST based interface, which might be useful beyond the topic of this particular use case.
#12 Updated by msuraev almost 2 years ago
- % Done changed from 40 to 60
The python prototype has been merged as openbsc/contrib/ctrl2sse.py
It can already be tested for SET/GET/TRAP operations over existing control interfaces.
The TRAP2SSE functionality can be tested using modified eventsource-client from https://github.com/guyzmo/event-source-library - the only necessary modification is add /sse/ prefix to hardcoded url - see help embedded into ctrl2sse.py
In general, it should be compatible with any http client which supports Server-Sent Events.
The missing bits are openggsn patches with control interface implementation and corresponding change to libosmocore which is under review in gerrit #649.
#14 Updated by msuraev over 1 year ago
Necessary changes have been merged to upstream event-source-library project: https://github.com/guyzmo/event-source-library
It can be installed with "pip install --user -e ./"
After that once proxy tool started "./openbsc/contrib/ctrl2sse.py -c 4257" you can connect to it using example client supplied with event-source-library as follows: "eventsource-client osmocom -r 5000 -P 6969 -x sse" to start receiving json-formatted events (see comments in ctrl2sse.py for schema description).
Hi Max. I was wondering where I can fin the documentation for this ctrl2sse tool. I thought at the time this was developed, we agreed that it would have to be documented with a full example. I couldn't find any reference in the osmocom wiki or in the osmo-gsm-manuals, though. Thanks for your update!