[prev in list] [next in list] [prev in thread] [next in thread] 

List:       serdev
Subject:    [sr-dev] [kamailio/kamailio] ims_registrar_pcscf:  changes for ul db_mode DB_ONLY (PR #3317)
From:       petermarianF <notifications () github ! com>
Date:       2022-12-22 15:13:16
Message-ID: kamailio/kamailio/pull/3317 () github ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Enable registration of pcscf contact callback during download from db location table \
and inserting pcontact (normally this callback is registered during handling of \
REGISTER). Refuse REGISTER when pcontact is expired since [0 to 20] seconds. Within \
this time window a NOTIFY is expected from scscf and in order to avoid race time \
conditions between scscf and pcscf REGISTER will be refused. Refuse REGISTER when \
pcontact is expired longer than 20 seconds - send PUBLISH (contact expired) to scscf \
to trigger NOTIFY. In both REGISTER refused scenarios routing script should reply 500 \
- Deregister in progress.


&lt;!-- Kamailio Pull Request Template --&gt;

&lt;!--
IMPORTANT:
  - for detailed contributing guidelines, read:
    https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
  - pull requests must be done to master branch, unless they are backports
    of fixes from master branch to a stable branch
  - backports to stable branches must be done with &#39;git cherry-pick -x ...&#39;
  - code is contributed under BSD for core and main components (tm, sl, auth, tls)
  - code is contributed GPLv2 or a compatible license for the other components
  - GPL code is contributed with OpenSSL licensing exception
--&gt;

#### Pre-Submission Checklist
&lt;!-- Go over all points below, and after creating the PR, tick all the checkboxes \
that apply --&gt; &lt;!-- All points should be verified, otherwise, read the \
CONTRIBUTING guidelines from above--&gt; &lt;!-- If you&#39;re unsure about any of \
                these, don&#39;t hesitate to ask on sr-dev mailing list --&gt;
- [ x] Commit message has the format required by CONTRIBUTING guide
- [ x] Commits are split per component (core, individual modules, libs, utils, ...)
- [ x] Each component has a single commit (if not, squash them into one commit)
- [ x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)

#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

#### Checklist:
&lt;!-- Go over all points below, and after creating the PR, tick the checkboxes that \
                apply --&gt;
- [ ] PR should be backported to stable branches
- [ x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)

#### Description
&lt;!-- Describe your changes in detail --&gt;
In case a pcontact found in location db has to be inserted into pcscf cache depending \
on contact state also callbacks have  to be registered for this pcontact.  \
Registering of callback_pcscf_contact_cb is enabled in this module. Handling of \
contact expiry is usually triggered in the scscf (mem_timer_udomain which runs every \
10 secs). Sending of NOTIFY to pcscf may take up to 20 seconds from start of expiry \
due to timing conditions. To avoid race time conditions between a REREGISTER and the \
expiry handler state machine in the scscf an approach is chosen to refuse a \
REREGISTER in time window of 20 seconds after pcontact expiry on the pcscf (thus \
allowing  expiry handling to finish). REREGISTER is refused in this scenario with new \
return_code -2. In case a REREGISTER arrives at pcscf and the respective pcontact is \
expired longer than time window of 20 seconds registration also is refused with rc -2 \
and additionaly PUBLISH is sent to scscf with expiry = 0. The rc -2 shall be handled \
in register.cfg script as follows:

pcscf_save_pending(&quot;location&quot;);
                switch ($retcode) {
                        case -1:
                                # Missing/wrong Information in REGISTER.
                                send_reply(&quot;400&quot;, &quot;Information wrong - \
See log.&quot;);  exit;
                                break;
                        case -2:
                                # De-Register in Progress, or PUBLISH ongoing due to \
                registration expiry,
                                # or new REGISTER blocked because registration just \
                expired (up to 20sec).
                                append_to_reply(&quot;Retry-After: 30\r\n&quot;);
                                send_reply(&quot;500&quot;, &quot;Deregister in \
progress - Please try again&quot;);  exit;
                                break;
                }



You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3317

-- Commit Summary --

  * ims_registrar_pcscf:  changes for ul db_mode DB_ONLY

-- File Changes --

    M src/modules/ims_registrar_pcscf/ims_registrar_pcscf_mod.c (21)
    M src/modules/ims_registrar_pcscf/notify.c (4)
    M src/modules/ims_registrar_pcscf/save.c (37)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/3317.patch
https://github.com/kamailio/kamailio/pull/3317.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3317
You are receiving this because you are subscribed to this thread.

Message ID: &lt;kamailio/kamailio/pull/3317@github.com&gt;


[Attachment #5 (text/html)]

<p dir="auto">Enable registration of pcscf contact callback during download from db \
location table and inserting pcontact (normally this callback is registered during \
handling of REGISTER). Refuse REGISTER when pcontact is expired since [0 to 20] \
seconds. Within this time window a NOTIFY is expected from scscf and in order to \
avoid race time conditions between scscf and pcscf REGISTER will be refused. Refuse \
REGISTER when pcontact is expired longer than 20 seconds - send PUBLISH (contact \
expired) to scscf to trigger NOTIFY. In both REGISTER refused scenarios routing \
script should reply 500 - Deregister in progress.</p>


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



<ul dir="auto">
<li>[ x] Commit message has the format required by CONTRIBUTING guide</li>
<li>[ x] Commits are split per component (core, individual modules, libs, utils, \
...)</li> <li>[ x] Each component has a single commit (if not, squash them into one \
commit)</li> <li>[ x] No commits to README files for modules (changes must be done to \
docbook files<br> in <code class="notranslate">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>[ x] 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 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>[ x] 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">In case a pcontact found in location db has to be inserted into pcscf \
cache depending on contact state also callbacks have  to be registered for this \
pcontact.  Registering of callback_pcscf_contact_cb is enabled in this module.<br> \
Handling of contact expiry is usually triggered in the scscf (mem_timer_udomain which \
runs every 10 secs). Sending of NOTIFY to pcscf may take up to 20 seconds from start \
of expiry due to timing conditions.<br> To avoid race time conditions between a \
REREGISTER and the expiry handler state machine in the scscf an approach is chosen to \
refuse a REREGISTER in time window of 20 seconds after pcontact expiry on the pcscf \
(thus allowing  expiry handling to finish). REREGISTER is refused in this scenario \
with new return_code -2.<br> In case a REREGISTER arrives at pcscf and the respective \
pcontact is expired longer than time window of 20 seconds registration also is \
refused with rc -2 and additionaly PUBLISH is sent to scscf with expiry = 0.<br> The \
rc -2 shall be handled in register.cfg script as follows:</p> <p \
dir="auto">pcscf_save_pending("location");<br> switch ($retcode) {<br>
case -1:<br>
# Missing/wrong Information in REGISTER.<br>
send_reply("400", "Information wrong - See log.");<br>
exit;<br>
break;<br>
case -2:<br>
# De-Register in Progress, or PUBLISH ongoing due to registration expiry,<br>
# or new REGISTER blocked because registration just expired (up to 20sec).<br>
append_to_reply("Retry-After: 30\r\n");<br>
send_reply("500", "Deregister in progress - Please try again");<br>
exit;<br>
break;<br>
}</p>

<hr>

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


<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/kamailio/kamailio/pull/3317/commits/6d7d2faf534b8475db1c2c515c7580b7dec08cb9" \
class="commit-link">6d7d2fa</a>  ims_registrar_pcscf:  changes for ul db_mode \
DB_ONLY</li> </ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: \
inline-block">(<a href="https://github.com/kamailio/kamailio/pull/3317/files">3&nbsp;files</a>)</p>
 <ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3317/files#diff-95b3414b73f8724 \
7ac34e656abb9f3b9ba467d493f2093abfd0d855d7bee740d">src/modules/ims_registrar_pcscf/ims_registrar_pcscf_mod.c</a>
  (21)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3317/files#diff-926a04f55fef84d \
d254f9a06e9cf12ad9811d9e550c3dab9d66db207b849b3ec">src/modules/ims_registrar_pcscf/notify.c</a>
  (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3317/files#diff-db0b0996a57771d \
dcccd14789eeb4ff956734135a00172604aff37292a797920">src/modules/ims_registrar_pcscf/save.c</a>
  (37)
  </li>
</ul>

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

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br \
/>Reply to this email directly, <a \
href="https://github.com/kamailio/kamailio/pull/3317">view it on GitHub</a>, or <a \
href="https://github.com/notifications/unsubscribe-auth/ABO7UZLYNTRT3KEHMWTYMYLWORVYZANCNFSM6AAAAAATG2PSU4">unsubscribe</a>.<br \
/>You are receiving this because you are subscribed to this thread.<img \
src="https://github.com/notifications/beacon/ABO7UZLIKN26HC7ILGXA32TWORVYZA5CNFSM6AAAAAATG2PSU6WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFTYZHXE.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>&lt;kamailio/kamailio/pull/3317</span><span>@</span><span>github</span><span>.</span><span>com&gt;</span></span></p>
 <script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/3317",
"url": "https://github.com/kamailio/kamailio/pull/3317",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>



_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-leave@lists.kamailio.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic