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/
 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:[email protected]/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:[email protected]/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: [email protected]
Website: www.dals.co.uk<http://www.dals.co.uk/>
Dals, Statham House, Talbot Rd, Stretford, Manchester, M32 0FP



Classified - General
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to