Attention is currently required from: pespin.
dexter has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-mgw/+/32218
)
Change subject: mgcp_codec: fix codec decision
......................................................................
Patch Set 3:
(8 comments)
File include/osmocom/mgcp/mgcp_codec.h:
https://gerrit.osmocom.org/c/osmo-mgw/+/32218/comment/3ce0af72_57723ec1
PS2, Line 16: int mgcp_codec_decide(struct mgcp_conn_rtp *conn, struct mgcp_conn_rtp
*conn_opposite);
my understanding is that this decides which codec is
used in one direction between conn A and conn B […]
Done
File src/libosmo-mgcp/mgcp_codec.c:
https://gerrit.osmocom.org/c/osmo-mgw/+/32218/comment/28f2c879_c1d1d047
PS2, Line 440: conn->end.codec = mgcp_codec_find_same(conn,
found_same_codec_opposite);
I wonder why do you need to call
mgcp_codec_find_same() twice here, something looks wrong imho.
The problem is that
it is not possible to assign codec_conn_dst to conn_src->end.codec since then the
pointer in conn_src->end.codec becomes stale when conn_dst is freed. So we just search
once more to get the pointer from the list within conn_src
https://gerrit.osmocom.org/c/osmo-mgw/+/32218/comment/563f1f24_4f257dd8
PS2, Line 449: found_same_codec_opposite = codec_find_convertible(conn_opposite,
&conn->end.codecs[i]);
I wonder why do you need to call
codec_find_convertible() twice here, something looks wrong imho.
(same as above)
https://gerrit.osmocom.org/c/osmo-mgw/+/32218/comment/257caf90_c3a7843a
PS2, Line 461: }
IIUC you are finding/selecting/setting the same codec
A->B and B->A here, but I wonder if that reall […]
When we trying to find a
convertible codec, then it indeed may be the case that A ends up with a different codec
than B. But it will always be a compatible codec. What however is true is when you swap
conn_src and conn_dst, then the result will be different but I see no problem with this,
it would still be two codecs that are compatible.
This is also more a theoretical issue, normally one side (the leg pointing to the MSC)
will assign exactly one codec.
File src/libosmo-mgcp/mgcp_network.c:
https://gerrit.osmocom.org/c/osmo-mgw/+/32218/comment/bf1d569b_dc6ce036
PS2, Line 514: /* Lookup a suitable codec in the destination connection. */
I see no lookup being done here anymore.
There
was even more that I have overlooked.
File src/libosmo-mgcp/mgcp_protocol.c:
https://gerrit.osmocom.org/c/osmo-mgw/+/32218/comment/f870f6af_3802cde0
PS2, Line 809: conn_opposite = mgcp_find_dst_conn(conn->conn);
see, here we have a clear concept of conn_src
("conn" here) and conn_dst (returned by mgcp_find_dst_ […]
Done
https://gerrit.osmocom.org/c/osmo-mgw/+/32218/comment/3ce68c38_04c74e72
PS2, Line 816: if (mgcp_codec_decide(conn, conn_rtp_opposite) != 0)
in here you are deciding what codec is used to
forward/transmit from conn_src to conn_dst.
Done
File src/libosmo-mgcp/mgcp_vty.c:
https://gerrit.osmocom.org/c/osmo-mgw/+/32218/comment/0f544b7f_291209de
PS2, Line 703: "allow-transcoding", "Allow transcoding\n")
Add vty_out telling the user that this command is
deprecated and is a NO-OP, so that they can drop i […]
Oh, looks like this has been
forgotten on all other DEFUN_DEPRECATED functions as well.
--
To view, visit
https://gerrit.osmocom.org/c/osmo-mgw/+/32218
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I6c3291f825488e5d8ce136aeb18450156794aeb5
Gerrit-Change-Number: 32218
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 06 Apr 2023 11:25:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment