Commit Graph

73 Commits

Author SHA1 Message Date
Max bd33f54444 bsc_control.py: use ipa.py module
Simplify code by using Ctrl implementation from ipa.py

Change-Id: I25fd7cd4b42126354b72abd60a3837be5d13e159
2016-12-13 14:47:32 +01:00
Max 82caa3e9b7 bsc_control.py: style corrections
* replace some tabs indent with spaces
* add comment to make sure no new tabs are used for indentation by emacs
* remove unnecessary parenthesis

Change-Id: Ib79fd4317d40ee4fd87b090b9faf8ebaf4bfca64
2016-12-13 14:47:32 +01:00
Max 688231331b Add twisted-based IPA multiplex
Add sample applications using twisted framework for IPA and CTRL
multiplex.

Change-Id: I07559df420b7fe8418f3412f45acd9a375e43bc5
Related: SYS#3028
2016-12-13 14:47:32 +01:00
Max c3b94f92c5 Add IPA multiplex
Add base class and derived Ctrl class implementing ctrl-specific
routines.

Change-Id: I41e37ec143183e422c0b31af95d183bd84f0c328
Related: SYS#3028
2016-12-13 10:52:23 +00:00
Max 1f6a9ba7e5 Add web proxy for control interface
Add web application exposing Control Interface over web. All of SET, GET
and TRAP are fully supported.

Notice: TRAP is converted into 'Server-sent events' according to RFC
6202, see also https://www.w3.org/TR/eventsource/ - this requires
corresponding client.

Due to use of special prefix modified version of python
eventsource-client is necessary ATM.

Change-Id: I87d40c80061f8b3d02d656ab8cadabbfb871b461
Related: OS#1646
2016-08-11 06:05:39 +00:00
Max dbb6392368 Add python functions to get/set ctrl variables
Add get_var and set_var functions which handle requested variable while
checking for proper response and id. Split header handling into separate
function.

Change-Id: I08705963c277bd93a011193dd7451a626d606c21
Related: OS#1646
2016-08-11 06:05:39 +00:00
Max 2a63d01c1e Use random operation id
According to documentation for Control Interface Protocol <id> is "A
numeric identifier, uniquely identifying this particular operation",
hence it's best to be illustrated with random integer - use it as
default.

Fix override of id with previously used python-specific objects' id.

Change-Id: I32236c067360526f4e7ee4bbdba64c5137de696d
Related: OS#1646
2016-08-11 06:05:39 +00:00
Max 3ed214c7b0 Improve code re-use
Introduce explicit __main__ function to facilitate re-use of defined
python functions for ctrl interface.

Change-Id: I9bad8f0dd1d69bd28816bf047d85840e3411bb9c
Related: OS#1646
2016-07-29 18:23:21 +02:00
Holger Hans Peter Freyther 3a434f8e8c nat/ussd: Add an example of the USSD gateway side-channel
This adds a very basic, use once example in python on how to connect
and deal with the app specific payload and messages. The code is not
complete as the invokeId should be patched according to the initial
invoke. This excercise is left to future readers of that code.
2016-04-16 15:56:13 -04:00
Harald Welte d8352d75b6 remove old obsolete linux kernel and wireshark patches
Those were relevant in 2008/2009, but not today...

Also, move hlrsync to the contrib directory
2015-12-05 22:59:41 +01:00
Henning Heinold 0d8ac0eac0 systemd: use Wants for the dependency btw. osmo-bsc-mgcp and osmo-bsc
* osmo-bsc and osmo-bsc-mgcp are needed to run
* with Wants, both are started but can be indepently
  controlled via systemctl

Fixes: SYS#738
2014-11-11 17:59:49 +01:00
Holger Hans Peter Freyther cac2438b0c mgcp: Move the "codec" params to a struct
We might be offered multiple codecs by the remote and need to
switch between them once we receive data. Do this by moving it
to a struct so we can separate between proposed and current
codec. In SDP we can have multiple codecs but a global ptime.
The current code doesn't separate that clearly instead we write
it to the main codec.
2014-09-02 08:25:49 +02:00
Daniel Willmann 0e167fc974 systemd: Add Install section to service files
That way the services can be enabled with
> systemctl enable <service>
2014-08-21 10:19:50 +02:00
Holger Hans Peter Freyther cb6ad70994 mgcp: Change API to remove memory management from the name
Jacob pointed out that "free_endp" refers to the memory of
the endpoint being freed. What we want is actually a way to
release an endpoint (and the resource it allocated) or in
the case of the testcase/testapp initialize the data structure
correctly. Introduce two names for that.
2014-07-22 15:00:52 +02:00
Jacob Erlbeck 909fac6689 mgcp: Move transcoding to libmgcp
This patch moves the files relevant to transcoding from
src/osmo-bsc_mgcp to src/libmgcp and src/include/openbsc. Makefiles
and include directives are being updated accordingly.

Sponsored-by: On-Waves ehf
2014-06-05 14:08:53 +02:00
Jacob Erlbeck 07886d9b0a mgcp: Extend the CLI transcoding tool by ptime conversion
This modification allows it to set the number of samples per packet
that is written to the output.

Sponsored-by: On-Waves ehf
2014-06-05 14:08:53 +02:00
Jacob Erlbeck 42a833e89f mgcp: Add packet size (ptime) conversion
The current transcoder implemenation always does a 1:1 recoding
concerning the duration of a packet. So RTP timestamps and sequence
numbers are not modified.

This is not sufficient in some cases, e.g. when the BTS does only
allow for a single fixed ptime.

This patch decouples encoding from decoding and moves the decoded
samples to the state structure so that samples can be combined or
drain according to the packaging of incoming and outgoing packets.

This patch incorporates parts of Holger's experimental fixes in
0e669e05^..9eba68f9.

Ticket: OW#1111
Sponsored-by: On-Waves ehf
2014-06-05 14:08:45 +02:00
Jacob Erlbeck 136a319e91 mgcp: Add CLI tool to test audio conversion
This tool uses mgcp_transcode.c to convert audio data from stdin to
stdout.

Sponsored-by: On-Waves ehf
2014-06-05 14:00:47 +02:00
Jacob Erlbeck 543e11496e contrib/rtp: Use payload data files directly by gen_rtp_header
This adds a --frame-size option to read payload binary files with a
fixed frame size directly. The file must not contain RTP headers.
In addition '--rate' and '--duration' can be used to configure the
timing.

Sponsored-by: On-Waves ehf
2014-05-09 16:38:28 +02:00
Holger Hans Peter Freyther ebe55aa95a systemd: Add service for the osmo-sgsn
Fixes: SYS#175
2014-03-21 17:43:19 +01:00
Holger Hans Peter Freyther 2826cb58bb systemd: Saying these services restart once should be enough 2014-03-21 17:41:45 +01:00
Holger Hans Peter Freyther 162a0becc5 systemd: Remove the second occurance of Restart=always 2014-03-13 18:37:19 +01:00
Jacob Erlbeck eddaa9f19e contrib/rtp: Fix default payload case
There is the wrong record field selection being used to extract the
default value. It returns the tuple offset instead of the value.

This patch fixes this.

Sponsored-by: On-Waves ehf
2013-12-18 16:16:42 +01:00
Jacob Erlbeck e8ae1ac76a contrib/rtp: Add tool to create RTP state files
This tool provides the following features:
  - Output formats: state, C arrays
  - Optionally take RTP payload from existing state files
  - Generate streams with RTP timestamp jumps and/or delays
  - Set/change SSRC or payload type

Requires erlang to be installed.

Example:
  Generate 300 packets, set playout time offset to 1s, set
  RTP timestamp offset to 8000 (1s), generate another 100
  packets, the RTP payload is copied from rtp.state:

  ./gen_rtp_header.erl --type=98 --file=rtp.state  --
      0 300 0 --delay=1.0 100 8000

Sponsored-by: On-Waves ehf
2013-12-13 13:40:11 +01:00
Jacob Erlbeck 8b66649883 contrib/rtp: Enhance RTP replay tool
This patch adds optional parameters to pass the state file, the
destination address (default 127.0.0.1), the destination port
(default 4000), the source port (default 0). So it is called as
follows:

    gst rtp_replay.st -a [FILE [HOST [SOURCEPORT [DESTPORT]]]]

In addition, nonexistant FILEs are no longer created but opened
read-only instead.

Sponsored-by: On-Waves ehf
2013-12-13 13:40:09 +01:00
Holger Hans Peter Freyther 92ce02e644 rtp: Take the parameter from the arguments
$ gst rtp_replay.st -a FILE
2013-11-14 09:45:51 +01:00
Katerina Barone-Adesi e0aee7aaa9 Introduced support for external python tests
The test scripts warn about missing documentation, untested configs,
check common errors, and stub out testing individual VTY commands.
The scripts have been moved to the another osmocom repository,
python/osmo-python-tests

The features were requested by zecke.
2013-06-24 13:22:34 +02:00
Harald Welte ce1d742f27 dump_all_docs.py: Also extract documentation for SGSN 2013-02-07 15:00:31 +01:00
Holger Hans Peter Freyther 778695d0b4 mgcp: Add the disable color option to the mgcp binary 2012-09-20 16:06:56 +02:00
Holger Hans Peter Freyther 221ff66327 systemd: Add service units for the BSC, NITB and MGCP
Add simple systemd service units.
2012-09-20 16:06:56 +02:00
Holger Hans Peter Freyther 037065deee contrib: Add some SQL statements to remove old subscribers 2012-09-07 19:09:10 +02:00
Holger Hans Peter Freyther df49a983e2 docs: Do not remove too much from of the dumped online help
Use the len of the end and not the filename.
2012-08-14 00:14:36 +02:00
Holger Hans Peter Freyther f42e908cea contrib: Create a script that opens a SIP session before
Use the Smalltalk SIP implementation to create a call
and once the call has been established start the replay
using the commoncode. No patching of RTP occurs yet.
2012-08-05 16:10:32 +02:00
Holger Hans Peter Freyther 602559fd9f contrib: Move the shared code into a new file 2012-08-05 09:27:20 +02:00
Holger Hans Peter Freyther 4552d8061a contrib: Make the RTPReplay a a class so it can be shared 2012-08-05 09:25:25 +02:00
Holger Hans Peter Freyther d028807658 misc: Introduce a script tha generates the VTY reference
Update/Move/Create example configuration files for NiTB, BSC,
MGCP, NAT and the GbProxy. Create a script that starts, generates
the vty reference and terminates the application.
2012-07-28 15:30:09 +02:00
Holger Hans Peter Freyther 3fab3fdd24 rtp: Add a smalltalk script that can replay the state file. 2012-05-18 18:54:11 +02:00
Holger Hans Peter Freyther bea9a1206b rtp: Add lua script to split a trace by SSRC/streams
This can be used to replay RTP streams with more or less the
same timing as the original one.
2012-05-18 10:48:02 +02:00
Daniel Willmann 7c3298af9e contrib/bsc_control.py: Patch by Holger to handle connection resets 2011-08-22 23:45:56 +02:00
Daniel Willmann 203d865317 Add example to communicate through the control interface 2011-07-13 14:06:18 +02:00
Holger Hans Peter Freyther 384ef09920 nat: Add a test utility for the number rewriting 2011-05-31 00:37:48 +02:00
Holger Hans Peter Freyther 9cbdf1138f gprs: Add a lua script to collect buffers on the downlink.
This can be used to throw the data into GNUplot. It collects
the time (from the start of the trace), the buffer data in kbyte
and the number of buffered PDUs. It is assuming that no PDU
is delivered toward the target.
2011-05-10 18:45:35 +02:00
Holger Hans Peter Freyther 69ac83dd54 sms: Add a simple SystemTap probe to see SQL queries
This will proble all queries done in the system. This can
help to identify some issues with libdbi's performance.
2010-12-26 09:40:02 +01:00
Holger Hans Peter Freyther 9d277d3b33 sms: Add a script to query for unsent SMS
This is generating the query statement. It can be used to
play with database indexes and such.
2010-12-26 09:40:02 +01:00
Holger Hans Peter Freyther e3018c7ad6 sms: Add dummy script to create subscribers and SMS
This is creating 1000 subscribers and 30 SMS each. The SMS
itself is badly formatted (not a valid 7bit encoding) but
it should be enough for a stress test.
2010-12-26 09:40:02 +01:00
Holger Hans Peter Freyther e17c030b76 test: Add shell script to drop the OML in fixed intervals 2010-11-26 00:00:21 +01:00
Holger Hans Peter Freyther 09a925b117 bsc: Add script to hang up the MSC connection every 58s 2010-11-15 20:06:50 +01:00
Holger Hans Peter Freyther e9f7a0d3b9 bsc: Add wild scripts to do dial testing with a Motorola A1200 2010-11-15 20:06:50 +01:00
Holger Hans Peter Freyther 6b03831495 lua: Mention that the code has some bugs... 2010-10-20 19:21:49 +02:00
Holger Hans Peter Freyther fbf87a502d lua: Search for clear requests from the network as well 2010-10-20 19:21:07 +02:00