mgw: Log unexpected RTP AMR OA-vs-BE payload

Change-Id: Ib5ae82c01153398491b21191a8cec9969337bbbc
This commit is contained in:
Pau Espin Pedrol
2022-10-24 16:57:39 +02:00
parent d358d71206
commit d266c374ee

View File

@@ -1539,8 +1539,13 @@ static int rx_rtp(struct msgb *msg)
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 */