Project

General

Profile

Bug #1646

mechanism for determining IP/IMSI mapping

Added by laforge over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
03/11/2016
Due date:
% Done:

100%

Estimated time:
Spec Reference:

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.

History

#1 Updated by laforge over 2 years ago

  • Assignee set to neels

#2 Updated by laforge over 2 years ago

  • Priority changed from Normal to High

#3 Updated by neels about 2 years ago

My awareness level of this issue so far is very low.

#4 Updated by laforge about 2 years ago

  • Assignee changed from neels to msuraev

#5 Updated by msuraev about 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 about 2 years ago

In slightly more detail, the proposal is:
  • 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.

#7 Updated by msuraev about 2 years ago

  • Status changed from New to Stalled

Waiting for OK on proposed design.

#8 Updated by laforge about 2 years ago

please update ticket status. You should have been in Cc of the mail approving this approach.

#9 Updated by msuraev about 2 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.

#10 Updated by msuraev about 2 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.

#11 Updated by msuraev about 2 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.

#12 Updated by msuraev about 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.

#13 Updated by msuraev almost 2 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.

#14 Updated by msuraev almost 2 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).

#15 Updated by msuraev almost 2 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.

#16 Updated by laforge almost 2 years ago

  • Status changed from Resolved to Closed

#17 Updated by laforge about 1 year 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!

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)