<p></p>
<h3>Description</h3>
<p>In my use case exists</p>
<ol>
<li>pool of front-end proxies (all share some IPv4 address via AWS network load-balancer);</li>
<li>pool of backend registrars.</li>
</ol>
<p>I must:</p>
<ol>
<li>send keepalive messages to endpoints when used INVITE, REGISTRAR, SUBSCRIBE methods via all possible transports (UDP/TSP/TLS/WS/WSS/SCTP) (like nat_keepalive function of nat_traversal module). Internally store record for this SIP URI with flag <code>ka_dynamic</code> and <code>Record-Route</code> headers from <code>180, 183, 200</code> responses as <code>Route</code>;</li>
<li>send keepalive messages on predefined SIP URI (like ka_add_destination of keepalive module). Internally store record for this SIP URI with flag <code>ka_static</code> and manually defined  <code>Route</code> value;</li>
<li>when keepalive for cases above is failed, then added record into arrays:<br>
a. ka_invite_failed;<br>
b. ka_registrar_failed;<br>
c. ka_supscribe_failed;<br>
d. ka_invite_succcess;<br>
e. ka_registrar_success;<br>
f. ka_supscribe_success;</li>
<li>need to trigger <code>even route</code> function with initialized <code>xavp</code> params of<br>
a. of SIP URI endpoints;<br>
b. relevant array ID;<br>
c. dynamic or static flag of SIP URI record;<br>
d.  <code>Record-Route</code> of SIP URI record;<br>
5.If we have arrays for multiple arrays, then the <code>event router</code> function called multiple times.</li>
<li>the time period for <code>event route</code> calls must be configurable via module settings;</li>
<li>when executed <code>event route</code> I want to have abbility<br>
a. send a new registration message to the registrar node using saved <code>Route</code> header when OPTION is successful for the statically defined SIP URI;<br>
a. send registration expiration message to the registrar node from received <code>200</code> response;<br>
b. send the clear subscription message to the node from received <code>200</code> response;</li>
</ol>
<h4>Actual observed behavior</h4>
<p>In current implementation <code>OPTIONS</code> keepalive messages send from different modules</p>
<ol>
<li>usrloc;</li>
<li>keepalive;</li>
<li>nat_traversal;</li>
<li>nathelper</li>
</ol>
<p>All the above have limitations like:</p>
<ol>
<li>no TCP/TLS/WS/WSS transport support (nat_traversal, nathelper);</li>
<li>no ability to define call <code>event-route</code> on failed (success) OPTIONS message (think all modules do not have such feature);</li>
<li>no ability to check response code before enabling keepalive (nat_traversal);</li>
<li>no ability to notify backend REGISTRAR/SUBSCRIPTION server (think all modules do not have such feature) about failed keepalive messages;</li>
</ol>
<h4>What is expected</h4>
<p>From my of view required:</p>
<ol>
<li>some refactor of keepalive feature;</li>
<li>merge code from different modules into one and make other modules dependent;</li>
<li>implement the ability to notify backend REGISTRAR/SUBSCRIPTION servers of failed keepalive messages;</li>
<li>implement the ability to emulate registration when OPTION message success to SIP URI. Required on SBC to emulate customer PBX registration.</li>
</ol>

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