<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-GB" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Bogdan.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Just to follow up I have been trying to make openSIPS send SIP options in the same environment to websocket registered users, and I just cant get it to send even though the branch flags are set.
</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I now have these settings defined for NAThelper;</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">loadmodule "nathelper.so"</p>
<p class="MsoNormal">modparam("nathelper", "natping_interval", 10)</p>
<p class="MsoNormal">modparam("nathelper", "ping_nated_only", 0)</p>
<p class="MsoNormal">modparam("nathelper", "sipping_method", "OPTIONS")</p>
<p class="MsoNormal">modparam("nathelper", "sipping_bflag", "SIPPING_ENABLE")</p>
<p class="MsoNormal">modparam("nathelper", "sipping_from", "sip:pinger@<domain>")</p>
<p class="MsoNormal">modparam("nathelper", "received_avp", "$avp(rcv)")</p>
<p class="MsoNormal">modparam("nathelper", "ping_threshold", 5)</p>
<p class="MsoNormal">modparam("nathelper", "max_pings_lost", 3)</p>
<p class="MsoNormal">modparam("nathelper", "natping_partitions", 4)</p>
<p class="MsoNormal">modparam("nathelper", "remove_on_timeout_bflag", "SIPPING_RTO")</p>
<p class="MsoNormal">modparam("nathelper", "natping_tcp", 1)</p>
<p class="MsoNormal">modparam("nathelper", "cluster_id", 1)</p>
<p class="MsoNormal">modparam("nathelper", "cluster_sharing_tag", "node/2=active")</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Also have pinging_mode set for usrloc, and this is in a federation-cachedb-cluster with 2 opensips containers running active/active.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If I use t_new_request I can send a SIP OPTIONS message out, so I assume I am missing a parameter or its mis configuration? Or could it be environment, this is a k8s setup.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any advice/tips would be great.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you .</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Jon</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">
Mail</a> for Windows</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><b>From: </b><a href="mailto:hunterj91@hotmail.com">Jonathan Hunter</a><br>
<b>Sent: </b>25 April 2022 15:28<br>
<b>To: </b><a href="mailto:bogdan@opensips.org">Bogdan-Andrei Iancu</a>; <a href="mailto:users@lists.opensips.org">
OpenSIPS users mailling list</a><br>
<b>Subject: </b>Re: [OpenSIPS-Users] Clustering Presence opensips 3.2/3.3 in K8s environment</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi Bogdan,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you for the reply I can see there are tcp connections but I don’t seem to get anything. I assume it may well be k8s related?.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I also cant seem to get NAT ping working, I assume this should work out to websocket connections as long as flags are set?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The outputs are;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> "ID": 1317975555,<o:p></o:p></p>
<p class="MsoNormal"> "Type": "ws",<o:p></o:p></p>
<p class="MsoNormal"> "State": 0,<o:p></o:p></p>
<p class="MsoNormal"> "Remote": "10.10.51.228:35462",<o:p></o:p></p>
<p class="MsoNormal"> "Local": "10.10.2.91:8081",<o:p></o:p></p>
<p class="MsoNormal"> "Lifetime": "2022-04-25 14:11:31",<o:p></o:p></p>
<p class="MsoNormal"> "Alias port": 35462<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> ]<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And location shows;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">"AORs": [<o:p></o:p></p>
<p class="MsoNormal"> {<o:p></o:p></p>
<p class="MsoNormal"> "AOR": "61067470a372a031a7495a1a@<DOMAIN>",<o:p></o:p></p>
<p class="MsoNormal"> "Contacts": [<o:p></o:p></p>
<p class="MsoNormal"> {<o:p></o:p></p>
<p class="MsoNormal"> "Contact": "sip:c0r0d0i7@b0ek39eabrvf.invalid;transport=wss",<o:p></o:p></p>
<p class="MsoNormal"> "ContactID": "4544061655272656153",<o:p></o:p></p>
<p class="MsoNormal"> "Expires": 519,<o:p></o:p></p>
<p class="MsoNormal"> "Q": "",<o:p></o:p></p>
<p class="MsoNormal"> "Callid": "jbbvtjp2l7bujcom73s3",<o:p></o:p></p>
<p class="MsoNormal"> "Cseq": 2,<o:p></o:p></p>
<p class="MsoNormal"> "User-agent": "SIP.js/0.20.0",<o:p></o:p></p>
<p class="MsoNormal"> "Received": "sip:10.10.51.228:35462;transport=ws",<o:p></o:p></p>
<p class="MsoNormal"> "State": "CS_NEW",<o:p></o:p></p>
<p class="MsoNormal"> "Flags": 0,<o:p></o:p></p>
<p class="MsoNormal"> "Cflags": "WS_DEVICE SIPPING_RTO SIPPING_ENABLE",<o:p></o:p></p>
<p class="MsoNormal"> "Socket": "ws:<PUBLIC_IP>:8081",<o:p></o:p></p>
<p class="MsoNormal"> "Methods": 5439<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> ]<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> ]<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However I cant seem to also get opensips to send SIP keepalive with these settings;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">#### NAThelper module<o:p></o:p></p>
<p class="MsoNormal">loadmodule "nathelper.so"<o:p></o:p></p>
<p class="MsoNormal">modparam("nathelper", "received_avp", "$avp(rcv)")<o:p></o:p></p>
<p class="MsoNormal">modparam("nathelper", "natping_tcp",1)<o:p></o:p></p>
<p class="MsoNormal">modparam("nathelper", "natping_interval", 5)<o:p></o:p></p>
<p class="MsoNormal">modparam("nathelper", "sipping_bflag", "SIPPING_ENABLE")<o:p></o:p></p>
<p class="MsoNormal">modparam("nathelper", "remove_on_timeout_bflag", "SIPPING_RTO")<o:p></o:p></p>
<p class="MsoNormal">modparam("nathelper", "sipping_from", "sip:pinger@DOMAIN")<o:p></o:p></p>
<p class="MsoNormal">modparam("nathelper", "max_pings_lost", 2)<o:p></o:p></p>
<p class="MsoNormal">modparam("nathelper", "cluster_id", 9)<o:p></o:p></p>
<p class="MsoNormal">modparam("nathelper", "cluster_sharing_tag", "node/2=active")<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Am I missing something here?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Many thanks<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Jon<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sent from <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=05%7C01%7C%7C5f60e807488b4d6ea4d808da26c7ce66%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637864936873242045%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=YMJHNUhsr8ZgxUJ4o5gqoqgQ7iibcDmc5tDsnUISgzk%3D&reserved=0">
Mail</a> for Windows<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>From: </b><a href="mailto:bogdan@opensips.org">Bogdan-Andrei Iancu</a><br>
<b>Sent: </b>18 April 2022 13:59<br>
<b>To: </b><a href="mailto:users@lists.opensips.org">OpenSIPS users mailling list</a>;
<a href="mailto:hunterj91@hotmail.com">Jonathan Hunter</a><br>
<b>Subject: </b>Re: [OpenSIPS-Users] Clustering Presence opensips 3.2/3.3 in K8s environment<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"Courier New"">Hi Jonathan,<br>
<br>
Maybe the k8s layer (the ingress ??) sticks its tails in there - could you check at opensips level if the TCP conn is still seen as up ? Use the mi list_tcp_conns MI function
<br>
<a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips.org%2FDocumentation%2FInterface-CoreMI-3-2%23toc4&data=05%7C01%7C%7C5f60e807488b4d6ea4d808da26c7ce66%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637864936873242045%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DaErQEB7DGSLVwpPR3HwQVrHx1g7RUR9r%2Bc6AV6A%2BFU%3D&reserved=0">https://www.opensips.org/Documentation/Interface-CoreMI-3-2#toc4</a><br>
<br>
<br>
Best regard,</span><o:p></o:p></p>
<pre>Bogdan-Andrei Iancu</pre>
<pre><o:p> </o:p></pre>
<pre>OpenSIPS Founder and Developer</pre>
<pre> <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips-solutions.com%2F&data=05%7C01%7C%7C5f60e807488b4d6ea4d808da26c7ce66%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637864936873242045%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=d5VsC%2FRMENJY5m57ENjK2sKxvRdkF9JoH%2FLOfwiEes8%3D&reserved=0">https://www.opensips-solutions.com</a></pre>
<pre>OpenSIPS eBootcamp 23rd May - 3rd June 2022</pre>
<pre> <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopensips.org%2Ftraining%2FOpenSIPS_eBootcamp_2022%2F&data=05%7C01%7C%7C5f60e807488b4d6ea4d808da26c7ce66%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637864936873242045%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2FGY1N1i45n0icTFg2%2BlUufXx8BtfR%2F0C73ZO72GfW60%3D&reserved=0">https://opensips.org/training/OpenSIPS_eBootcamp_2022/</a></pre>
<div>
<p class="MsoNormal">On 4/13/22 6:08 PM, Jonathan Hunter wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi All,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Has anyone managed to get presence working when using an active/active opensips setup with k8s ?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Everything works apart from presence, In particular when a websocket user disconnects due to a client crash.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I ideally would want to use event_route[E_CORE_TCP_DISCONNECT] to then grab the disconnect when it comes in via websockets/tcp, however I cant seem to get it to trigger. Could this be due to the underlying hooks OpenSIPS uses to interact
with with OS with TCP or something else?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">As I would use the event route, to then remove the registration from the location table, as otherwise I have duplicate entries in both location and the presentity list.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Is this something anyone else has encountered?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I have tried using clustering with both presence and pua and have same issues, whereby after an unwanted disconnect subsequent NOTIFY messages contain more than one id per entity;<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><presence xmlns="urn:ietf:params:xml:ns:pidf" entity=<a href="sip:61067470a372a031a7495a1a@domain">"sip:61067470a372a031a7495a1a@domain"</a>><o:p></o:p></p>
<p class="MsoNormal"><tuple xmlns="urn:ietf:params:xml:ns:pidf" id="0x7ffe75896760"><status><basic>open</basic></status></tuple><tuple xmlns="urn:ietf:params:xml:ns:pidf" id="0x7ffd0716b390"><status><basic>open</basic></status></tuple></presence><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I need to stop this occurring ideally, any help much appreciated.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Many thanks<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Jon<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Sent from <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=05%7C01%7C%7C5f60e807488b4d6ea4d808da26c7ce66%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637864936873242045%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=YMJHNUhsr8ZgxUJ4o5gqoqgQ7iibcDmc5tDsnUISgzk%3D&reserved=0">
Mail</a> for Windows<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<pre>_______________________________________________</pre>
<pre>Users mailing list</pre>
<pre><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a></pre>
<pre><a href="https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=05%7C01%7C%7C5f60e807488b4d6ea4d808da26c7ce66%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637864936873242045%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=jJQnvSjbFbr78OBer49%2FNGpMxRqMOR7IG1Fknau5u6o%3D&reserved=0">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></pre>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>