[OpenSIPS-Users] Setting up dialog replication

Ben Newlin Ben.Newlin at genesys.com
Fri Jun 6 14:37:26 UTC 2025


Have you checked the logs on node 2 from the time the call was placed? When we tried this we found that node 2 was refusing the dialog because the IP address of the socket for the dialog was not configured locally. There was a log printed indicating this. It seems the dialog replication assumes a VIP/anycast setup where in order to “take over” the dialog the node has to also have a socket with the same IP.

It was a while ago we tried this though so maybe that has changed.

Ben Newlin

From: Users <users-bounces at lists.opensips.org> on behalf of Ben Laing via Users <users at lists.opensips.org>
Date: Friday, June 6, 2025 at 9:26 AM
To: users at lists.opensips.org <users at lists.opensips.org>
Subject: [OpenSIPS-Users] Setting up dialog replication
 EXTERNAL EMAIL - Please use caution with links and attachments

________________________________
Hello!

I am trying to set up an active/active OpenSIPS pair in AWS.

The AWS set up is two OpenSIPs (V3.4.12) running on EC2 instances in two different availability zones. There is then a network load balancer (NLB) in each availability zone that distributes traffic to the two OpenSIPs nodes.

I am trying to set up dialog sharing between the two nodes. The cluster appears to be healthy:

·         both nodes are in cluster 1 with flag set to `seed`.

  *   opensips-cli -x mi clusterer_list_cap  shows dialog-dlg-repl / state Ok / enabled Yes
  *   opensips-cli -x mi clusterer_list – shows other node with link_state up, state enabled.



My test to make a call through node 1, kill node 1, end the call with the BYE then going through node 2. When I try this, node 2 isn’t finding the dialog. If I run dlg_list during the call (before killing node 1) the dlg is present on node 1 but not node 2. So it looks like the dialog replication isn’t working.



The dialog clustering manual suggests reading https://blog.opensips.org/2018/03/23/clustering-ongoing-calls-with-opensips-2-4/<https://blog.opensips.org/2018/03/23/clustering-ongoing-calls-with-opensips-2-4/> which references dlg_sharing_tag which has since been deprecated. I don’t think I need tags, though potentially that’s where I’m going wrong. I’ve been down a few rabbit holes looking at out of date manuals for some of the modules!



The relevant config for node 1 is as follows:



loadmodule "proto_udp.so"

socket = udp:10.4.60.11

# NLB 1

socket = udp:10.4.60.11 as 10.4.38.178

# NLB 2

socket = udp:10.4.60.11 as 10.4.63.19

#  Tried setting tag public here but didn’t help


#### DIALOG module
loadmodule "dialog.so"
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "default_timeout", 600)  # 6 hours timeout
modparam("dialog", "db_mode", 2)
modparam("dialog", "db_url", "mysql://opensips:opensipsrw@10.4.40.21/opensips")
modparam("dialog", "dialog_replication_cluster", 1)


### CLUSTERING
socket = bin:10.4.60.12:5566 # bin listener for OpenSIPS clustering
loadmodule "proto_bin.so"

loadmodule "clusterer.so"
modparam("clusterer", "db_mode", 1)
modparam("clusterer", "db_url", "mysql://opensips:opensipsrw@10.4.40.21/opensips")
modparam("clusterer", "my_node_id", 2) # node_id for OpenSIPS 1



route  {

…
        # handle the initial INVITE to create a dialog
        if (is_method("INVITE")) {

                …

                if ( !create_dialog("B") ) {
                        send_reply(500,"Internal Server Error");
                        exit;
                }

}



Any suggestions on how to debug or glaring omissions would be very helpful.



Best,



Ben Laing


Classified - General
‑‑‑‑‑
Ben Laing

He/Him
Senior Software Developer
Email: Ben.Laing at dals.co.uk
Website: www.dals.co.uk<http://www.dals.co.uk/>
Dals, Statham House, Talbot Rd, Stretford, Manchester, M32 0FP



Classified - General
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20250606/46f69bfb/attachment-0001.html>


More information about the Users mailing list