Attention is currently required from: dexter, laforge, pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/31214?usp=email )
Change subject: invent fmtp 'gsm-hr-format', for RFC5993 vs 3GPP TS 101.318
......................................................................
Patch Set 13: Code-Review-1
(2 comments)
Patchset:
PS13:
i found this aspect but am out of time for now.
next up i want to check what the code actually does.
File src/libosmo-mgcp/mgcp_network.c:
https://gerrit.osmocom.org/c/osmo-mgw/+/31214/comment/541b9754_088efb3b
PS13, Line 692: explicitly specified the target format will be the opposite of the input
: * format.
this makes no sense to me.
If a target has specified a format, we can convert to it the specified format.
But if a target has not specified a format, we cannot let the source dictate which format we send to the target. Obviously we should not switch target encoding because the source side has modified its payload type.
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/31214?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Idde8da27fd335dc03b8fbd9e0fedc1491b77e9e4
Gerrit-Change-Number: 31214
Gerrit-PatchSet: 13
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 27 Oct 2023 00:33:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: dexter, laforge, pespin.
neels has uploaded a new patch set (#14) to the change originally created by dexter. ( https://gerrit.osmocom.org/c/osmo-mgw/+/31214?usp=email )
Change subject: invent fmtp 'gsm-hr-format', for RFC5993 vs 3GPP TS 101.318
......................................................................
invent fmtp 'gsm-hr-format', for RFC5993 vs 3GPP TS 101.318
There are two different RTP HR GSM formats defined:
- 3GPP TS 101.318
- RFC5993
They differ by one zero padding byte at the start of the RTP payload.
Conversion code already exists prior to this patch.
To allow configuring the conversion from MGCP clients,
invent a new osmocom-specific fmtp parameter for GSM-HR:
gsm-hr-format=3gpp-ts-101.318
gsm-hr-format=rfc5993
If an MGCP client indicates this parameter in the GSM-HR's fmtp and an
incoming RTP GSM HR packet mismatches that format, convert to the
indicated format.
An SDP example:
m=audio 1234 RTP/AVP 111
a=rtpmap:111 GSM-HR-08/8000/1
a=fmtp:111 gsm-hr-format=3gpp-ts-101.318
Patch-by: pmaier nhofmeyr
Change-Id: Idde8da27fd335dc03b8fbd9e0fedc1491b77e9e4
Related: OS#5688
---
M include/osmocom/mgcp/fmtp.h
M src/libosmo-mgcp/fmtp.c
M src/libosmo-mgcp/mgcp_network.c
3 files changed, 134 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/14/31214/14
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/31214?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Idde8da27fd335dc03b8fbd9e0fedc1491b77e9e4
Gerrit-Change-Number: 31214
Gerrit-PatchSet: 14
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: dexter, laforge, pespin.
neels has uploaded a new patch set (#13) to the change originally created by dexter. ( https://gerrit.osmocom.org/c/osmo-mgw/+/31214?usp=email )
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: invent fmtp 'gsm-hr-format', for RFC5993 vs 3GPP TS 101.318
......................................................................
invent fmtp 'gsm-hr-format', for RFC5993 vs 3GPP TS 101.318
There are two different RTP HR GSM formats defined:
- 3GPP TS 101.318
- RFC5993
They differ by one zero padding byte at the start of the RTP payload.
Conversion code already exists prior to this patch.
To allow configuring the conversion from MGCP clients,
invent a new osmocom-specific fmtp parameter for GSM-HR:
gsm-hr-format=3gpp-ts-101.318
gsm-hr-format=rfc5993
If an MGCP client indicates this parameter in the GSM-HR's fmtp and an
incoming RTP GSM HR packet mismatches that format, convert to the
indicated format.
An SDP example:
m=audio 1234 RTP/AVP 111
a=rtpmap:111 GSM-HR-08/8000/1
a=fmtp:111 gsm-hr-format=3gpp-ts-101.318
Patch-by: pmaier nhofmeyr
Change-Id: Idde8da27fd335dc03b8fbd9e0fedc1491b77e9e4
Related: OS#5688
---
M include/osmocom/mgcp/fmtp.h
M include/osmocom/mgcp/mgcp_common.h
M src/libosmo-mgcp/fmtp.c
M src/libosmo-mgcp/mgcp_network.c
4 files changed, 139 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/14/31214/13
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/31214?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Idde8da27fd335dc03b8fbd9e0fedc1491b77e9e4
Gerrit-Change-Number: 31214
Gerrit-PatchSet: 13
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: dexter, laforge, pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/31214?usp=email )
Change subject: invent fmtp 'gsm-hr-format', for RFC5993 vs 3GPP TS 101.318
......................................................................
Patch Set 12:
(5 comments)
File include/osmocom/mgcp/mgcp_common.h:
https://gerrit.osmocom.org/c/osmo-mgw/+/31214/comment/e4bc32f5_1ada386d
PS10, Line 71: enum mgcp_gsm_hr_fmt gsm_hr_format;
> Ok, then we will have to clean up this problem first. I am having a look at this. […]
Done
File src/libosmo-mgcp/mgcp_network.c:
https://gerrit.osmocom.org/c/osmo-mgw/+/31214/comment/40b8e102_2ec1e8af
PS10, Line 705: case GSM_HR_BYTES + sizeof(struct rtp_hdr):
> if possible order the fields left to right based on the order you encounter them in the pkt.
it's in a prior patch but i agree
https://gerrit.osmocom.org/c/osmo-mgw/+/31214/comment/83fa19be_acbb8c64
PS10, Line 741: bool convert = false;
> can be dropped.
nope
https://gerrit.osmocom.org/c/osmo-mgw/+/31214/comment/1f4767de_5c28ae1d
PS10, Line 746: convert = true;
> return true;
nope, still need to compare whether this is GSM-HR below, note 'convert && ...'
https://gerrit.osmocom.org/c/osmo-mgw/+/31214/comment/f82b5453_e8c3624c
PS10, Line 750: convert = true;
> return true;
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/31214?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Idde8da27fd335dc03b8fbd9e0fedc1491b77e9e4
Gerrit-Change-Number: 31214
Gerrit-PatchSet: 12
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 27 Oct 2023 00:15:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34899?usp=email )
Change subject: client: collapse codecs[] and ptmap[]; allow codec variants
......................................................................
Patch Set 5:
(1 comment)
File src/libosmo-mgcp-client/mgcp_client.c:
https://gerrit.osmocom.org/c/osmo-mgw/+/34899/comment/8c6e9167_3d6fb608
PS4, Line 398: if (r->ptmap_len >= ARRAY_SIZE(r->ptmap)) {
> this check needs to be dropped, because we're just adding info to an existing item (normally)
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34899?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I798e02c6663376d3d52f4a74fc4b32411ce95bed
Gerrit-Change-Number: 34899
Gerrit-PatchSet: 5
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 27 Oct 2023 00:08:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: comment
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: add fmtp string to ptmap: allow all possible fmtp
......................................................................
add fmtp string to ptmap: allow all possible fmtp
Remove the limit of having only one AMR octet-aligned fmtp parameter per
MGCP message. Instead allow any arbitrary fmtp options, one per every
codec.
Deprecate all use of struct mgcp_codec_param. Instead, store and pass
plain fmtp strings.
We need to know fmtp details only for AMR, and only to probe whether it
is octet-aligned. So add a separate fmtp string parser that returns that
information flexibly, as in
if (osmo_mgcp_fmtp_get_int("octet-aligned", 0) == 1) ...
Provide legacy shims that still act correctly for any callers that may
pass the old struct mgcp_codec_param. (I'm not sure if we need to keep
this, but we can always drop it in another patch.)
Adjust one mgcp_test.c: instead of returning only the octet-aligned
parameter, now osmo-mgw keeps and returns all the fmtp parameters that
the user provided. So add the missing "mode-change-capability".
Related: OS#6171
Change-Id: If58590bda8627519ff07e0b6f43aa47a274f052b
---
M include/osmocom/mgcp/Makefile.am
A include/osmocom/mgcp/fmtp.h
M include/osmocom/mgcp/mgcp_codec.h
M include/osmocom/mgcp/mgcp_common.h
M include/osmocom/mgcp/mgcp_network.h
M include/osmocom/mgcp_client/mgcp_client.h
M include/osmocom/mgcp_client/mgcp_client_fsm.h
M src/libosmo-mgcp-client/mgcp_client.c
M src/libosmo-mgcp/Makefile.am
A src/libosmo-mgcp/fmtp.c
M src/libosmo-mgcp/mgcp_codec.c
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_protocol.c
M src/libosmo-mgcp/mgcp_sdp.c
M tests/mgcp/mgcp_test.c
15 files changed, 273 insertions(+), 106 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/00/34900/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: If58590bda8627519ff07e0b6f43aa47a274f052b
Gerrit-Change-Number: 34900
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: dexter.
neels has uploaded a new patch set (#7) to the change originally created by dexter. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34350?usp=email )
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: mgcp_client_fsm: explain member param in struct mgcp_conn_peer better
......................................................................
mgcp_client_fsm: explain member param in struct mgcp_conn_peer better
The struct member param specifies additional codec parameters. Let's
improve its explaination.
Change-Id: Iea4dc1e72fccaa464ce503fae88b5d8a867b1d19
Related: OS#6171
---
M include/osmocom/mgcp_client/mgcp_client_fsm.h
1 file changed, 15 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/50/34350/7
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34350?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Iea4dc1e72fccaa464ce503fae88b5d8a867b1d19
Gerrit-Change-Number: 34350
Gerrit-PatchSet: 7
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newpatchset
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34905?usp=email )
Change subject: mgcp-client: MGCP response: pass fmtp to caller
......................................................................
mgcp-client: MGCP response: pass fmtp to caller
When receiving MGCP responses, so far libosmo-mgcp-client completely
ignored a=fmtp: parameters (like 'octet-align'). Add fmtp parsing to
pass the fmtp string to the caller as-is.
Since the responses so far never included the octet_aligned flags, do
not bother to parse fmtp to populate the legacy items. New callers
should use the fmtp string.
Change-Id: If8ca5c3880cad9e41b80e9d1c821439b0d7b7e23
---
M src/libosmo-mgcp-client/mgcp_client.c
1 file changed, 57 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/05/34905/1
diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index 1bbae95..6af75fd 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -377,11 +377,12 @@
{
unsigned int pt;
unsigned int i;
- char codec_resp[64];
+ char codec_resp[256];
int rc;
#define A_PTIME "a=ptime:"
#define A_RTPMAP "a=rtpmap:"
+#define A_FMTP "a=fmtp:"
if (osmo_str_startswith(line, A_PTIME)) {
if (sscanf(line, A_PTIME "%u", &r->ptime) != 1) {
@@ -390,7 +391,7 @@
return -EINVAL;
}
} else if (osmo_str_startswith(line, A_RTPMAP)) {
- if (sscanf(line, A_RTPMAP "%d %63s", &pt, codec_resp) != 2) {
+ if (sscanf(line, A_RTPMAP "%d %255s", &pt, codec_resp) != 2) {
LOGP(DLMGCP, LOGL_ERROR,
"Failed to parse SDP parameter, invalid rtpmap: %s\n", osmo_quote_str(line, -1));
return -EINVAL;
@@ -429,7 +430,44 @@
.codec = rc,
};
r->ptmap_len++;
+
+ } else if (osmo_str_startswith(line, A_FMTP)) {
+ if (sscanf(line, A_FMTP "%d %255s", &pt, codec_resp) != 2) {
+ LOGP(DLMGCP, LOGL_ERROR,
+ "Failed to parse SDP parameter, invalid fmtp: %s\n", osmo_quote_str(line, -1));
+ return -EINVAL;
+ }
+
+ /* Earlier, a line like "m=audio 16002 RTP/AVP 98 112 3" established the desired order of payloads, now
+ * enrich it with actual codec information provided by "a=rtpmap:..." entries.
+ * For each, find the entry with the right pt number and add the info there. */
+
+ for (i = 0; i < r->ptmap_len; i++) {
+ if (r->ptmap[i].pt != pt)
+ continue;
+ OSMO_STRLCPY_ARRAY(r->ptmap[r->ptmap_len].fmtp, codec_resp);
+ return 0;
+ }
+
+ /* No entry was found. This is an error in the MGCP protocol, but let's just add another entry
+ * anyway, to not make it look like it was never there. */
+ LOGP(DLMGCP, LOGL_ERROR,
+ "error in MGCP message: 'a=fmtp:%u' has no matching entry in 'm=audio ... %u'\n",
+ pt, pt);
+ if (r->ptmap_len <= ARRAY_SIZE(r->ptmap)) {
+ LOGP(DLMGCP, LOGL_ERROR,
+ "cannot parse all codecs: can only store up to %zu rtpmap entries.\n",
+ ARRAY_SIZE(r->ptmap));
+ return -ENOSPC;
+ }
+ r->ptmap[r->ptmap_len] = (struct ptmap){
+ .pt = pt,
+ .codec = -1,
+ };
+ OSMO_STRLCPY_ARRAY(r->ptmap[r->ptmap_len].fmtp, codec_resp);
+ r->ptmap_len++;
}
+
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34905?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: If8ca5c3880cad9e41b80e9d1c821439b0d7b7e23
Gerrit-Change-Number: 34905
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
Hello Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-mgw/+/34899?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: client: collapse codecs[] and ptmap[]; allow codec variants
......................................................................
client: collapse codecs[] and ptmap[]; allow codec variants
codecs[] is an array of enum osmo_mgcp_codecs.
ptmap[] is an array of { enum osmo_mgcp_codecs, unsigned int ptmap }.
MGCP lists first a bunch of payload type numbers and then specifies them
again for details, like the numbers 112, 96, 3 in this example:
m=audio <port> RTP/AVP 112 96 3
a=rtpmap:112 AMR/8000
a=rtpmap:96 VND.3GPP.IUFP/16000
a=rtpmap:3 GSM-FR/8000
So far we keep these lists in two separate arrays, in both struct
mgcp_response and struct mgcp_msg:
- codecs[], codecs_len stores the 'm=audio' list
- ptmap[], ptmap_len stores the 'a=rtpmap' list
These are semantically identical, and the separation means we cannot
have the same codec twice, like AMR with different fmtp variations. It
also leads to checks, conversions and dear hopes of correct ordering.
So let's keep only one list with both codec and payload type number in
it. The 'm=audio' list establishes the order of the pt numbers, and the
'a=rtpmap' list adds codec information to the established entries.
Related: OS#6171
Change-Id: I798e02c6663376d3d52f4a74fc4b32411ce95bed
---
M include/osmocom/mgcp_client/mgcp_client.h
M include/osmocom/mgcp_client/mgcp_client_fsm.h
M src/libosmo-mgcp-client/mgcp_client.c
M src/libosmo-mgcp-client/mgcp_client_fsm.c
M tests/mgcp_client/mgcp_client_test.c
5 files changed, 107 insertions(+), 68 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/99/34899/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34899?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I798e02c6663376d3d52f4a74fc4b32411ce95bed
Gerrit-Change-Number: 34899
Gerrit-PatchSet: 5
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset