[OpenSIPS-Users] Clustering Presence opensips 3.2/3.3 in K8s environment

Jonathan Hunter hunterj91 at hotmail.com
Mon Apr 25 14:12:55 UTC 2022


Hi Bogdan,

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?.

I also cant seem to get NAT ping working, I assume this should work out to websocket connections as long as flags are set?

The outputs are;

  "ID": 1317975555,
            "Type": "ws",
            "State": 0,
            "Remote": "10.10.51.228:35462",
            "Local": "10.10.2.91:8081",
            "Lifetime": "2022-04-25 14:11:31",
            "Alias port": 35462
        }
    ]

And location shows;

"AORs": [
                {
                    "AOR": "61067470a372a031a7495a1a@<DOMAIN>",
                    "Contacts": [
                        {
                            "Contact": "sip:c0r0d0i7 at b0ek39eabrvf.invalid;transport=wss",
                            "ContactID": "4544061655272656153",
                            "Expires": 519,
                            "Q": "",
                            "Callid": "jbbvtjp2l7bujcom73s3",
                            "Cseq": 2,
                            "User-agent": "SIP.js/0.20.0",
                            "Received": "sip:10.10.51.228:35462;transport=ws",
                            "State": "CS_NEW",
                            "Flags": 0,
                            "Cflags": "WS_DEVICE SIPPING_RTO SIPPING_ENABLE",
                            "Socket": "ws:<PUBLIC_IP>:8081",
                            "Methods": 5439
                        }
                    ]
                }
            ]

However I cant seem to also get opensips to send SIP keepalive with these settings;

#### NAThelper module
loadmodule "nathelper.so"
modparam("nathelper", "received_avp", "$avp(rcv)")
modparam("nathelper", "natping_tcp",1)
modparam("nathelper", "natping_interval", 5)
modparam("nathelper", "sipping_bflag", "SIPPING_ENABLE")
modparam("nathelper", "remove_on_timeout_bflag", "SIPPING_RTO")
modparam("nathelper", "sipping_from", "sip:pinger at DOMAIN")
modparam("nathelper", "max_pings_lost", 2)
modparam("nathelper", "cluster_id", 9)
modparam("nathelper", "cluster_sharing_tag", "node/2=active")


Am I missing something here?

Many thanks

Jon

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows

From: Bogdan-Andrei Iancu<mailto:bogdan at opensips.org>
Sent: 18 April 2022 13:59
To: OpenSIPS users mailling list<mailto:users at lists.opensips.org>; Jonathan Hunter<mailto:hunterj91 at hotmail.com>
Subject: Re: [OpenSIPS-Users] Clustering Presence opensips 3.2/3.3 in K8s environment

Hi Jonathan,

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
https://www.opensips.org/Documentation/Interface-CoreMI-3-2#toc4<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips.org%2FDocumentation%2FInterface-CoreMI-3-2%23toc4&data=04%7C01%7C%7C4bdabd460c654a24286508da213b3532%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637858835416369371%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=CSDFYoaIZkVDUF2xCeS93WFEpo8bHgSuf9d2%2BsasX4U%3D&reserved=0>


Best regard,


Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips-solutions.com%2F&data=04%7C01%7C%7C4bdabd460c654a24286508da213b3532%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637858835416369371%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=36EkFVPCeFaljYrES8cKks7TXkj%2F6fSyoQ7EEHyCy1A%3D&reserved=0>

OpenSIPS eBootcamp 23rd May - 3rd June 2022

  https://opensips.org/training/OpenSIPS_eBootcamp_2022/<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopensips.org%2Ftraining%2FOpenSIPS_eBootcamp_2022%2F&data=04%7C01%7C%7C4bdabd460c654a24286508da213b3532%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637858835416369371%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=ndJ1csbScmWVYCzMlysiEAKeKWBQDO44rAkpT%2B%2F0HZA%3D&reserved=0>
On 4/13/22 6:08 PM, Jonathan Hunter wrote:
Hi All,

Has anyone managed to get presence working when using an active/active opensips setup with k8s ?

Everything works apart from presence, In particular when a websocket user disconnects due to a client crash.

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?

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.

Is this something anyone else has encountered?

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;

<presence xmlns="urn:ietf:params:xml:ns:pidf" entity="sip:61067470a372a031a7495a1a at domain"<sip:61067470a372a031a7495a1a at domain>>
<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>

I need to stop this occurring ideally, any help much appreciated.

Many thanks

Jon



Sent from Mail<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=04%7C01%7C%7C4bdabd460c654a24286508da213b3532%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637858835416369371%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=I9dKuRyrrfwAakuI%2Fxo800d5xiill0mvscwTvK87hwA%3D&reserved=0> for Windows




_______________________________________________

Users mailing list

Users at lists.opensips.org<mailto:Users at lists.opensips.org>

http://lists.opensips.org/cgi-bin/mailman/listinfo/users<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=04%7C01%7C%7C4bdabd460c654a24286508da213b3532%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637858835416369371%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=uzuP9rUxYoPTUBE8TiGb72MjOduwRDggCBSHL7bMKbA%3D&reserved=0>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20220425/5bb8c59f/attachment-0001.html>


More information about the Users mailing list