<p>The issue is related to the function call sdp_keep_codecs_by_id(..).<br>
It seems to not remove multiple "a=fmtp" lines related to a removed codec. Shortened example:<br>
<code>m=audio 15684 RTP/AVP 8 18 4 0 101 13 a=fmtp:18 annexa=yes a=fmtp:18 annexb=no</code></p>
<p>The resulting SDP that cause the error message is then this:<br>
<code>v=0 o=- 7292 1 IN IP4 192.168.50.50 s=- t=0 0 m=audio 18466 RTP/AVP 8 101 c=IN IP4 XXX.XXX.XXX.XXX a=rtpmap:101 telephone-event/8000 a=fmtp:18 annexa=yes a=fmtp:101 0-15 a=ptime:30 a=silenceSupp:off - - - - a=sendrecv</code></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1983?email_source=notifications&email_token=ABO7UZMMQGWTQKVLQ3AOFD3P2TCXJA5CNFSM4HXY2Q2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXYVTKQ#issuecomment-502356394">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZLMKS7HRPRQFNLQTXLP2TCXJANCNFSM4HXY2Q2A">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZPUJ2HKRSKYR74YBZLP2TCXJA5CNFSM4HXY2Q2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXYVTKQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1983?email_source=notifications\u0026email_token=ABO7UZMMQGWTQKVLQ3AOFD3P2TCXJA5CNFSM4HXY2Q2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXYVTKQ#issuecomment-502356394",
"url": "https://github.com/kamailio/kamailio/issues/1983?email_source=notifications\u0026email_token=ABO7UZMMQGWTQKVLQ3AOFD3P2TCXJA5CNFSM4HXY2Q2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXYVTKQ#issuecomment-502356394",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>