<h4 dir="auto">Pre-Submission Checklist</h4>



<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Commit message has the format required by CONTRIBUTING guide</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Commits are split per component (core, individual modules, libs, utils, ...)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Each component has a single commit (if not, squash them into one commit)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> No commits to README files for modules (changes must be done to docbook files<br>
in <code>doc/</code> subfolder, the README file is autogenerated)</li>
</ul>
<h4 dir="auto">Type Of Change</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Small bug fix (non-breaking change which fixes an issue)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> New feature (non-breaking change which adds new functionality)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Breaking change (fix or feature that would change existing functionality)</li>
</ul>
<h4 dir="auto">Checklist:</h4>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> PR should be backported to stable branches</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Tested changes locally</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Related to issue #XXXX (replace XXXX with an open issue number)</li>
</ul>
<h4 dir="auto">Description</h4>

<p dir="auto">Commits are separated per change dedication, even though they concern the same component.</p>
<ul dir="auto">
<li>core: add support of ICE media options to SDP parser</li>
<li>core: improve an existing data structures cloning in the SDP parser</li>
</ul>
<hr>
<p dir="auto">core: add support of ICE media options to SDP parser</p>
<p dir="auto">In the current implementation only parsing of ICE candidate<br>
attributes is supported, which makes it Possible to work<br>
with ICE candidates and parameters specifically related per<br>
candidate, but makes it Impossible to work<br>
with ICE options of the media stream level (ICE options which<br>
have an impact on the whole specific media stream).</p>
<p dir="auto">ICE candidate attributes and ICE media options have different<br>
dedication.</p>
<p dir="auto">In order to target this matter, a new linked list is introduced<br>
to store ICE media stream options.</p>
<p dir="auto">Additionally, now when parsing media stream's attributes,<br>
a couple of new helper functions have been introduced to<br>
properly extract and store ICE media options:</p>
<ul dir="auto">
<li>extract_ice_option()</li>
<li>add_sdp_ice_opt()</li>
</ul>
<p dir="auto">The following extraction approaches are supported:</p>
<ul dir="auto">
<li>multi-valued ICE options attribute (more than one value per a= header)</li>
<li>one value per attribute (multiple a= headers with ICE options present)</li>
</ul>
<p dir="auto">Also now the way how a "zeroed" on-hold is detected is improved,<br>
in case of the ICE (re)negotiation (when the connection address is equal<br>
to '0.0.0.0', the media port is equal to '9' and ice-option 'trickle' is<br>
present) the SDP is Not considered as an on-hold case, and it clearly<br>
detects it's the ICE (re)negotiation (RFC 8840), which for e.g.<br>
leads to a proper work of other side modules' functions (which use SDP<br>
parser's data structures),<br>
such as 'is_audio_on_hold()' from the textops.so module.</p>
<hr>
<p dir="auto">core: improve existing data structures cloning in the SDP parser</p>
<p dir="auto">It's been noticed that the cloning of SDP session(s) and<br>
SDP stream(s) structures doesn't allocate the ICE candidate attributes,<br>
nor it allocates (recently introduced) ICE media stream options.</p>
<p dir="auto">In order to target this a couple of new functions have been introduced:</p>
<ul dir="auto">
<li>clone_sdp_opt_attr()</li>
<li>clone_sdp_ice_attr()</li>
</ul>
<p dir="auto">And additionally the following functions have been improved, in order to<br>
properly clone/free ICE candidate attributes and (recently introduced)<br>
ICE media stream options:</p>
<ul dir="auto">
<li>clone_sdp_stream_cell()</li>
<li>free_cloned_sdp_stream()</li>
<li>free_sdp()</li>
<li>print_sdp_stream()</li>
</ul>
<p dir="auto">Additionally for a proper new structure length calculation, the following<br>
function is fixed:</p>
<ul dir="auto">
<li>clone_sdp_session_cell()</li>
</ul>
<hr>
<p dir="auto">Tagging project members to review the changes: <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/miconda/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/miconda">@miconda</a> <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/henningw/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/henningw">@henningw</a> <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/linuxmaniac/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/linuxmaniac">@linuxmaniac</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/kamailio/kamailio/pull/3034'>https://github.com/kamailio/kamailio/pull/3034</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/kamailio/kamailio/pull/3034/commits/5baa55dbf51069f0b01b122fe32244169ae0acdd" class="commit-link">5baa55d</a>  core: add support of ICE media options to SDP parser</li>
  <li><a href="https://github.com/kamailio/kamailio/pull/3034/commits/ad0cb385e48d06c17a62e6ca690afeb18174d423" class="commit-link">ad0cb38</a>  core: improve an existing data structures cloning in the SDP parser</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/kamailio/kamailio/pull/3034/files">4 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3034/files#diff-ceffb276cfbfbd846d9ea0177050d08e0ed476a5c46a5156bbd4b7dd0017b041">src/core/parser/sdp/sdp.c</a>
    (290)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3034/files#diff-bffc719c35c14f5cd7ef17bf2796b0eec0816805569a3eed93f7c1590ad944a4">src/core/parser/sdp/sdp.h</a>
    (40)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3034/files#diff-74499d544af305e6aeb2baf04edb4954fbd5b2adc952f338469e0ecaebbbe8cf">src/core/parser/sdp/sdp_helpr_funcs.c</a>
    (60)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3034/files#diff-c78ef9e89c5fb5b269428083696024e60a41d116e834786fde2dd03cf189f2ba">src/core/parser/sdp/sdp_helpr_funcs.h</a>
    (1)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/3034.patch'>https://github.com/kamailio/kamailio/pull/3034.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/3034.diff'>https://github.com/kamailio/kamailio/pull/3034.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/3034">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPF4K45N2KQVXILHZDU3YUDVANCNFSM5OXTKKFA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZLAEZTG5VRIZNYQGWTU3YUDVA5CNFSM5OXTKKFKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4RA67B4A.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/pull/3034</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/3034",
"url": "https://github.com/kamailio/kamailio/pull/3034",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>