<p>ims_dialog bugfix for registering dialog callbacks<br>
ims_qos bugfix for Rx register dialog callback</p>

<h4>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>Type Of Change</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 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"> Breaking change (fix or feature that would change existing functionality)</li>
</ul>
<h4>Checklist:</h4>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> PR should be backported to stable branches --> 5.3</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Tested changes locally --> Tested locally based on 5.1.6</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>Description</h4>

<p>ims_dialog bugfix for registering dialog callbacks</p>
<p>In Rx scenarios of parallel forking (several INVITEs with same CALLID<br>
and FROMTAG sent to PCSCF) and INVITE for orig and term handled in<br>
same PCSCF (means also INVITEs with identical  CALLID and FROMTAG) the wrong<br>
dialog is selected for registering the callback (i.e. the callback<br>
for sending STR) when 200OK from terminator is processed.<br>
Root cause is that dialog is searched with callid-fromtag-totag but at<br>
the time of dialog insertion (processing of INVITE) no totag is available.<br>
fix is to get ctx dialog at 200OK processing before suspending the<br>
transaction - save dialog until AAA is received - use this dialog for<br>
registering the STR callback.</p>
<p>ims_qos bugfix for Rx register dialog callback</p>
<p>In some scenarios like parallel forking several INVITE with identical<br>
CALLID and FROMTAG sent to PCSCF which inserts dialogues for each INVITE.<br>
When 200OK is received in PCSCF the dialog callback must be registered<br>
for the respective dialog. Currently sometimes the wrong dialog is selected<br>
by searching with CALLID FROMTAG and TOTAG thus leading to problem<br>
no STR is sent at BYE. Fix is to pickup the right dialog before suspending<br>
the transaction during AAR/AAA processing and reuse this saved dialog<br>
after AAA reception for registering the dialog callback.</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/2263'>https://github.com/kamailio/kamailio/pull/2263</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>ims_dialog  bugfix for registering dialog callbacks</li>
  <li>ims_qos        bugfix for Rx register dialog callback</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2263/files#diff-e94797ce8956aab28f5284b2be858baf">src/modules/ims_dialog/dlg_cb.c</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2263/files#diff-e2b80587b56decb17c6e2371f2cd3ec2">src/modules/ims_dialog/dlg_cb.h</a>
    (5)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2263/files#diff-649bdc8355a04df1518310ce0b1e80f5">src/modules/ims_dialog/dlg_handlers.c</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2263/files#diff-b6e34ce76c89106d2d95f5f71a3b9d0b">src/modules/ims_qos/ims_qos_mod.c</a>
    (7)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2263/files#diff-ca49fce9106eff999a85445bca53f376">src/modules/ims_qos/rx_aar.c</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2263/files#diff-e2e4f7ed30fb5f1713f7d283b31931fc">src/modules/ims_qos/rx_aar.h</a>
    (1)
  </li>
</ul>

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

<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/pull/2263">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZMUCVH4C6BJIPSBGJTRJIPKBANCNFSM4LTREO7Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZOHDFOUG5G2DUWNO63RJIPKBA5CNFSM4LTREO72YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IYI2SMA.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/pull/2263",
"url": "https://github.com/kamailio/kamailio/pull/2263",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>