diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2017-09-27 15:51:34 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-11-07 20:57:51 +0000 |
commit | 39c609b7c924524172ad311bdf89f92b7ccf175a (patch) | |
tree | 23de9db3438dfcaf88ad27f082dbbf0dea140769 /src/osmo-bsc/osmo_bsc_main.c | |
parent | 9eb208fcfb75eedd2b1a45a2aa67893ce4726404 (diff) |
mgcp: use osmo-mgw to switch RTP streams
osmo-bsc currently negotiates the RTP stream directly with the
BTS and reports back the RTP IP/Port on the BTS. This works fine
for a single BTS, but for Handover the port/ip pointing to the
MSC side must not change, so an entity in between the BTSs and
the MSC is required.
Integrate the mgcp-client and use osmo-mgw to switch the RTP
streams.
Depends: osmo-mgw Ib5fcc72775bf72b489ff79ade36fb345d8d20736
Depends: osmo-mgw I44b338b09de45e1675cedf9737fa72dde72e979a
Depends: osmo-mgw I29c5e2fb972896faeb771ba040f015592487fcbe
Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a
Diffstat (limited to 'src/osmo-bsc/osmo_bsc_main.c')
-rw-r--r-- | src/osmo-bsc/osmo_bsc_main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 730e1db48..5d25701bb 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -44,6 +44,7 @@ #include <osmocom/abis/abis.h> #include <osmocom/sccp/sccp.h> +#include <osmocom/mgcp_client/mgcp_client.h> #define _GNU_SOURCE #include <getopt.h> @@ -206,6 +207,9 @@ int main(int argc, char **argv) exit(1); } + bsc_gsmnet->mgw.conf = talloc_zero(bsc_gsmnet, struct mgcp_client_conf); + mgcp_client_conf_init(bsc_gsmnet->mgw.conf); + bts_init(); libosmo_abis_init(tall_bsc_ctx); @@ -274,6 +278,15 @@ int main(int argc, char **argv) } } + bsc_gsmnet->mgw.client = mgcp_client_init(bsc_gsmnet, bsc_gsmnet->mgw.conf); + + if (mgcp_client_connect(bsc_gsmnet->mgw.client)) { + LOGP(DNM, LOGL_ERROR, "MGW connect failed at (%s:%u)\n", + bsc_gsmnet->mgw.conf->remote_addr, + bsc_gsmnet->mgw.conf->remote_port); + exit(1); + } + if (osmo_bsc_sigtran_init(&bsc_gsmnet->bsc_data->mscs) != 0) { LOGP(DNM, LOGL_ERROR, "Failed to initalize sigtran backhaul.\n"); exit(1); |