aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2014-02-05 18:56:17 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-05-22 14:39:16 +0200
commitcab6e7528c475d6aee687001a6146e5f20d8f53d (patch)
tree5d172538444f1b503ff3d2a7a09da5c139ad815f /openbsc/tests
parent038f97a69fe58d2bcb6cabcb82b3485f7d622ed2 (diff)
mgcp: add voice muxer support
This patch adds the voice muxer. You can use this to batch RTP traffic to reduce bandwidth comsuption. Basically, osmux transforms RTP flows to a compact batch format, that is later on decompacted to its original form. Port UDP/1984 is used for the muxer traffic between osmo-bsc_nat and osmo-bsc_mgcp (in the BSC side). This feature depends on libosmo-netif, which contains the osmux core support. Osmux is requested on-demand via the MGCP CRCX/MDCX messages (using the vendor-specific extension X-Osmux: on) coming from the BSC-NAT, so you can selectively enable osmux per BSC from one the bsc-nat.cfg file, so we have a centralized point to enable/disable osmux. First thing you need to do is to accept requests to use Osmux, this can be done from VTY interface of osmo-bsc_nat and osmo-bsc_mgcp by adding the following line: mgcp ... osmux on osmux batch-factor 4 This just initializes the osmux engine. You still have to specify what BSC uses osmux from osmo-bsc_nat configuration file: ... bsc 1 osmux on bsc 2 ... bsc 3 osmux on In this case, bsc 1 and 3 should use osmux if possible, bsc 2 does not have osmux enabled. Thus, you can selectively enable osmux depending on the BSC, and we have a centralized point for configuration from the bsc-nat to enable osmux on demand, as suggested by Holger. At this moment, this patch contains heavy debug logging for each RTP packet that can be removed later to save cycles. The RTP ssrc/seqnum/timestamp is randomly allocated for each MDCX that is received to configure an endpoint.
Diffstat (limited to 'openbsc/tests')
-rw-r--r--openbsc/tests/bsc-nat/Makefile.am4
-rw-r--r--openbsc/tests/bsc-nat/bsc_nat_test.c2
-rw-r--r--openbsc/tests/mgcp/Makefile.am2
3 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/tests/bsc-nat/Makefile.am b/openbsc/tests/bsc-nat/Makefile.am
index d773f2664..0d145a664 100644
--- a/openbsc/tests/bsc-nat/Makefile.am
+++ b/openbsc/tests/bsc-nat/Makefile.am
@@ -1,5 +1,5 @@
AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOSCCP_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS)
+AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOSCCP_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(LIBOSMONETIF_CFLAGS) $(COVERAGE_CFLAGS)
AM_LDFLAGS = $(COVERAGE_LDFLAGS)
EXTRA_DIST = bsc_nat_test.ok bsc_data.c barr.cfg barr_dup.cfg prefixes.csv
@@ -21,4 +21,4 @@ bsc_nat_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \
$(top_builddir)/src/libcommon/libcommon.a \
$(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lrt \
$(LIBOSMOSCCP_LIBS) $(LIBOSMOVTY_LIBS) \
- $(LIBOSMOABIS_LIBS)
+ $(LIBOSMOABIS_LIBS) $(LIBOSMONETIF_LIBS)
diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c
index bed5b8079..e9567c708 100644
--- a/openbsc/tests/bsc-nat/bsc_nat_test.c
+++ b/openbsc/tests/bsc-nat/bsc_nat_test.c
@@ -630,7 +630,7 @@ static void test_mgcp_rewrite(void)
char *input = strdup(orig);
output = bsc_mgcp_rewrite(input, strlen(input), 0x1e,
- ip, port, &payload_type);
+ ip, port, 0, &payload_type);
if (payload_type != -1) {
fprintf(stderr, "Found media payload type %d in SDP data\n",
diff --git a/openbsc/tests/mgcp/Makefile.am b/openbsc/tests/mgcp/Makefile.am
index 71bf8c089..79e0bf49d 100644
--- a/openbsc/tests/mgcp/Makefile.am
+++ b/openbsc/tests/mgcp/Makefile.am
@@ -12,4 +12,4 @@ mgcp_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \
$(top_builddir)/src/libmgcp/libmgcp.a \
$(top_builddir)/src/libcommon/libcommon.a \
$(LIBOSMOCORE_LIBS) -lrt -lm $(LIBOSMOSCCP_LIBS) $(LIBOSMOVTY_LIBS) \
- $(LIBRARY_DL)
+ $(LIBRARY_DL) $(LIBOSMONETIF_LIBS)