laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/31021 )
Change subject: mgcp_network: improve coment ......................................................................
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 --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 3 insertions(+), 4 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index d93e695..d6028a2 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1537,12 +1537,11 @@ 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;