Bug #1646
closedmechanism for determining IP/IMSI mapping
100%
Description
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.
Updated by msuraev almost 8 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
Updated by laforge almost 8 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.
Updated by msuraev almost 8 years ago
- Status changed from New to Stalled
Waiting for OK on proposed design.
Updated by laforge almost 8 years ago
please update ticket status. You should have been in Cc of the mail approving this approach.
Updated by msuraev almost 8 years ago
- Status changed from Stalled to In Progress
- % Done changed from 0 to 10
Working on python prototype to test it with existing CTRL interface. Once it's ready will proceed with adding ctrl interface to openggsn.
Updated by msuraev almost 8 years ago
- % Done changed from 10 to 20
Control interface implementation for openggsn has been sent for review to ML. Python prototype supports SET and GET operations. TRAP needs to be integrated into event loop and tested.
Updated by msuraev almost 8 years ago
- % Done changed from 20 to 40
Test version is ready for review in gerrit #659. Note: json schema is still subject to change.
Updated by msuraev almost 8 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.
Updated by msuraev over 7 years ago
- % Done changed from 60 to 80
Changes for OpenGGSN has been submitted for review in gerrit # 1041, 1042. New version of upstream python library have to be tested.
Updated by msuraev over 7 years 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).
Updated by msuraev over 7 years ago
- Status changed from In Progress to Resolved
- Assignee changed from msuraev to laforge
- % Done changed from 80 to 100
All the missing bits have been merged to master.
Updated by laforge almost 7 years ago
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!