mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-03 05:23:43 +00:00
Compare commits
15 Commits
review/msu
...
1.11.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51565999da | ||
|
|
fb8624ed1e | ||
|
|
1d23dfb0aa | ||
|
|
6087326beb | ||
|
|
342a9a9418 | ||
|
|
22f9cf2687 | ||
|
|
26d6b2b5ce | ||
|
|
169d50ed4a | ||
|
|
82dfb505db | ||
|
|
9c0d105d09 | ||
|
|
ded02cfc29 | ||
|
|
0cbed362cd | ||
|
|
310e41cdf3 | ||
|
|
a55bfdc436 | ||
|
|
6ea8d7dac6 |
@@ -24,6 +24,3 @@
|
|||||||
# If any interfaces have been removed or changed since the last public release, a=0.
|
# If any interfaces have been removed or changed since the last public release, a=0.
|
||||||
#
|
#
|
||||||
#library what description / commit summary line
|
#library what description / commit summary line
|
||||||
libosmo-netif >1.2.0 OSMUX_DEFAULT_PORT, osmux_xfrm_output_*, osmux_xfrm_input_*
|
|
||||||
libosmocore >1.7.0 osmo_sockaddr_is_any()
|
|
||||||
libmgcp-client NEW APIs mgcp_client_pool_member_...(), mgcp_client_pool_config_write()
|
|
||||||
15
configure.ac
15
configure.ac
@@ -44,13 +44,13 @@ AC_SEARCH_LIBS([dlsym], [dl dld], [LIBRARY_DLSYM="$LIBS";LIBS=""])
|
|||||||
AC_SUBST(LIBRARY_DLSYM)
|
AC_SUBST(LIBRARY_DLSYM)
|
||||||
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.7.0)
|
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.8.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.7.0)
|
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.8.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.7.0)
|
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.8.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.7.0)
|
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.8.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 1.2.0)
|
PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 1.3.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.3.0)
|
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.4.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOTRAU, libosmotrau >= 1.3.0)
|
PKG_CHECK_MODULES(LIBOSMOTRAU, libosmotrau >= 1.4.0)
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -pthread"
|
CFLAGS="$CFLAGS -pthread"
|
||||||
LDFLAGS="$LDFLAGS -pthread"
|
LDFLAGS="$LDFLAGS -pthread"
|
||||||
@@ -79,6 +79,7 @@ AC_ARG_ENABLE(werror,
|
|||||||
if test x"$werror" = x"yes"
|
if test x"$werror" = x"yes"
|
||||||
then
|
then
|
||||||
WERROR_FLAGS="-Werror"
|
WERROR_FLAGS="-Werror"
|
||||||
|
WERROR_FLAGS+=" -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition"
|
||||||
WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations"
|
WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations"
|
||||||
WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
|
WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
|
||||||
CFLAGS="$CFLAGS $WERROR_FLAGS"
|
CFLAGS="$CFLAGS $WERROR_FLAGS"
|
||||||
|
|||||||
@@ -29,30 +29,30 @@ BuildRequires: pkgconfig >= 0.20
|
|||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: pkgconfig(libosmo-netif) >= 1.2.0
|
BuildRequires: pkgconfig(libosmo-netif) >= 1.3.0
|
||||||
BuildRequires: pkgconfig(libosmocore) >= 1.7.0
|
BuildRequires: pkgconfig(libosmocore) >= 1.8.0
|
||||||
BuildRequires: pkgconfig(libosmoctrl) >= 1.7.0
|
BuildRequires: pkgconfig(libosmoctrl) >= 1.8.0
|
||||||
BuildRequires: pkgconfig(libosmogsm) >= 1.7.0
|
BuildRequires: pkgconfig(libosmogsm) >= 1.8.0
|
||||||
BuildRequires: pkgconfig(libosmovty) >= 1.7.0
|
BuildRequires: pkgconfig(libosmovty) >= 1.8.0
|
||||||
BuildRequires: pkgconfig(libosmocoding) >= 1.7.0
|
BuildRequires: pkgconfig(libosmocoding) >= 1.8.0
|
||||||
BuildRequires: pkgconfig(libosmoabis) >= 1.3.0
|
BuildRequires: pkgconfig(libosmoabis) >= 1.4.0
|
||||||
BuildRequires: pkgconfig(libosmotrau) >= 1.3.0
|
BuildRequires: pkgconfig(libosmotrau) >= 1.4.0
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
OsmoMGW is Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks.
|
OsmoMGW is Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks.
|
||||||
|
|
||||||
%package -n libosmo-mgcp-client9
|
%package -n libosmo-mgcp-client11
|
||||||
Summary: Osmocom's Media Gateway Control Protocol client library
|
Summary: Osmocom's Media Gateway Control Protocol client library
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
|
|
||||||
%description -n libosmo-mgcp-client9
|
%description -n libosmo-mgcp-client11
|
||||||
Osmocom's Media Gateway Control Protocol client library.
|
Osmocom's Media Gateway Control Protocol client library.
|
||||||
|
|
||||||
%package -n libosmo-mgcp-client-devel
|
%package -n libosmo-mgcp-client-devel
|
||||||
Summary: Development files for Osmocom's Media Gateway Control Protocol client library
|
Summary: Development files for Osmocom's Media Gateway Control Protocol client library
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: libosmo-mgcp-client9 = %{version}
|
Requires: libosmo-mgcp-client11 = %{version}
|
||||||
|
|
||||||
%description -n libosmo-mgcp-client-devel
|
%description -n libosmo-mgcp-client-devel
|
||||||
Osmocom's Media Gateway Control Protocol client librarary.
|
Osmocom's Media Gateway Control Protocol client librarary.
|
||||||
@@ -90,8 +90,8 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
|||||||
%check
|
%check
|
||||||
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
|
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
|
||||||
|
|
||||||
%post -n libosmo-mgcp-client9 -p /sbin/ldconfig
|
%post -n libosmo-mgcp-client11 -p /sbin/ldconfig
|
||||||
%postun -n libosmo-mgcp-client9 -p /sbin/ldconfig
|
%postun -n libosmo-mgcp-client11 -p /sbin/ldconfig
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
%preun
|
%preun
|
||||||
@@ -119,8 +119,8 @@ make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
|
|||||||
%dir %{_sysconfdir}/osmocom
|
%dir %{_sysconfdir}/osmocom
|
||||||
%config(noreplace) %{_sysconfdir}/osmocom/osmo-mgw.cfg
|
%config(noreplace) %{_sysconfdir}/osmocom/osmo-mgw.cfg
|
||||||
|
|
||||||
%files -n libosmo-mgcp-client9
|
%files -n libosmo-mgcp-client11
|
||||||
%{_libdir}/libosmo-mgcp-client.so.9*
|
%{_libdir}/libosmo-mgcp-client.so.11*
|
||||||
|
|
||||||
%files -n libosmo-mgcp-client-devel
|
%files -n libosmo-mgcp-client-devel
|
||||||
%{_libdir}/libosmo-mgcp-client.so
|
%{_libdir}/libosmo-mgcp-client.so
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Osmocom Media Gateway (MGW)
|
Description=Osmocom Media Gateway (MGW)
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
@@ -8,6 +10,11 @@ WorkingDirectory=%S/osmocom
|
|||||||
Restart=always
|
Restart=always
|
||||||
ExecStart=/usr/bin/osmo-mgw -s -c /etc/osmocom/osmo-mgw.cfg
|
ExecStart=/usr/bin/osmo-mgw -s -c /etc/osmocom/osmo-mgw.cfg
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
|
# CPU scheduling policy:
|
||||||
|
CPUSchedulingPolicy=rr
|
||||||
|
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
|
||||||
|
CPUSchedulingPriority=1
|
||||||
|
# See sched(7) for further details on real-time policies and priorities
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
147
debian/changelog
vendored
147
debian/changelog
vendored
@@ -1,3 +1,150 @@
|
|||||||
|
osmo-mgw (1.11.2) unstable; urgency=medium
|
||||||
|
|
||||||
|
* systemd: depend on networking-online.target
|
||||||
|
|
||||||
|
-- Oliver Smith <osmith@sysmocom.de> Fri, 26 May 2023 17:49:29 +0200
|
||||||
|
|
||||||
|
osmo-mgw (1.11.1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* mgcp_network: Unregister osmo_fd before closing fd
|
||||||
|
|
||||||
|
-- Pau Espin Pedrol <pespin@sysmocom.de> Fri, 10 Mar 2023 14:55:21 +0100
|
||||||
|
|
||||||
|
osmo-mgw (1.11.0) unstable; urgency=medium
|
||||||
|
|
||||||
|
[ Pau Espin Pedrol ]
|
||||||
|
* mgcp-client: Remove impossible code path
|
||||||
|
* mgcp_osmux: Drop duplicated conn_osmux_release_cid() in code path
|
||||||
|
* Use Osmux default port define from libosmo-netif
|
||||||
|
* osmux: Use new osmux APIs to let libosmo-netif alloc struct osmux_out_handle
|
||||||
|
* mgw: Fix osmux conn local IP selection
|
||||||
|
* cosmetic: osmux: Fix wrong indentation
|
||||||
|
* mgw: Use X-Osmux string define
|
||||||
|
* Add Osmux log category
|
||||||
|
* cosmetic: main: Properly format log_info_cat
|
||||||
|
* osmux: Use better name for function which may allocate a new struct
|
||||||
|
* osmux: Use osmo_sockaddr wherever possible
|
||||||
|
* osmux: Log refcounting of osmux_handle_list
|
||||||
|
* osmux: Fix memleak on error code path
|
||||||
|
* osmux: don't store conn ptr inside shared osmux_handle
|
||||||
|
* osmux: set log level of expected code path to INFO
|
||||||
|
* cosmetic: vty: Fix indentation whitespace
|
||||||
|
* osmux: Log sendto() error
|
||||||
|
* cosmetic: mgcp_conn.h: fix indentation whitespace
|
||||||
|
* osmux: Attach osmux to virtual trunk
|
||||||
|
* osmux: Clean up helper macro osmux_chunk_length()
|
||||||
|
* osmux: Get rid of static NULL talloc context
|
||||||
|
* Fix typo in ratectr description
|
||||||
|
* mgcp_conn: rename field s/rate_ctr_group/ctrg/g
|
||||||
|
* Use 'static const' instead of 'const static' everywhere
|
||||||
|
* osmux: Add connection and global rate counters
|
||||||
|
* cosmetic: osmux: Fix formatting of if-else brackets
|
||||||
|
* osmux: Rename field osmux usage policy and define it with proper type
|
||||||
|
* Use bool type instead of int in config field
|
||||||
|
* osmux: Support local CID != remote CID
|
||||||
|
* osmux: Fix incorrect rate_ctr_group used in mgcp_osmux.c
|
||||||
|
* osmux: Improve per-conn tx rate counters
|
||||||
|
* vty: show per-connection Osmux VTY stats
|
||||||
|
* osmux: Rename field s/init/initialized
|
||||||
|
* osmux: Allocate rate counters during initialization of osmux conn
|
||||||
|
* cosmetic: osmux: Drop extra empty line
|
||||||
|
* osmux: Drop unneeded comment block
|
||||||
|
* osmux: Lower log level when osmux batch received for unknown CID
|
||||||
|
* osmux: Keep decoding osmux pkt if a batch contains an unknown CID
|
||||||
|
* Allocate struct osmux_in_handle through new libosmo-netif APIs
|
||||||
|
* osmux: Drop logging of osmux internal counters
|
||||||
|
* osmux: cleanup misleading code calling rtp_bridge_cb
|
||||||
|
* osmux: Unify rtp_conn osmux type into a single type
|
||||||
|
* osmux: Match remote address in osmux_conn_lookup()
|
||||||
|
* osmux: Fill in from_addr in struct osmo_rtp_msg_ctx
|
||||||
|
* osmux: Log remote address upon rx of osmux pkt
|
||||||
|
* send_dummy: Use proper condition to test if conn is osmux
|
||||||
|
* Fix regression in detection of legacy dummy packets
|
||||||
|
* Use new libosmocore API osmo_sockaddr_is_any()
|
||||||
|
* Get rid of separate rtp_port field
|
||||||
|
* osmux: Use available API to check if remote end is known
|
||||||
|
* Add Osmux IPv6 support
|
||||||
|
* Clean up local var pointers in mgcp_get_local_addr()
|
||||||
|
* osmux: Change couple log lines to OSMUX category
|
||||||
|
* osmux: Add square brackets around IPv6 address to distinguish port in log line
|
||||||
|
* osmux: Drop unused role parameter
|
||||||
|
* osmux: cosmetic: Fix indentation
|
||||||
|
* Check once if remote addr is available when sending dummy packet
|
||||||
|
* osmux: Simplify and constify param passing
|
||||||
|
* osmux: Set conn->type during osmux_init_conn()
|
||||||
|
* osmux: Make conn_osmux_{allocate,release}_local_cid() APIs static
|
||||||
|
* osmux: Define osmux_dummy cfg as boolean
|
||||||
|
* osmux: Move setting OSMUX_STATE_DISABLED to initializer function
|
||||||
|
* osmux: Erase references to bsc-nat
|
||||||
|
* mgcp_conn_dump(): Separate dump for osmux and iuup connections
|
||||||
|
* osmux: Introduce osmux peer-behind-nat (on|off) and rework conn activation
|
||||||
|
* osmux: Clean up mgcp_config osmux fields
|
||||||
|
* cosmetic: Fix typo in comment
|
||||||
|
* mgcp-client: pool: Improve documentation of some internal fields
|
||||||
|
* mgcp-client: Avoid double iteration picking client from pool
|
||||||
|
* mgcp-client: Fix typo in internal function name
|
||||||
|
* mgcp-client: Rename internal field in mgcp_client_pool
|
||||||
|
* mgcp-client: Move & rename helper function outside of vty code
|
||||||
|
* mgcp-client: Create alloc() and free() internal APIs for mgcp_client_pool_member
|
||||||
|
* mgcp-client: Move internal API acting on mgcp_client_pool to the correct file section
|
||||||
|
* mgcp-client: Refactor reinit of mgcp clients
|
||||||
|
* mgcp-client: Rearrange order of structs and APIs in header
|
||||||
|
* mgcp-client: Rearrange internal backpointers
|
||||||
|
* mgcp-client: Introduce APIs to manually select mgcp_client from pool
|
||||||
|
* mgcp-client: vty: Write deprecation warning using non-mgw nodes
|
||||||
|
* mgcp-client: Use random free local port by default
|
||||||
|
* mgcp-client: Convert users supporting new MGW Pool VTY node during write-config
|
||||||
|
* mgcp-client: Introduce API mgcp_client_pool_config_write
|
||||||
|
* mgcp-client: Add new VTY commands under mgw node without mgw prefix
|
||||||
|
* mgcp-client: Fix 'mgw endpoint-range' command dropped from old VTY node
|
||||||
|
* mgcp-client: Refactor system keeping old users not calling mgcp_client_pool_config_write() working
|
||||||
|
* mgcp-client: Fix no 'mgw ' prefix written in old VTY node
|
||||||
|
* Fix misleading error log
|
||||||
|
* mgcp_send: Use mgcp_conn_rtp_is_iuup() helper
|
||||||
|
* cosmetic: Clarify and fix typos in comment
|
||||||
|
* mgw: Log unexpected RTP AMR OA-vs-BE payload
|
||||||
|
* Rename and move func checking if amr mode is explicitly configured
|
||||||
|
* mgw: rx_rtp(): reorder checks and handlings
|
||||||
|
* mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/
|
||||||
|
* osmux: Rename function and pass msgb directly to it
|
||||||
|
* osmux: Make sure RTP AMR feed to osmux is in octet-aligned mode
|
||||||
|
* Improve logging on AMR OA<->BWE conversion failure
|
||||||
|
* osmux: Rotate over available Osmux CID when allocating a new one
|
||||||
|
* osmux: Use new osmux_xfrm_input API to set name on each link
|
||||||
|
* iuup: Use osmo_amr_ft_valid() API
|
||||||
|
|
||||||
|
[ Vadim Yanitskiy ]
|
||||||
|
* libosmo-mgcp-client: add -no-undefined to *_la_LDFLAGS
|
||||||
|
|
||||||
|
[ Philipp Maier ]
|
||||||
|
* mgcp_e1: fix apidoc
|
||||||
|
* mgcp_network: improve coment
|
||||||
|
|
||||||
|
[ Max ]
|
||||||
|
* Set working directory in systemd service file
|
||||||
|
* Add realtime scheduling and set priority in service file
|
||||||
|
* ctrl: take both address and port from vty config
|
||||||
|
|
||||||
|
[ Harald Welte ]
|
||||||
|
* Make osmo_mgcpc_ep_fsm_pre_term() static
|
||||||
|
* Support building with -Werror=strict-prototypes / -Werror=old-style-definition
|
||||||
|
* Add -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition
|
||||||
|
* update outdated vty copyright statement
|
||||||
|
|
||||||
|
[ Oliver Smith ]
|
||||||
|
* mgcp_client_pool.h: add missing stdbool include
|
||||||
|
* Fix various typos
|
||||||
|
* mgcp_client: add new clearmode codec
|
||||||
|
|
||||||
|
[ Neels Hofmeyr ]
|
||||||
|
* AMR->IuUP: do not crash on AMR data before IuUP Init
|
||||||
|
* AMR->IuUP: properly translate Q -> FQC
|
||||||
|
* IuUP->AMR: do not patch payload type a second time
|
||||||
|
* IuUP->AMR: log whether converting to AMR OA or BE
|
||||||
|
* AMR->IuUP: log conversion, like for the flipside
|
||||||
|
|
||||||
|
-- Pau Espin Pedrol <pespin@sysmocom.de> Tue, 07 Feb 2023 16:58:41 +0100
|
||||||
|
|
||||||
osmo-mgw (1.10.0) unstable; urgency=medium
|
osmo-mgw (1.10.0) unstable; urgency=medium
|
||||||
|
|
||||||
[ Eric ]
|
[ Eric ]
|
||||||
|
|||||||
12
debian/control
vendored
12
debian/control
vendored
@@ -6,10 +6,10 @@ Build-Depends: debhelper (>=9),
|
|||||||
dh-autoreconf,
|
dh-autoreconf,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
autotools-dev,
|
autotools-dev,
|
||||||
libosmocore-dev (>= 1.7.0),
|
libosmocore-dev (>= 1.8.0),
|
||||||
libosmo-netif-dev (>= 1.2.0),
|
libosmo-netif-dev (>= 1.3.0),
|
||||||
libosmo-abis-dev (>= 1.3.0),
|
libosmo-abis-dev (>= 1.4.0),
|
||||||
osmo-gsm-manuals-dev (>= 1.3.0)
|
osmo-gsm-manuals-dev (>= 1.4.0)
|
||||||
Standards-Version: 3.9.8
|
Standards-Version: 3.9.8
|
||||||
Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw
|
Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw
|
||||||
Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw
|
Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw
|
||||||
@@ -21,7 +21,7 @@ Multi-Arch: foreign
|
|||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks
|
Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks
|
||||||
|
|
||||||
Package: libosmo-mgcp-client9
|
Package: libosmo-mgcp-client11
|
||||||
Section: libs
|
Section: libs
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Multi-Arch: same
|
Multi-Arch: same
|
||||||
@@ -33,7 +33,7 @@ Package: libosmo-mgcp-client-dev
|
|||||||
Section: libdevel
|
Section: libdevel
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Multi-Arch: same
|
Multi-Arch: same
|
||||||
Depends: libosmo-mgcp-client9 (= ${binary:Version}), ${misc:Depends}
|
Depends: libosmo-mgcp-client11 (= ${binary:Version}), ${misc:Depends}
|
||||||
Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities
|
Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities
|
||||||
|
|
||||||
Package: osmo-mgw-doc
|
Package: osmo-mgw-doc
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ noinst_HEADERS = \
|
|||||||
mgcp_endp.h \
|
mgcp_endp.h \
|
||||||
mgcp_sdp.h \
|
mgcp_sdp.h \
|
||||||
mgcp_codec.h \
|
mgcp_codec.h \
|
||||||
mgcp_ctrl.h \
|
|
||||||
mgcp_trunk.h \
|
mgcp_trunk.h \
|
||||||
debug.h \
|
debug.h \
|
||||||
mgcp_ratectr.h \
|
mgcp_ratectr.h \
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
* (C) 2020 by Harald Welte <laforge@gnumonks.org>
|
|
||||||
* All Rights Reserved
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
struct ctrl_handle *mgw_ctrl_interface_setup(struct mgcp_config *cfg,
|
|
||||||
const char *bind_addr, uint16_t port);
|
|
||||||
|
|
||||||
@@ -50,6 +50,7 @@ enum mgcp_codecs {
|
|||||||
CODEC_AMR_8000_1 = 112,
|
CODEC_AMR_8000_1 = 112,
|
||||||
CODEC_AMRWB_16000_1 = 113,
|
CODEC_AMRWB_16000_1 = 113,
|
||||||
CODEC_IUFP = 96,
|
CODEC_IUFP = 96,
|
||||||
|
CODEC_CLEARMODE = 120, /* 3GPP TS 48.103 table 5.4.2.2.1 */
|
||||||
};
|
};
|
||||||
/* Note: when new codec types are added, the corresponding value strings
|
/* Note: when new codec types are added, the corresponding value strings
|
||||||
* in mgcp_client.c (codec_table) must be updated as well. Enumerations
|
* in mgcp_client.c (codec_table) must be updated as well. Enumerations
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ AM_LDFLAGS = \
|
|||||||
|
|
||||||
# This is not at all related to the release version, but a range of supported
|
# This is not at all related to the release version, but a range of supported
|
||||||
# API versions. Read TODO_RELEASE in the source tree's root!
|
# API versions. Read TODO_RELEASE in the source tree's root!
|
||||||
MGCP_CLIENT_LIBVERSION=10:0:1
|
MGCP_CLIENT_LIBVERSION=11:0:0
|
||||||
|
|
||||||
lib_LTLIBRARIES = \
|
lib_LTLIBRARIES = \
|
||||||
libosmo-mgcp-client.la \
|
libosmo-mgcp-client.la \
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ const struct value_string osmo_mgcpc_codec_names[] = {
|
|||||||
{ CODEC_AMR_8000_1, "AMR/8000/1" },
|
{ CODEC_AMR_8000_1, "AMR/8000/1" },
|
||||||
{ CODEC_AMRWB_16000_1, "AMR-WB/16000/1" },
|
{ CODEC_AMRWB_16000_1, "AMR-WB/16000/1" },
|
||||||
{ CODEC_IUFP, "VND.3GPP.IUFP/16000" },
|
{ CODEC_IUFP, "VND.3GPP.IUFP/16000" },
|
||||||
|
{ CODEC_CLEARMODE, "CLEARMODE/8000" },
|
||||||
{ 0, NULL },
|
{ 0, NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ libosmo_mgcp_a_SOURCES = \
|
|||||||
mgcp_stat.c \
|
mgcp_stat.c \
|
||||||
mgcp_endp.c \
|
mgcp_endp.c \
|
||||||
mgcp_trunk.c \
|
mgcp_trunk.c \
|
||||||
mgcp_ctrl.c \
|
|
||||||
mgcp_ratectr.c \
|
mgcp_ratectr.c \
|
||||||
mgcp_e1.c \
|
mgcp_e1.c \
|
||||||
mgcp_iuup.c \
|
mgcp_iuup.c \
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
/*
|
|
||||||
* (C) 2020 by Harald Welte <laforge@gnumonks.org>
|
|
||||||
* All Rights Reserved
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <osmocom/ctrl/control_if.h>
|
|
||||||
#include <osmocom/mgcp/mgcp.h>
|
|
||||||
|
|
||||||
|
|
||||||
static int mgw_ctrl_node_lookup(void *data, vector vline, int *node_type,
|
|
||||||
void **node_data, int *i)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
struct ctrl_handle *mgw_ctrl_interface_setup(struct mgcp_config *cfg,
|
|
||||||
const char *bind_addr, uint16_t port)
|
|
||||||
{
|
|
||||||
return ctrl_interface_setup_dynip2(cfg, bind_addr, port, mgw_ctrl_node_lookup,
|
|
||||||
_LAST_CTRL_NODE);
|
|
||||||
}
|
|
||||||
@@ -672,7 +672,7 @@ int mgcp_conn_iuup_send_rtp(struct mgcp_conn_rtp *conn_src_rtp, struct mgcp_conn
|
|||||||
"Bridge RTP=>IuUP: too short for AMR OA hdr (%u)\n", msgb_length(msg));
|
"Bridge RTP=>IuUP: too short for AMR OA hdr (%u)\n", msgb_length(msg));
|
||||||
goto free_ret;
|
goto free_ret;
|
||||||
}
|
}
|
||||||
if (amr_hdr->ft >= AMR_FT_MAX) {
|
if (!osmo_amr_ft_valid(amr_hdr->ft)) {
|
||||||
LOG_CONN_RTP(conn_src_rtp, LOGL_NOTICE, "Bridge RTP=>IuUP: wrong AMR OA ft=%u\n", amr_hdr->ft);
|
LOG_CONN_RTP(conn_src_rtp, LOGL_NOTICE, "Bridge RTP=>IuUP: wrong AMR OA ft=%u\n", amr_hdr->ft);
|
||||||
goto free_ret;
|
goto free_ret;
|
||||||
}
|
}
|
||||||
@@ -695,7 +695,7 @@ int mgcp_conn_iuup_send_rtp(struct mgcp_conn_rtp *conn_src_rtp, struct mgcp_conn
|
|||||||
goto free_ret;
|
goto free_ret;
|
||||||
}
|
}
|
||||||
ft = ((amr_bwe_hdr[0] & 0x07) << 1) | ((amr_bwe_hdr[1] & 0x80) >> 7);
|
ft = ((amr_bwe_hdr[0] & 0x07) << 1) | ((amr_bwe_hdr[1] & 0x80) >> 7);
|
||||||
if (ft >= AMR_FT_MAX) {
|
if (!osmo_amr_ft_valid(ft)) {
|
||||||
LOG_CONN_RTP(conn_src_rtp, LOGL_NOTICE, "Bridge RTP=>IuUP: wrong AMR BE ft=%u\n", ft);
|
LOG_CONN_RTP(conn_src_rtp, LOGL_NOTICE, "Bridge RTP=>IuUP: wrong AMR BE ft=%u\n", ft);
|
||||||
goto free_ret;
|
goto free_ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1537,12 +1537,11 @@ static int rx_rtp(struct msgb *msg)
|
|||||||
if (!trunk->rtp_accept_all && check_rtp_origin(conn_src, from_addr))
|
if (!trunk->rtp_accept_all && check_rtp_origin(conn_src, from_addr))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* If AMR is configured for the ingress connection and conversion of the
|
/* Handle AMR frame format conversion (octet-aligned vs. bandwith-efficient) */
|
||||||
* framing mode (octet-aligned vs. bandwith-efficient) is explicitly
|
|
||||||
* defined, then we check if the incoming payload matches that
|
|
||||||
* expectation. */
|
|
||||||
if (mc->proto == MGCP_PROTO_RTP &&
|
if (mc->proto == MGCP_PROTO_RTP &&
|
||||||
mgcp_codec_amr_align_mode_is_indicated(conn_src->end.codec)) {
|
mgcp_codec_amr_align_mode_is_indicated(conn_src->end.codec)) {
|
||||||
|
/* Make sure that the incoming AMR frame format matches the frame format that the call agent has
|
||||||
|
* communicated via SDP when the connection was created/modfied. */
|
||||||
int oa = amr_oa_check((char*)msgb_data(msg), msgb_length(msg));
|
int oa = amr_oa_check((char*)msgb_data(msg), msgb_length(msg));
|
||||||
if (oa < 0)
|
if (oa < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1677,14 +1676,14 @@ int mgcp_bind_net_rtp_port(struct mgcp_endpoint *endp, int rtp_port,
|
|||||||
void mgcp_free_rtp_port(struct mgcp_rtp_end *end)
|
void mgcp_free_rtp_port(struct mgcp_rtp_end *end)
|
||||||
{
|
{
|
||||||
if (end->rtp.fd != -1) {
|
if (end->rtp.fd != -1) {
|
||||||
|
osmo_fd_unregister(&end->rtp);
|
||||||
close(end->rtp.fd);
|
close(end->rtp.fd);
|
||||||
end->rtp.fd = -1;
|
end->rtp.fd = -1;
|
||||||
osmo_fd_unregister(&end->rtp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (end->rtcp.fd != -1) {
|
if (end->rtcp.fd != -1) {
|
||||||
|
osmo_fd_unregister(&end->rtcp);
|
||||||
close(end->rtcp.fd);
|
close(end->rtcp.fd);
|
||||||
end->rtcp.fd = -1;
|
end->rtcp.fd = -1;
|
||||||
osmo_fd_unregister(&end->rtcp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ osmux_handle_alloc(const struct mgcp_trunk *trunk, const struct osmo_sockaddr *r
|
|||||||
{
|
{
|
||||||
struct osmux_handle *h;
|
struct osmux_handle *h;
|
||||||
const struct mgcp_config *cfg = trunk->cfg;
|
const struct mgcp_config *cfg = trunk->cfg;
|
||||||
|
char name[128] = "r=";
|
||||||
|
|
||||||
h = talloc_zero(trunk, struct osmux_handle);
|
h = talloc_zero(trunk, struct osmux_handle);
|
||||||
if (!h)
|
if (!h)
|
||||||
@@ -167,6 +168,9 @@ osmux_handle_alloc(const struct mgcp_trunk *trunk, const struct osmo_sockaddr *r
|
|||||||
talloc_free(h);
|
talloc_free(h);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
osmo_sockaddr_to_str_buf(name + 2, sizeof(name) - 2, rem_addr);
|
||||||
|
osmux_xfrm_input_set_name(h->in, name);
|
||||||
/* sequence number to start OSMUX message from */
|
/* sequence number to start OSMUX message from */
|
||||||
osmux_xfrm_input_set_initial_seqnum(h->in, 0);
|
osmux_xfrm_input_set_initial_seqnum(h->in, 0);
|
||||||
osmux_xfrm_input_set_batch_factor(h->in, cfg->osmux.batch_factor);
|
osmux_xfrm_input_set_batch_factor(h->in, cfg->osmux.batch_factor);
|
||||||
@@ -734,26 +738,46 @@ int osmux_cid_pool_count_used(void)
|
|||||||
return used;
|
return used;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! take a free OSMUX cid.
|
/*! Find and reserve a free OSMUX cid. Keep state of last allocated CID to
|
||||||
|
* rotate allocated CIDs over time. This helps in letting CIDs unused for some
|
||||||
|
* time after last use.
|
||||||
* \returns OSMUX cid */
|
* \returns OSMUX cid */
|
||||||
int osmux_cid_pool_get_next(void)
|
int osmux_cid_pool_get_next(void)
|
||||||
{
|
{
|
||||||
int i, j;
|
static uint8_t next_free_osmux_cid_lookup = 0;
|
||||||
|
uint8_t start_i, start_j;
|
||||||
|
uint8_t i, j, cid;
|
||||||
|
|
||||||
for (i = 0; i < sizeof(osmux_cid_bitmap); i++) {
|
/* i = octet index, j = bit index inside ith octet */
|
||||||
for (j = 0; j < 8; j++) {
|
start_i = next_free_osmux_cid_lookup >> 3;
|
||||||
|
start_j = next_free_osmux_cid_lookup & 0x07;
|
||||||
|
|
||||||
|
for (i = start_i; i < sizeof(osmux_cid_bitmap); i++) {
|
||||||
|
for (j = start_j; j < 8; j++) {
|
||||||
if (osmux_cid_bitmap[i] & (1 << j))
|
if (osmux_cid_bitmap[i] & (1 << j))
|
||||||
continue;
|
continue;
|
||||||
|
goto found;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
osmux_cid_bitmap[i] |= (1 << j);
|
for (i = 0; i <= start_i; i++) {
|
||||||
LOGP(DOSMUX, LOGL_DEBUG,
|
for (j = 0; j < start_j; j++) {
|
||||||
"Allocating Osmux CID %u from pool\n", (i * 8) + j);
|
if (osmux_cid_bitmap[i] & (1 << j))
|
||||||
return (i * 8) + j;
|
continue;
|
||||||
|
goto found;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGP(DOSMUX, LOGL_ERROR, "All Osmux circuits are in use!\n");
|
LOGP(DOSMUX, LOGL_ERROR, "All Osmux circuits are in use!\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
found:
|
||||||
|
osmux_cid_bitmap[i] |= (1 << j);
|
||||||
|
cid = (i << 3) | j;
|
||||||
|
next_free_osmux_cid_lookup = (cid + 1) & 0xff;
|
||||||
|
LOGP(DOSMUX, LOGL_DEBUG,
|
||||||
|
"Allocating Osmux CID %u from pool\n", cid);
|
||||||
|
return cid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! take a specific OSMUX cid.
|
/*! take a specific OSMUX cid.
|
||||||
|
|||||||
@@ -1026,7 +1026,7 @@ mgcp_header_done:
|
|||||||
&endp->local_options, local_options);
|
&endp->local_options, local_options);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
LOGPCONN(_conn, DLMGCP, LOGL_ERROR,
|
LOGPCONN(_conn, DLMGCP, LOGL_ERROR,
|
||||||
"CRCX: inavlid local connection options!\n");
|
"CRCX: invalid local connection options!\n");
|
||||||
error_code = rc;
|
error_code = rc;
|
||||||
rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_CRCX_FAIL_INVALID_CONN_OPTIONS));
|
rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_CRCX_FAIL_INVALID_CONN_OPTIONS));
|
||||||
goto error2;
|
goto error2;
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
#include <osmocom/mgcp/debug.h>
|
#include <osmocom/mgcp/debug.h>
|
||||||
#include <osmocom/mgcp/mgcp_endp.h>
|
#include <osmocom/mgcp/mgcp_endp.h>
|
||||||
#include <osmocom/mgcp/mgcp_trunk.h>
|
#include <osmocom/mgcp/mgcp_trunk.h>
|
||||||
#include <osmocom/mgcp/mgcp_ctrl.h>
|
|
||||||
|
|
||||||
#include <osmocom/core/application.h>
|
#include <osmocom/core/application.h>
|
||||||
#include <osmocom/core/msgb.h>
|
#include <osmocom/core/msgb.h>
|
||||||
@@ -51,7 +50,7 @@
|
|||||||
#include <osmocom/core/rate_ctr.h>
|
#include <osmocom/core/rate_ctr.h>
|
||||||
#include <osmocom/core/logging.h>
|
#include <osmocom/core/logging.h>
|
||||||
#include <osmocom/core/socket.h>
|
#include <osmocom/core/socket.h>
|
||||||
|
#include <osmocom/ctrl/control_if.h>
|
||||||
#include <osmocom/ctrl/control_vty.h>
|
#include <osmocom/ctrl/control_vty.h>
|
||||||
|
|
||||||
#include <osmocom/vty/telnet_interface.h>
|
#include <osmocom/vty/telnet_interface.h>
|
||||||
@@ -83,7 +82,7 @@ static int daemonize = 0;
|
|||||||
|
|
||||||
const char *osmomgw_copyright =
|
const char *osmomgw_copyright =
|
||||||
"Copyright (C) 2009-2010 Holger Freyther and On-Waves\r\n"
|
"Copyright (C) 2009-2010 Holger Freyther and On-Waves\r\n"
|
||||||
"Copyright (C) 2017 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>\r\n"
|
"Copyright (C) 2017-2022 by sysmocom s.f.m.c. GmbH\r\n"
|
||||||
"Contributions by Pablo Neira Ayuso, Jacob Erlbeck, Neels Hofmeyr\r\n"
|
"Contributions by Pablo Neira Ayuso, Jacob Erlbeck, Neels Hofmeyr\r\n"
|
||||||
"Philipp Maier\r\n\r\n"
|
"Philipp Maier\r\n\r\n"
|
||||||
"License AGPLv3+: GNU AGPL version 3 or later <http://gnu.org/licenses/agpl-3.0.html>\r\n"
|
"License AGPLv3+: GNU AGPL version 3 or later <http://gnu.org/licenses/agpl-3.0.html>\r\n"
|
||||||
@@ -366,7 +365,7 @@ int main(int argc, char **argv)
|
|||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
cfg->ctrl = mgw_ctrl_interface_setup(cfg, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_MGW);
|
cfg->ctrl = ctrl_interface_setup(cfg, OSMO_CTRL_PORT_MGW, NULL);
|
||||||
if (!cfg->ctrl) {
|
if (!cfg->ctrl) {
|
||||||
fprintf(stderr, "Failed to init the control interface on %s:%u. Exiting\n",
|
fprintf(stderr, "Failed to init the control interface on %s:%u. Exiting\n",
|
||||||
ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_MGW);
|
ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_MGW);
|
||||||
|
|||||||
@@ -838,7 +838,7 @@ static void test_messages(void)
|
|||||||
if (endp->local_options.pkt_period_min ||
|
if (endp->local_options.pkt_period_min ||
|
||||||
endp->local_options.pkt_period_max)
|
endp->local_options.pkt_period_max)
|
||||||
printf
|
printf
|
||||||
("Requested packetetization period: "
|
("Requested packetization period: "
|
||||||
"%d-%d\n",
|
"%d-%d\n",
|
||||||
endp->local_options.pkt_period_min,
|
endp->local_options.pkt_period_min,
|
||||||
endp->
|
endp->
|
||||||
@@ -1632,7 +1632,8 @@ static void test_osmux_cid(void)
|
|||||||
|
|
||||||
for (i = 0; i < 256; ++i) {
|
for (i = 0; i < 256; ++i) {
|
||||||
id = osmux_cid_pool_get_next();
|
id = osmux_cid_pool_get_next();
|
||||||
OSMO_ASSERT(id == i);
|
/* We called osmux_cid_pool_get_next() above, so next CID is i+1. */
|
||||||
|
OSMO_ASSERT(id == ((i + 1) & 0xff));
|
||||||
OSMO_ASSERT(osmux_cid_pool_count_used() == i + 1);
|
OSMO_ASSERT(osmux_cid_pool_count_used() == i + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user