Hi,
do you ever get the feeling you are going nuts? Anyways...
I have 2 opensips servers, both version 3.2.12, on debian 11
they both share the same configuration, and start opensips using m4 as
follows: `opensips -F -f /etc/opensips/opensips.cfg -p "m4
/etc/opensips/env.m4 -"`
m4 server1:divert(-1)
define(`M4_LAN_IP', `10.0.0.124')
define(`M4_WAN_IP', `10.0.0.124')
define(`M4_CLUSTER_NODE_ID', `1')
define(`M4_SHARING_TAG', `node_1')
define(`M4_CLUSTER_ID', `1')
divert(0)dnl
m4 server 2:divert(-1)
define(`M4_LAN_IP', `10.0.0.125')
define(`M4_WAN_IP', `10.0.0.125')
define(`M4_CLUSTER_NODE_ID', `2')
define(`M4_SHARING_TAG', `node_2')
define(`M4_CLUSTER_ID', `1')
divert(0)dnl
configuration:
debug_mode=no
log_level=2
xlog_level=2
log_stdout=yes
log_stderror=yes
log_facility=LOG_LOCAL0
auto_aliases=no
server_signature=yes
socket=udp:0.0.0.0:5060 as M4_WAN_IP:5060
socket=tcp:0.0.0.0:5060 as M4_WAN_IP:5060
socket=tls:0.0.0.0:5061 as M4_WAN_IP:5061
socket=bin:0.0.0.0: as M4_WAN_IP:
tcp_connect_timeout=300
mpath="/usr/lib64/opensips/modules/"
loadmodule "tls_openssl.so"
loadmodule "tls_mgm.so"
modparam("tls_mgm", "tls_library", "openssl")
modparam("tls_mgm", "server_domain", "sd_1")
modparam("tls_mgm", "ca_list", "[sd_1]/opt/letsencrypt/fullchain.pem")
modparam("tls_mgm", "ca_dir", "[sd_1]/etc/ssl/certs")
modparam("tls_mgm", "certificate", "[sd_1]/opt/letsencrypt/cert.pem")
modparam("tls_mgm", "private_key", "[sd_1]/opt/letsencrypt/privkey.pem")
modparam("tls_mgm", "require_cert", "[sd_1]0")
modparam("tls_mgm", "tls_method", "[sd_1]TLSv1-")
modparam("tls_mgm", "verify_cert", "[sd_1]0")
modparam("tls_mgm", "ec_curve", "[sd_1]secp521r1")
modparam("tls_mgm", "client_domain", "cd_1")
modparam("tls_mgm", "ca_list", "[cd_1]/opt/letsencrypt/fullchain.pem")
modparam("tls_mgm", "ca_dir", "[cd_1]/etc/ssl/certs")
modparam("tls_mgm", "certificate", "[cd_1]/opt/letsencrypt/cert.pem")
modparam("tls_mgm", "private_key", "[cd_1]/opt/letsencrypt/privkey.pem")
modparam("tls_mgm", "require_cert", "[cd_1]0")
modparam("tls_mgm", "tls_method", "[cd_1]TLSv1-")
modparam("tls_mgm", "verify_cert", "[cd_1]0")
modparam("tls_mgm", "ec_curve", "[cd_1]secp521r1")
modparam("tls_mgm", "match_sip_domain", "[cd_1]*")
modparam("tls_mgm", "match_ip_address", "[cd_1]*")
loadmodule "cachedb_mongodb.so"
loadmodule "db_mysql.so"
modparam("db_mysql", "exec_query_threshold", 0)
modparam("db_mysql", "timeout_interval", 5)
modparam("db_mysql", "max_db_queries", 5)
modparam("db_mysql", "max_db_retries", 5)
loadmodule "clusterer.so"
modparam("clusterer", "db_url", "mysql://opensips:opensipsrw@localhost
/opensips")
modparam("clusterer", "my_node_id", M4_CLUSTER_NODE_ID)
modparam("clusterer", "seed_fallback_interval", 5)
modparam("clusterer", "sharing_tag", "M4_SHARING_TAG/M4_CLUSTER_ID=active")
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
modparam("tm", "auto_100trying", 0)
modparam("tm", "fr_inv_timeout", 120)
modparam("tm", "fr_timeout", 30)
modparam("tm", "onreply_avp_mode", 1)
modparam("tm", "restart_fr_on_each_reply", 0)
loadmodule "rr.so"
modparam("rr", "append_fromtag", 1)
loadmodule "dialog.so"
modparam("dialog", "cachedb_url", "mongodb://
10.0.0.120:27017/opensipsDB.dialog")
modparam("dialog", "default_timeout", 14400) # 4 hours
modparam("dialog", "dialog_replication_cluster", M4_CLUSTER_ID)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "enable_stats", 1)
modparam("dialog", "profile_replication_cluster", M4_CLUSTER_ID)
modparam("dialog", "profiles_no_value", "shared/s")
modparam("dialog", "profiles_with_value", "caller")
loadmodule "topology_hiding.so"
modparam("topology_hiding", "force_dialog", 1)
loadmodule "uac.so"
modparam("uac", "restore_mode", "auto")
modparam("uac", "force_dialog", yes)
loadmodule "permissions.so"
modparam("permissions", "db_url", "mysql://opensips:opensipsrw@localhost
/opensips")
loadmodule "sipmsgops.so"
loadmodule "textops.so"
loadmodule "callops.so"
loadmodule "usrloc.so"
modparam("usrloc", "cachedb_url", "mongodb://
10.0.0.120:27017/opensipsDB.usrloc")
modparam("usrloc", "location_cluster", M4_CLUSTER_ID)
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "use_domain", 1)
modparam("usrloc", "working_mode_preset", "federation-cachedb-cluster")
loadmodule "registrar.so"
modparam("registrar", "max_contacts", 1)
modparam("registrar", "tcp_persistent_flag", "TCP_PERSIST_DURATION")
loadmodule "mid_registrar.so"
modparam("mid_registrar", "max_contacts", 1)
modparam("mid_registrar", "mode", 0)
modparam("mid_registrar", "tcp_persistent_flag",
"TCP_PERSIST_REGISTRATIONS")
loadmodule "proto_bin.so"
loadmodule "proto_udp.so"
loadmodule "proto_tcp.so"
loadmodule "proto_tls.so"
route {
if (has_totag()) {
if (topology_hiding_match("DID_FALLBACK")) {
} else if (loose_route()) {
if ($DLG_status != NULL && !validate_dialog()) {
exit;
}
} else {
if (is_method("ACK")) {
if (t_check_trans()) {
t_relay();