pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29860 )
Change subject: mgw: Log unexpected RTP AMR OA-vs-BE payload ......................................................................
mgw: Log unexpected RTP AMR OA-vs-BE payload
Change-Id: Ib5ae82c01153398491b21191a8cec9969337bbbc --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 6 insertions(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 23e785d..55f49c4 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1539,8 +1539,13 @@ int oa = amr_oa_check((char*)msgb_data(msg), msgb_length(msg)); if (oa < 0) return -1; - if (((bool)oa) != conn_src->end.codec->param.amr_octet_aligned) + if (((bool)oa) != conn_src->end.codec->param.amr_octet_aligned) { + LOG_CONN_RTP(conn_src, LOGL_NOTICE, + "rx_rtp(%u bytes): Expected RTP AMR octet-aligned=%u but got octet-aligned=%u." + " check the config of your call-agent!\n", + msgb_length(msg), conn_src->end.codec->param.amr_octet_aligned, oa); return -1; + } }
/* Check if the origin of the RTP packet seems plausible */