diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2023-12-08 05:55:02 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2024-02-09 05:17:39 +0100 |
commit | 083cc7ddb93535147a8dfad4a0331bf5643a83fc (patch) | |
tree | 6bfaf8546cfec0dfe521213348caf50b4cc324b3 | |
parent | 5a56df1db05ede979ed886e4e40367c2b4a69e6b (diff) |
SDP/MGCP: pass octet-align=1 for AMR / pass all fmtp
Since recent libosmo-mgcp-client update (see Depends), we can now pass
fmtp for each individual codec entry to be sent in the SDP. Use that new
feature to pass any fmtp from rtp_stream.c to the MGW via MGCP.
In effect, this adds the 'octet-align=1', defined in codec_mapping.c as
the default for AMR, which was missing from the SDP/MGCP that osmo-msc
sends out.
A 2G to 2G call worked out OK without it, because omitting the
'octet-align' setting from MGCP disables all octet-align payload checks
in osmo-mgw. Both 2G call legs use octet-align=1, and things work out.
Running a call from 3G to 2G before this patch would result in osmo-mgw
dropping the RTP with logging like:
DRTP NOTICE (rtpbridge/1@bsc0 I:B38CF524) rx_rtp(44 bytes): Expected RTP AMR octet-aligned=1 but got octet-aligned=0. check the config of your call-agent! (mgcp_network.c:1527)
...because osmo-bsc's MGW was instructed to expect octet-align=1, while
osmo-msc's MGW emits octet-align=0. This happens because converting the
3G IuUP to 2G AMR heeds the RFC 6871 specified default of octet-align=0.
So, after this patch, we accurately send "octet-align=1", and make the
IuUP-to-AMR conversion emit octet-align=1 to match 2G.
Side note: 3GPP specifies AoIP to use bandwidth-efficient AMR only;
however, in all known Osmocom world, our 2G BTS emit octet-aligned AMR
instead -- so in practice it makes most sense to run osmo-msc with
octet-align=1 as the default. osmo-msc shall at some point feature a
.cfg option to switch to octet-align=0 to conform with 3GPP, but until
then, osmo-msc now configures all AMR to be octet-align=1.
Depends: osmo-mgw If58590bda8627519ff07e0b6f43aa47a274f052b
Change-Id: Ief9225c9bcf7525a9a0a07c282ffb8cc0d092186
-rw-r--r-- | TODO-RELEASE | 3 | ||||
-rw-r--r-- | src/libmsc/rtp_stream.c | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/TODO-RELEASE b/TODO-RELEASE index 8b07972f3..142e073cd 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,4 +7,5 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line -libosmogsm >1.9.0 ABI breakage in struct osmo_gsup_pdp_info, use new fields pdp_type_* and pdp_address.
\ No newline at end of file +libosmogsm >1.9.0 ABI breakage in struct osmo_gsup_pdp_info, use new fields pdp_type_* and pdp_address. +libosmo-mgcp-client >= 1.13 uses new public API to parse SDP fmtp diff --git a/src/libmsc/rtp_stream.c b/src/libmsc/rtp_stream.c index eb9ba7e52..52a29bdf1 100644 --- a/src/libmsc/rtp_stream.c +++ b/src/libmsc/rtp_stream.c @@ -334,6 +334,7 @@ static int rtp_stream_do_mgcp_verb(struct rtp_stream *rtps, enum mgcp_verb verb, .codec = m->mgcp, .pt = codec->payload_type, }; + OSMO_STRLCPY_ARRAY(verb_info.ptmap[i].fmtp, codec->fmtp); i++; verb_info.codecs_len = i; verb_info.ptmap_len = i; |