OSMO-MSLOOKUP-CLIENT(1) | User Commands | OSMO-MSLOOKUP-CLIENT(1) |
osmo-mslookup-client - osmo-mgw
Osmocom Media Gateway, to manage, connect and optionally transcode voice streams between different network elements such as BTSs and external entities like SIP. It is typically co-located with both OsmoBSC and OsmoMSC and controlled by them via IETF MGCP (Media Gateway Control Protocol).
https://osmocom.org/projects/osmo-mgw
osmo-mslookup-client version 1.8.0
[[delay-][timeout]@]service.number.id
--format -f csv (default)
--no-csv-headers -H
--format -f json
--daemon -d
--mdns-ip -m 239.192.23.42 -m ff08::23:42 --mdns-port -M 4266
--mdns-domain-suffix -D mdns.osmocom.org
--min-delay -t 1000 (in milliseconds)
--timeout -T 1000 (in milliseconds)
--socket -s /path/to/unix-domain-socket
--send -S <query> <age> <ip1> <port1> <ip2> <port2>
--quiet -q
--help -h
Copyright © 2019 by sysmocom - s.f.m.c. GmbH
Copyright © 2019 by Neels Hofmeyr <neels@hofmeyr.de> This program
is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
Standalone mslookup client for Distributed GSM
Receiving mslookup results means listening for responses on a socket. Often, integration (e.g. FreeSwitch dialplan.py) makes it hard to select() on a socket to read responses, because that interferes with the main program (e.g. FreeSwitch's dialplan.py seems to be integrated with an own select() main loop that interferes with osmo_select_main(), or an smpp.py uses smpplib.client.listen() as main loop, etc.).
This program provides a trivial solution, by outsourcing the mslookup main loop to a separate process. Communication is done via cmdline arg and stdout pipe or a (blocking) unix domain socket, results are returned in CSV or JSON format.
This can be done one-shot, i.e. exit as soon as the response has been determined, or in daemon form, i.e. continuously listen for requests and return responses.
About running a local daemon: it is unintuitive to connect to a socket to solve a problem of reading from a socket -- it seems like just more of the same problem. The reasons why the daemon is in fact useful are: - The osmo-mslookup-client daemon will return only those results matching
- A program can simply blockingly recv() from the osmo-mslookup-client socket
- Only one long-lived multicast socket needs to be opened instead of a new
Output is in CSV or json, see --format. The default is tab-separated CSV with these columns: query result last age v4_ip v4_port v6_ip v6_port
One-shot operation example: $ osmo-mslookup-client 1000-@sip.voice.12345.msisdn -f json {"query": "sip.voice.12345.msisdn", "result": "result", "last": true, "age": 5, "v4": ["1.2.3.7", "23"]} $
Daemon operation example: $ osmo-mslookup-client -s /tmp/mslookup -d (and a client program then connects to /tmp/mslookup, find an implementation example below)
Integrating with calling programs can be done by: - call osmo-mslookup-client with the query string as argument.
- invoke osmo-mslookup-client --socket /tmp/mslookup -d.
Python example clients for {CSV,JSON}x{cmdline,socket} can be found here: http://git.osmocom.org/osmo-hlr/tree/contrib/dgsm/osmo-mslookup-pipe.py http://git.osmocom.org/osmo-hlr/tree/contrib/dgsm/osmo-mslookup-socket.py
Copyright © 2019 by sysmocom - s.f.m.c. GmbH
Copyright © 2019 by Neels Hofmeyr <neels@hofmeyr.de> This program
is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
https://osmocom.org/projects/osmo-mgw/wiki
The full documentation for osmo-mslookup-client is maintained as a Texinfo manual. If the info and osmo-mslookup-client programs are properly installed at your site, the command
should give you access to the complete manual.
September 2024 | osmo-mslookup-client version 1.8.0 |