<p>If fix_nated_sdp() is called with flags that require rewrite of media IP (c=) and origin IP (o=) then oldmediaip attribute is added twice.</p>

<p>We should have different attributes to distinguish between the two replaced IPs or keep the same attribute with an extra value:</p>

<ul class="task-list">
<li>for connection IP:

<ul class="task-list">
<li>a=oldcmediaip=IP</li>
<li>a=oldmediaip=IP;c</li>
</ul>
</li>
<li>for origin IP:

<ul class="task-list">
<li>a=oldomediaip=IP</li>
<li>a=oldmediaip=IP;o</li>
</ul>
</li>
</ul>

<p>Also, we should have flags to control the addition of this attribute.  In some cases we don't need the old value and we want to keep the size of the SDP small.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/377">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOcidb0DYIIEz4UOLoRqed8_kcjnWnYks5nH83jgaJpZM4C0ADV.gif" width="1" /></p>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"View this Issue on GitHub","action":{"@type":"ViewAction","url":"https://github.com/OpenSIPS/opensips/issues/377","name":"View Issue"}}</script>