Compare commits

...

9 Commits

Author SHA1 Message Date
Oliver Smith
51565999da Bump version: 1.11.1.1-fb862 → 1.11.2
Change-Id: I8ba80a0a3ebb1ac1719aaea0a3091d1212508130
2023-05-26 17:49:29 +02:00
Oliver Smith
fb8624ed1e systemd: depend on networking-online.target
Related: SYS#6400
Change-Id: Ib6c78c76c5f13b9482428ce653a61b03b2aca1d3
2023-05-26 17:48:18 +02:00
Pau Espin Pedrol
1d23dfb0aa Bump version: 1.11.0.1-ef3e5 → 1.11.1
Change-Id: I45b2d09948bb6666c52466b59beb301d8da972c1
2023-03-10 14:55:22 +01:00
Pau Espin Pedrol
6087326beb mgcp_network: Unregister osmo_fd before closing fd
(cherry picked from commit 6c303664f5)

Change-Id: Id03011a11be17e9c0a53b01444754dd633232d2e
2023-03-10 14:55:11 +01:00
Pau Espin Pedrol
342a9a9418 Bump version: 1.10.0.117-22f9c-dirty → 1.11.0
Change-Id: I9f1dcbbf2fdc242e8d304ec6b2a8e1e60d010c32
2023-02-07 16:58:42 +01:00
Harald Welte
22f9cf2687 update outdated vty copyright statement
Change-Id: I7af4bdecddda0b43f98855571942219e8ba00b64
2023-02-06 16:07:07 +00:00
Oliver Smith
26d6b2b5ce mgcp_client: add new clearmode codec
Set 120 as payload type, as specified in 3GPP TS 48.103 table 5.4.2.2.1.

Related: OS#4395
Related: https://www.rfc-editor.org/rfc/rfc4040#section-5
Change-Id: I55f9fe241a405935dbedc3947b0a4f4986acd5cb
2023-01-24 18:18:11 +01:00
Oliver Smith
169d50ed4a Fix various typos
Change-Id: Iba7851a5bdb0ce2ce6852a8fa035b72515d7b0a1
2023-01-24 13:23:21 +01:00
Philipp Maier
82dfb505db mgcp_network: improve coment
the comment that explains the AMR frame format check is a bit difficult
to understand, lets rephrase it.

Change-Id: I07f12c03449e1e8eda8bdd3edad6d1007f5ba48d
2023-01-19 14:28:30 +01:00
14 changed files with 188 additions and 41 deletions

View File

@@ -24,6 +24,3 @@
# If any interfaces have been removed or changed since the last public release, a=0.
#
#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()

View File

@@ -44,13 +44,13 @@ AC_SEARCH_LIBS([dlsym], [dl dld], [LIBRARY_DLSYM="$LIBS";LIBS=""])
AC_SUBST(LIBRARY_DLSYM)
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.7.0)
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.7.0)
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.7.0)
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.7.0)
PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 1.2.0)
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.3.0)
PKG_CHECK_MODULES(LIBOSMOTRAU, libosmotrau >= 1.3.0)
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.8.0)
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.8.0)
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.8.0)
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.8.0)
PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 1.3.0)
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.4.0)
PKG_CHECK_MODULES(LIBOSMOTRAU, libosmotrau >= 1.4.0)
CFLAGS="$CFLAGS -pthread"
LDFLAGS="$LDFLAGS -pthread"

View File

@@ -29,30 +29,30 @@ BuildRequires: pkgconfig >= 0.20
%if 0%{?suse_version}
BuildRequires: systemd-rpm-macros
%endif
BuildRequires: pkgconfig(libosmo-netif) >= 1.2.0
BuildRequires: pkgconfig(libosmocore) >= 1.7.0
BuildRequires: pkgconfig(libosmoctrl) >= 1.7.0
BuildRequires: pkgconfig(libosmogsm) >= 1.7.0
BuildRequires: pkgconfig(libosmovty) >= 1.7.0
BuildRequires: pkgconfig(libosmocoding) >= 1.7.0
BuildRequires: pkgconfig(libosmoabis) >= 1.3.0
BuildRequires: pkgconfig(libosmotrau) >= 1.3.0
BuildRequires: pkgconfig(libosmo-netif) >= 1.3.0
BuildRequires: pkgconfig(libosmocore) >= 1.8.0
BuildRequires: pkgconfig(libosmoctrl) >= 1.8.0
BuildRequires: pkgconfig(libosmogsm) >= 1.8.0
BuildRequires: pkgconfig(libosmovty) >= 1.8.0
BuildRequires: pkgconfig(libosmocoding) >= 1.8.0
BuildRequires: pkgconfig(libosmoabis) >= 1.4.0
BuildRequires: pkgconfig(libosmotrau) >= 1.4.0
%{?systemd_requires}
%description
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
Group: System/Libraries
%description -n libosmo-mgcp-client9
%description -n libosmo-mgcp-client11
Osmocom's Media Gateway Control Protocol client library.
%package -n libosmo-mgcp-client-devel
Summary: Development files for Osmocom's Media Gateway Control Protocol client library
Group: Development/Libraries/C and C++
Requires: libosmo-mgcp-client9 = %{version}
Requires: libosmo-mgcp-client11 = %{version}
%description -n libosmo-mgcp-client-devel
Osmocom's Media Gateway Control Protocol client librarary.
@@ -90,8 +90,8 @@ find %{buildroot} -type f -name "*.la" -delete -print
%check
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
%post -n libosmo-mgcp-client9 -p /sbin/ldconfig
%postun -n libosmo-mgcp-client9 -p /sbin/ldconfig
%post -n libosmo-mgcp-client11 -p /sbin/ldconfig
%postun -n libosmo-mgcp-client11 -p /sbin/ldconfig
%if 0%{?suse_version}
%preun
@@ -119,8 +119,8 @@ make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
%dir %{_sysconfdir}/osmocom
%config(noreplace) %{_sysconfdir}/osmocom/osmo-mgw.cfg
%files -n libosmo-mgcp-client9
%{_libdir}/libosmo-mgcp-client.so.9*
%files -n libosmo-mgcp-client11
%{_libdir}/libosmo-mgcp-client.so.11*
%files -n libosmo-mgcp-client-devel
%{_libdir}/libosmo-mgcp-client.so

View File

@@ -1,5 +1,7 @@
[Unit]
Description=Osmocom Media Gateway (MGW)
After=network-online.target
Wants=network-online.target
[Service]
Type=simple

147
debian/changelog vendored
View File

@@ -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
[ Eric ]

12
debian/control vendored
View File

@@ -6,10 +6,10 @@ Build-Depends: debhelper (>=9),
dh-autoreconf,
pkg-config,
autotools-dev,
libosmocore-dev (>= 1.7.0),
libosmo-netif-dev (>= 1.2.0),
libosmo-abis-dev (>= 1.3.0),
osmo-gsm-manuals-dev (>= 1.3.0)
libosmocore-dev (>= 1.8.0),
libosmo-netif-dev (>= 1.3.0),
libosmo-abis-dev (>= 1.4.0),
osmo-gsm-manuals-dev (>= 1.4.0)
Standards-Version: 3.9.8
Vcs-Git: 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}
Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks
Package: libosmo-mgcp-client9
Package: libosmo-mgcp-client11
Section: libs
Architecture: any
Multi-Arch: same
@@ -33,7 +33,7 @@ Package: libosmo-mgcp-client-dev
Section: libdevel
Architecture: any
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
Package: osmo-mgw-doc

View File

@@ -50,6 +50,7 @@ enum mgcp_codecs {
CODEC_AMR_8000_1 = 112,
CODEC_AMRWB_16000_1 = 113,
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
* in mgcp_client.c (codec_table) must be updated as well. Enumerations

View File

@@ -21,7 +21,7 @@ AM_LDFLAGS = \
# 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!
MGCP_CLIENT_LIBVERSION=10:0:1
MGCP_CLIENT_LIBVERSION=11:0:0
lib_LTLIBRARIES = \
libosmo-mgcp-client.la \

View File

@@ -60,6 +60,7 @@ const struct value_string osmo_mgcpc_codec_names[] = {
{ CODEC_AMR_8000_1, "AMR/8000/1" },
{ CODEC_AMRWB_16000_1, "AMR-WB/16000/1" },
{ CODEC_IUFP, "VND.3GPP.IUFP/16000" },
{ CODEC_CLEARMODE, "CLEARMODE/8000" },
{ 0, NULL },
};

View File

@@ -1537,12 +1537,11 @@ static int rx_rtp(struct msgb *msg)
if (!trunk->rtp_accept_all && check_rtp_origin(conn_src, from_addr))
return -1;
/* If AMR is configured for the ingress connection and conversion of the
* framing mode (octet-aligned vs. bandwith-efficient) is explicitly
* defined, then we check if the incoming payload matches that
* expectation. */
/* Handle AMR frame format conversion (octet-aligned vs. bandwith-efficient) */
if (mc->proto == MGCP_PROTO_RTP &&
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));
if (oa < 0)
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)
{
if (end->rtp.fd != -1) {
osmo_fd_unregister(&end->rtp);
close(end->rtp.fd);
end->rtp.fd = -1;
osmo_fd_unregister(&end->rtp);
}
if (end->rtcp.fd != -1) {
osmo_fd_unregister(&end->rtcp);
close(end->rtcp.fd);
end->rtcp.fd = -1;
osmo_fd_unregister(&end->rtcp);
}
}

View File

@@ -1026,7 +1026,7 @@ mgcp_header_done:
&endp->local_options, local_options);
if (rc != 0) {
LOGPCONN(_conn, DLMGCP, LOGL_ERROR,
"CRCX: inavlid local connection options!\n");
"CRCX: invalid local connection options!\n");
error_code = rc;
rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_CRCX_FAIL_INVALID_CONN_OPTIONS));
goto error2;

View File

@@ -82,7 +82,7 @@ static int daemonize = 0;
const char *osmomgw_copyright =
"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"
"Philipp Maier\r\n\r\n"
"License AGPLv3+: GNU AGPL version 3 or later <http://gnu.org/licenses/agpl-3.0.html>\r\n"

View File

@@ -838,7 +838,7 @@ static void test_messages(void)
if (endp->local_options.pkt_period_min ||
endp->local_options.pkt_period_max)
printf
("Requested packetetization period: "
("Requested packetization period: "
"%d-%d\n",
endp->local_options.pkt_period_min,
endp->