[OpenSIPS-Users] cluster: active_dialogs differs

Alexey Kazantsev kurgan-rus at inbox.ru
Thu Mar 21 09:23:27 EDT 2019


Hi friends!

I'm trying to understand the reason of slightly different values
of 'fifo get_statistics active_dialogs' of a 2-node 2.4.5 cluster.

All in all, everything works (calls, switching between nodes, etc).


user at pc:~$ for i in 1 2 ; do ssh voip-sipgw0$i 'opensipsctl fifo get_statistics active_dialogs' ; done 
 dialog:active_dialogs:: 51
 dialog:active_dialogs:: 67



Here are some key settings (just to be sure they are identical and correct):

# node1
modparam("tm", "fr_timeout", 5)
modparam("tm", "T1_timer", 2000)
modparam("tm", "T2_timer", 5000)
modparam("tm", "fr_inv_timeout", 30)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "onreply_avp_mode", 1)

# node2
modparam("tm", "fr_timeout", 5)
modparam("tm", "T1_timer", 2000)
modparam("tm", "T2_timer", 5000)
modparam("tm", "fr_inv_timeout", 30)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "onreply_avp_mode", 1)


# node1
tcp_children=1	# for bin/cluster
modparam("clusterer", "current_id", 1)
modparam("clusterer", "db_mode", 0)
modparam("clusterer", "current_info","cluster_id=1,url=bin:10.45.144.77:5555,flags=seed")
modparam("clusterer", "neighbor_info","cluster_id=1,node_id=2,url=bin:10.45.144.79:5555")

# node2
tcp_children=1	# for bin/cluster
modparam("clusterer", "current_id", 2)
modparam("clusterer", "db_mode", 0)
modparam("clusterer", "current_info","cluster_id=1,url=bin:10.45.144.79:5555")
modparam("clusterer", "neighbor_info","cluster_id=1,node_id=1,url=bin:10.45.144.77:5555")


# node1
# please note that I don't use /b flag in profiles names, because I use
# 'dialog_replication_cluster' and 'profile_replication_cluster', as
# mentioned here https://opensips.org/html/docs/modules/2.4.x/dialog.html#dialog-clustering
modparam("dialog", "default_timeout", 3600)
modparam("dialog", "profiles_no_value", "call" )
modparam("dialog", "profiles_with_value", "incoming ; outgoing ; destination")
modparam("dialog", "dlg_sharing_tag", "vip=active")
modparam("dialog", "dialog_replication_cluster", 1)
modparam("dialog", "profile_replication_cluster", 1)

# node2
# please note that I don't use /b flag in profiles names, because I use
# 'dialog_replication_cluster' and 'profile_replication_cluster', as
# mentioned here https://opensips.org/html/docs/modules/2.4.x/dialog.html#dialog-clustering
modparam("dialog", "default_timeout", 3600)
modparam("dialog", "profiles_no_value", "call" )
modparam("dialog", "profiles_with_value", "incoming ; outgoing ; destination")
modparam("dialog", "dlg_sharing_tag", "vip=backup")
modparam("dialog", "dialog_replication_cluster", 1)
modparam("dialog", "profile_replication_cluster", 1)



And now MI commands:

# MI node1
voip-sipgw01 opensips # opensipsctl fifo clusterer_list
Cluster:: 1
	Node:: 2 DB_ID=-1 URL=bin:10.45.144.79:5555 Enabled=1 Link_state=Up      Next_hop=2 Description=none

voip-sipgw01 opensips # opensipsctl fifo clusterer_list_topology
Cluster:: 1
	Node:: 1 Neighbours=2 
	Node:: 2 Neighbours=1 

voip-sipgw01 opensips # opensipsctl fifo clusterer_list_cap
Cluster:: 1
	Capability:: dialog-dlg-repl State=Ok
	Capability:: dialog-prof-repl State=Ok


# MI node2
voip-sipgw02 opensips # opensipsctl fifo clusterer_list
Cluster:: 1
	Node:: 1 DB_ID=-1 URL=bin:10.45.144.77:5555 Enabled=1 Link_state=Up      Next_hop=1 Description=none

voip-sipgw02 opensips # opensipsctl fifo clusterer_list_topology
Cluster:: 1
	Node:: 2 Neighbours=1 
	Node:: 1 Neighbours=2 

voip-sipgw02 opensips # opensipsctl fifo clusterer_list_cap
Cluster:: 1
	Capability:: dialog-dlg-repl State=Ok
	Capability:: dialog-prof-repl State=Ok



The cluster is configured using "active-backup" scheme:
https://blog.opensips.org/2018/03/23/clustering-ongoing-calls-with-opensips-2-4/

On the active node the MI command "opensipsctl fifo dlg_set_sharing_tag_active vip"
is executed.

I also executed "opensipsctl fifo dlg_cluster_sync" MI command on the backup (standby)
node, because it uses the "main" (most of time active node1) as a seed.


Seems OK, isn't it?!
So, why does the values of active_dialogs in fifo output differ?

-----------------------------------------------
BR, Alexey
http://alexeyka.zantsev.com/


More information about the Users mailing list