<p>The following is a patch for rtpengine.c, the code originally was attempting to get the index of the transport array from the ng_flags.transport bitfield. It was using 0x5 which happens to be the length of the transports array but not the correct value for a mask of the index. Instead, the lowest 3 bits are the index, not just the 1st and 3rd bit ( which is all 0x5 gives ). So a mask of 0x7 is required here.</p>
<p>We found this when attempting to change the protocol to RTP/SAVPF (0x03). </p>
<p>diff --git a/modules/rtpengine/rtpengine.c b/modules/rtpengine/rtpengine.c<br>
index 6c7b3e6..056c835 100644<br>
--- a/modules/rtpengine/rtpengine.c<br>
+++ b/modules/rtpengine/rtpengine.c<br>
@@ -1272,9 +1272,10 @@<br>
bencode_dictionary_add(ng_flags.dict, "flags", ng_flags.flags);<br>
if (ng_flags.replace && ng_flags.replace->child)<br>
bencode_dictionary_add(ng_flags.dict, "replace", ng_flags.replace);</p>
<ul class="task-list">
<li> if ((ng_flags.transport & 0x100))</li>
<li> if ((ng_flags.transport & 0x100)) {
bencode_dictionary_add_string(ng_flags.dict, "transport-protocol",</li>
<li> transports[ng_flags.transport & 0x005]);</li>
<li> transports[ng_flags.transport & 0x007]);</li>
<li> }
if (ng_flags.rtcp_mux && ng_flags.rtcp_mux->child)
bencode_dictionary_add(ng_flags.dict, "rtcp-mux", ng_flags.rtcp_mux);</li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/415">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciXMS6Qu9mQlt6YjM7oLVyOMBq5Tcks5ntIuygaJpZM4DiFpq.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/415"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>