|
@@ -57,13 +57,17 @@ mlock_pages=yes
|
|
shm_force_alloc=yes
|
|
shm_force_alloc=yes
|
|
|
|
|
|
# Do SRV-Loadbalancing:
|
|
# Do SRV-Loadbalancing:
|
|
-dns_srv_lb=yes
|
|
|
|
|
|
+dns_srv_lb=on
|
|
# Always prefer IPv6:
|
|
# Always prefer IPv6:
|
|
-dns_try_ipv6=yes
|
|
|
|
|
|
+dns_try_ipv6=on
|
|
|
|
+# Always prefer IPv6:
|
|
|
|
+dns_cache_flags=4
|
|
# DNS-Based failover
|
|
# DNS-Based failover
|
|
-use_dns_failover=yes
|
|
|
|
|
|
+use_dns_failover=on
|
|
# Query NAPTR-Records as well:
|
|
# Query NAPTR-Records as well:
|
|
-dns_try_naptr=no
|
|
|
|
|
|
+dns_try_naptr=off
|
|
|
|
+# DNS cache won't be used (all dns lookups will result into a DNS request)
|
|
|
|
+use_dns_cache=off
|
|
|
|
|
|
user_agent_header="User-Agent: TelcoSuite Proxy-CSCF"
|
|
user_agent_header="User-Agent: TelcoSuite Proxy-CSCF"
|
|
server_header="Server: TelcoSuite Proxy-CSCF"
|
|
server_header="Server: TelcoSuite Proxy-CSCF"
|
|
@@ -71,7 +75,7 @@ server_header="Server: TelcoSuite Proxy-CSCF"
|
|
log_facility=LOG_LOCAL0
|
|
log_facility=LOG_LOCAL0
|
|
|
|
|
|
fork=yes
|
|
fork=yes
|
|
-children=16
|
|
|
|
|
|
+children=4
|
|
|
|
|
|
#!ifndef TCP_PROCESSES
|
|
#!ifndef TCP_PROCESSES
|
|
# Number of TCP Processes
|
|
# Number of TCP Processes
|
|
@@ -99,7 +103,7 @@ enable_tls=yes
|
|
#!ifdef WITH_TCP
|
|
#!ifdef WITH_TCP
|
|
# life time of TCP connection when there is no traffic
|
|
# life time of TCP connection when there is no traffic
|
|
# - a bit higher than registration expires to cope with UA behind NAT
|
|
# - a bit higher than registration expires to cope with UA behind NAT
|
|
-tcp_connection_lifetime=3615
|
|
|
|
|
|
+tcp_connection_lifetime=36000
|
|
# If a message received over a tcp connection has "alias" in its via a new tcp
|
|
# If a message received over a tcp connection has "alias" in its via a new tcp
|
|
# alias port will be created for the connection the message came from (the
|
|
# alias port will be created for the connection the message came from (the
|
|
# alias port will be set to the via one).
|
|
# alias port will be set to the via one).
|
|
@@ -111,6 +115,8 @@ tcp_accept_aliases=no
|
|
# Enable SIP outbound TCP keep-alive using PING-PONG (CRLFCRLF - CRLF).
|
|
# Enable SIP outbound TCP keep-alive using PING-PONG (CRLFCRLF - CRLF).
|
|
tcp_crlf_ping=yes
|
|
tcp_crlf_ping=yes
|
|
|
|
|
|
|
|
+tcp_reuse_port=yes
|
|
|
|
+
|
|
tcp_accept_no_cl=yes
|
|
tcp_accept_no_cl=yes
|
|
tcp_rd_buf_size=16384
|
|
tcp_rd_buf_size=16384
|
|
|
|
|
|
@@ -125,6 +131,11 @@ disable_tcp=yes
|
|
based on reverse DNS on IPs (default on) */
|
|
based on reverse DNS on IPs (default on) */
|
|
auto_aliases=no
|
|
auto_aliases=no
|
|
|
|
|
|
|
|
+#phone2tel=1
|
|
|
|
+
|
|
|
|
+udp_mtu = 1300
|
|
|
|
+udp_mtu_try_proto = TCP
|
|
|
|
+
|
|
/* uncomment and configure the following line if you want Kamailio to
|
|
/* uncomment and configure the following line if you want Kamailio to
|
|
bind on a specific interface/port/proto (default bind on all available) */
|
|
bind on a specific interface/port/proto (default bind on all available) */
|
|
|
|
|
|
@@ -134,7 +145,7 @@ system.service = "Proxy-CSCF" desc "Function of this server"
|
|
####### Modules Section ########
|
|
####### Modules Section ########
|
|
|
|
|
|
# set paths to location of modules
|
|
# set paths to location of modules
|
|
-mpath="/usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/:/usr/local/lib/kamailio/modules/"
|
|
|
|
|
|
+mpath="/usr/lib64/kamailio/modules/:/usr/lib/kamailio/modules/:/usr/lib/x86_64-linux-gnu/kamailio/modules/:/usr/local/lib64/kamailio/modules"
|
|
|
|
|
|
# Fifo Module
|
|
# Fifo Module
|
|
# Kamailio Extensions (e.g. MI:uptime, MI:version, cfg:isflagset etc.)
|
|
# Kamailio Extensions (e.g. MI:uptime, MI:version, cfg:isflagset etc.)
|
|
@@ -156,17 +167,16 @@ loadmodule "cfg_rpc"
|
|
loadmodule "xlog"
|
|
loadmodule "xlog"
|
|
loadmodule "auth"
|
|
loadmodule "auth"
|
|
loadmodule "dispatcher"
|
|
loadmodule "dispatcher"
|
|
|
|
+loadmodule "sctp"
|
|
loadmodule "path"
|
|
loadmodule "path"
|
|
loadmodule "statistics"
|
|
loadmodule "statistics"
|
|
|
|
|
|
loadmodule "ims_dialog"
|
|
loadmodule "ims_dialog"
|
|
loadmodule "ims_usrloc_pcscf"
|
|
loadmodule "ims_usrloc_pcscf"
|
|
-#!ifdef WITH_IPSEC
|
|
|
|
|
|
+# Following module is required even in case of IPSec being disabled.
|
|
loadmodule "ims_ipsec_pcscf"
|
|
loadmodule "ims_ipsec_pcscf"
|
|
-#!endif
|
|
|
|
loadmodule "ims_registrar_pcscf"
|
|
loadmodule "ims_registrar_pcscf"
|
|
|
|
|
|
-
|
|
|
|
#!ifdef WITH_XMLRPC
|
|
#!ifdef WITH_XMLRPC
|
|
loadmodule "xmlrpc"
|
|
loadmodule "xmlrpc"
|
|
#!endif
|
|
#!endif
|
|
@@ -232,10 +242,17 @@ loadmodule "sqlops"
|
|
loadmodule "htable"
|
|
loadmodule "htable"
|
|
|
|
|
|
#!ifdef WITH_DEBUG
|
|
#!ifdef WITH_DEBUG
|
|
-loadmodule "debugger.so"
|
|
|
|
modparam("debugger", "mod_hash_size", 5)
|
|
modparam("debugger", "mod_hash_size", 5)
|
|
modparam("debugger", "mod_level_mode", 1)
|
|
modparam("debugger", "mod_level_mode", 1)
|
|
modparam("debugger", "mod_level", "rtpengine=3")
|
|
modparam("debugger", "mod_level", "rtpengine=3")
|
|
|
|
+modparam("debugger", "mod_level", "ims_qos=3")
|
|
|
|
+#!ifdef WITH_IPSEC
|
|
|
|
+modparam("debugger", "mod_level", "ims_ipsec_pcscf=3")
|
|
|
|
+#!endif
|
|
|
|
+modparam("debugger", "mod_level", "textops=3")
|
|
|
|
+modparam("debugger", "mod_level", "tm=3")
|
|
|
|
+modparam("debugger", "mod_level", "ims_registrar_pcscf=3")
|
|
|
|
+modparam("debugger", "mod_level", "ims_usrloc_pcscf=3")
|
|
modparam("debugger", "cfgtrace", 1)
|
|
modparam("debugger", "cfgtrace", 1)
|
|
#!endif
|
|
#!endif
|
|
|
|
|
|
@@ -243,9 +260,9 @@ loadmodule "jsonrpcs.so"
|
|
# ----- jsonrpcs params -----
|
|
# ----- jsonrpcs params -----
|
|
modparam("jsonrpcs", "pretty_format", 1)
|
|
modparam("jsonrpcs", "pretty_format", 1)
|
|
/* set the path to RPC fifo control file */
|
|
/* set the path to RPC fifo control file */
|
|
-# modparam("jsonrpcs", "fifo_name", "/run/kamailio/kamailio_rpc.fifo")
|
|
|
|
|
|
+modparam("jsonrpcs", "fifo_name", "/var/run/kamailio_pcscf/kamailio_rpc.fifo")
|
|
/* set the path to RPC unix socket control file */
|
|
/* set the path to RPC unix socket control file */
|
|
-# modparam("jsonrpcs", "dgram_socket", "/run/kamailio/kamailio_rpc.sock")
|
|
|
|
|
|
+modparam("jsonrpcs", "dgram_socket", "/var/run/kamailio_pcscf/kamailio_rpc.sock")
|
|
|
|
|
|
# ----------------- setting module-specific parameters ---------------
|
|
# ----------------- setting module-specific parameters ---------------
|
|
#!ifdef DB_URL2
|
|
#!ifdef DB_URL2
|
|
@@ -265,14 +282,21 @@ modparam("pike", "remove_latency", 4)
|
|
# ip ban htable with autoexpire after 5 minutes
|
|
# ip ban htable with autoexpire after 5 minutes
|
|
modparam("htable", "htable", "ipban=>size=8;autoexpire=300")
|
|
modparam("htable", "htable", "ipban=>size=8;autoexpire=300")
|
|
modparam("htable", "htable", "failedauth=>size=8;autoexpire=120")
|
|
modparam("htable", "htable", "failedauth=>size=8;autoexpire=120")
|
|
|
|
+modparam("htable", "htable", "natpingfrom=>size=8;autoexpire=600000;")
|
|
#!endif
|
|
#!endif
|
|
|
|
|
|
modparam("htable", "htable", "contact=>size=8;autoexpire=20")
|
|
modparam("htable", "htable", "contact=>size=8;autoexpire=20")
|
|
modparam("htable", "htable", "a=>size=8;autoexpire=20")
|
|
modparam("htable", "htable", "a=>size=8;autoexpire=20")
|
|
|
|
|
|
|
|
+#!ifdef WITH_IMS_HDR_CACHE
|
|
|
|
+modparam("htable", "htable", "serviceroutes=>size=16;autoexpire=14400;")
|
|
|
|
+modparam("htable", "htable", "associateduris=>size=16;autoexpire=14400;")
|
|
|
|
+#!endif
|
|
|
|
+
|
|
#!ifdef WITH_NATPING
|
|
#!ifdef WITH_NATPING
|
|
modparam("htable", "htable", "natping=>size=8;autoexpire=600000;")
|
|
modparam("htable", "htable", "natping=>size=8;autoexpire=600000;")
|
|
modparam("htable", "htable", "natpingfail=>size=8;autoexpire=600000;")
|
|
modparam("htable", "htable", "natpingfail=>size=8;autoexpire=600000;")
|
|
|
|
+modparam("htable", "htable", "natpingfrom=>size=8;autoexpire=600000;")
|
|
#!ifdef DB_URL2
|
|
#!ifdef DB_URL2
|
|
modparam("sqlops", "sqlcon", "pcscf=>cluster://cluster1")
|
|
modparam("sqlops", "sqlcon", "pcscf=>cluster://cluster1")
|
|
#!else
|
|
#!else
|
|
@@ -282,8 +306,8 @@ modparam("sqlops", "sqlcon", SQLOPS_DBURL)
|
|
modparam("uac", "restore_mode", "none")
|
|
modparam("uac", "restore_mode", "none")
|
|
|
|
|
|
# ----------------- Settings for RTimer ---------------
|
|
# ----------------- Settings for RTimer ---------------
|
|
-# time interval set to 10 seconds
|
|
|
|
-modparam("rtimer", "timer", "name=NATPING;interval=15;mode=1;")
|
|
|
|
|
|
+# time interval set to 60 seconds
|
|
|
|
+modparam("rtimer", "timer", "name=NATPING;interval=60;mode=1;")
|
|
modparam("rtimer", "exec", "timer=NATPING;route=NATPING")
|
|
modparam("rtimer", "exec", "timer=NATPING;route=NATPING")
|
|
#!endif
|
|
#!endif
|
|
|
|
|
|
@@ -294,6 +318,8 @@ modparam("rtimer", "exec", "timer=NATPING;route=NATPING")
|
|
modparam("tm", "fr_timer", 3000)
|
|
modparam("tm", "fr_timer", 3000)
|
|
# default invite retransmission timeout after 1xx: 120sec
|
|
# default invite retransmission timeout after 1xx: 120sec
|
|
modparam("tm", "fr_inv_timer", 120000)
|
|
modparam("tm", "fr_inv_timer", 120000)
|
|
|
|
+# Dont reply automatically with "100 Trying"
|
|
|
|
+modparam("tm", "auto_inv_100", 0)
|
|
|
|
|
|
# ----- rr params -----
|
|
# ----- rr params -----
|
|
# add value to ;lr param to cope with most of the UAs
|
|
# add value to ;lr param to cope with most of the UAs
|
|
@@ -304,6 +330,7 @@ modparam("rr", "append_fromtag", 1)
|
|
modparam("rr", "add_username", 1)
|
|
modparam("rr", "add_username", 1)
|
|
# Take User from a custom AVP
|
|
# Take User from a custom AVP
|
|
modparam("rr", "custom_user_avp", "$avp(RR_CUSTOM_USER_AVP)")
|
|
modparam("rr", "custom_user_avp", "$avp(RR_CUSTOM_USER_AVP)")
|
|
|
|
+modparam("rr", "force_send_socket", 1)
|
|
|
|
|
|
#!ifdef WITH_XMLRPC
|
|
#!ifdef WITH_XMLRPC
|
|
# ----- xmlrpc params -----
|
|
# ----- xmlrpc params -----
|
|
@@ -317,35 +344,39 @@ modparam("tls", "config", "/etc/kamailio_pcscf/tls.cfg")
|
|
#!endif
|
|
#!endif
|
|
|
|
|
|
# ----- rtpproxy params -----
|
|
# ----- rtpproxy params -----
|
|
-modparam("rtpengine", "rtpengine_sock", "1 == udp:localhost:9910")
|
|
|
|
-modparam("rtpengine", "rtpengine_sock", "2 == udp:localhost:9911")
|
|
|
|
|
|
+modparam("rtpengine", "setid_default", 1)
|
|
|
|
+modparam("rtpengine", "rtpengine_sock", "1 == udp:localhost:2223")
|
|
|
|
+#modparam("rtpengine", "rtpengine_sock", "2 == udp:localhost:2224")
|
|
modparam("rtpengine", "setid_avp", "$avp(setid)")
|
|
modparam("rtpengine", "setid_avp", "$avp(setid)")
|
|
modparam("rtpengine", "extra_id_pv", "$avp(extra_id)")
|
|
modparam("rtpengine", "extra_id_pv", "$avp(extra_id)")
|
|
|
|
|
|
modparam("path", "use_received", 1)
|
|
modparam("path", "use_received", 1)
|
|
|
|
|
|
# ----- ctl params -----
|
|
# ----- ctl params -----
|
|
-modparam("ctl", "binrpc", "unix:/run/kamailio_pcscf/kamailio_ctl")
|
|
|
|
|
|
+modparam("ctl", "binrpc", "unix:/var/run/kamailio_pcscf/kamailio_ctl")
|
|
|
|
|
|
# ----------------- Settings for Dispatcher ---------------
|
|
# ----------------- Settings for Dispatcher ---------------
|
|
modparam("dispatcher", "list_file", "/etc/kamailio_pcscf/dispatcher.list")
|
|
modparam("dispatcher", "list_file", "/etc/kamailio_pcscf/dispatcher.list")
|
|
|
|
|
|
-#!ifdef WITH_SBC
|
|
|
|
# Dispatcher: Enable Failover-Support
|
|
# Dispatcher: Enable Failover-Support
|
|
modparam("dispatcher", "flags", 2)
|
|
modparam("dispatcher", "flags", 2)
|
|
# Dispatcher: Overwrite Destination address, if required.
|
|
# Dispatcher: Overwrite Destination address, if required.
|
|
modparam("dispatcher", "force_dst", 1)
|
|
modparam("dispatcher", "force_dst", 1)
|
|
# AVP's required for Fail-Over-Support:
|
|
# AVP's required for Fail-Over-Support:
|
|
-modparam("dispatcher", "dst_avp", "$avp(DISPATCHER_DST_AVP)")
|
|
|
|
-modparam("dispatcher", "grp_avp", "$avp(DISPATCHER_GRP_AVP)")
|
|
|
|
-modparam("dispatcher", "cnt_avp", "$avp(DISPATCHER_CNT_AVP)")
|
|
|
|
-modparam("dispatcher", "sock_avp", "$avp(DISPATCHER_SOCK_AVP)")
|
|
|
|
|
|
+#modparam("dispatcher", "dst_avp", "$avp(DISPATCHER_DST_AVP)")
|
|
|
|
+#modparam("dispatcher", "grp_avp", "$avp(DISPATCHER_GRP_AVP)")
|
|
|
|
+#modparam("dispatcher", "cnt_avp", "$avp(DISPATCHER_CNT_AVP)")
|
|
|
|
+#modparam("dispatcher", "sock_avp", "$avp(DISPATCHER_SOCK_AVP)")
|
|
|
|
+
|
|
|
|
+#modparam("dispatcher", "xavp_dst", "$avp(DISPATCHER_DST_AVP)")
|
|
|
|
+#modparam("dispatcher", "xavp_dst_mode", 0)
|
|
|
|
+#modparam("dispatcher", "xavp_ctx", "$avp(DISPATCHER_CNT_AVP)")
|
|
|
|
+#modparam("dispatcher", "xavp_ctx_mode", 0)
|
|
|
|
|
|
# Try to recover disabled destinations every 15 seconds.
|
|
# Try to recover disabled destinations every 15 seconds.
|
|
modparam("dispatcher", "ds_ping_interval", 15)
|
|
modparam("dispatcher", "ds_ping_interval", 15)
|
|
# Actively query the gateways:
|
|
# Actively query the gateways:
|
|
modparam("dispatcher", "ds_probing_mode", 1)
|
|
modparam("dispatcher", "ds_probing_mode", 1)
|
|
-#!endif
|
|
|
|
|
|
|
|
# -- usrloc params --
|
|
# -- usrloc params --
|
|
#!ifdef DB_URL
|
|
#!ifdef DB_URL
|
|
@@ -354,18 +385,23 @@ modparam("ims_usrloc_pcscf", "db_url", "cluster://cluster1")
|
|
#!else
|
|
#!else
|
|
modparam("ims_usrloc_pcscf", "db_url", DB_URL)
|
|
modparam("ims_usrloc_pcscf", "db_url", DB_URL)
|
|
#!endif
|
|
#!endif
|
|
-modparam("ims_usrloc_pcscf", "db_mode", 1)
|
|
|
|
|
|
+modparam("ims_usrloc_pcscf", "db_mode", 0)
|
|
#!endif
|
|
#!endif
|
|
|
|
+#modparam("ims_usrloc_pcscf", "hashing_type", 2)
|
|
modparam("ims_usrloc_pcscf", "enable_debug_file", 0)
|
|
modparam("ims_usrloc_pcscf", "enable_debug_file", 0)
|
|
modparam("ims_usrloc_pcscf", "match_contact_host_port", 1)
|
|
modparam("ims_usrloc_pcscf", "match_contact_host_port", 1)
|
|
modparam("ims_registrar_pcscf", "is_registered_fallback2ip", 1)
|
|
modparam("ims_registrar_pcscf", "is_registered_fallback2ip", 1)
|
|
modparam("ims_registrar_pcscf", "ignore_reg_state", 1)
|
|
modparam("ims_registrar_pcscf", "ignore_reg_state", 1)
|
|
modparam("ims_registrar_pcscf", "ignore_contact_rxport_check", 1)
|
|
modparam("ims_registrar_pcscf", "ignore_contact_rxport_check", 1)
|
|
|
|
+modparam("ims_registrar_pcscf", "pending_reg_expires", 30)
|
|
|
|
+modparam("ims_registrar_pcscf", "subscription_expires", 36000)
|
|
|
|
+modparam("ims_registrar_pcscf", "delete_delay", CONTACT_DELETE_DELAY)
|
|
|
|
+modparam("ims_usrloc_pcscf", "expires_grace", 120)
|
|
|
|
|
|
#!ifdef WITH_REGINFO
|
|
#!ifdef WITH_REGINFO
|
|
modparam("ims_registrar_pcscf", "subscribe_to_reginfo", 1)
|
|
modparam("ims_registrar_pcscf", "subscribe_to_reginfo", 1)
|
|
modparam("ims_registrar_pcscf", "publish_reginfo", 1)
|
|
modparam("ims_registrar_pcscf", "publish_reginfo", 1)
|
|
-modparam("ims_registrar_pcscf", "pcscf_uri", PCSCF_URL)
|
|
|
|
|
|
+modparam("ims_registrar_pcscf", "pcscf_uri", "sip:HOSTNAME")
|
|
#!else
|
|
#!else
|
|
modparam("ims_registrar_pcscf", "subscribe_to_reginfo", 0)
|
|
modparam("ims_registrar_pcscf", "subscribe_to_reginfo", 0)
|
|
modparam("ims_registrar_pcscf", "publish_reginfo", 0)
|
|
modparam("ims_registrar_pcscf", "publish_reginfo", 0)
|
|
@@ -375,13 +411,27 @@ modparam("ims_registrar_pcscf", "publish_reginfo", 0)
|
|
modparam("ims_ipsec_pcscf", "ipsec_listen_addr", IPSEC_LISTEN_ADDR)
|
|
modparam("ims_ipsec_pcscf", "ipsec_listen_addr", IPSEC_LISTEN_ADDR)
|
|
modparam("ims_ipsec_pcscf", "ipsec_client_port", IPSEC_CLIENT_PORT)
|
|
modparam("ims_ipsec_pcscf", "ipsec_client_port", IPSEC_CLIENT_PORT)
|
|
modparam("ims_ipsec_pcscf", "ipsec_server_port", IPSEC_SERVER_PORT)
|
|
modparam("ims_ipsec_pcscf", "ipsec_server_port", IPSEC_SERVER_PORT)
|
|
|
|
+modparam("ims_ipsec_pcscf", "ipsec_spi_id_start", 4096)
|
|
|
|
+modparam("ims_ipsec_pcscf", "ipsec_max_connections", IPSEC_MAX_CONN)
|
|
|
|
+modparam("htable", "htable", "ipsec_clients=>size=8;autoexpire=600000;")
|
|
#!endif
|
|
#!endif
|
|
|
|
|
|
#!ifdef WITH_RX
|
|
#!ifdef WITH_RX
|
|
# -- CDP params --
|
|
# -- CDP params --
|
|
modparam("cdp", "config_file", "/etc/kamailio_pcscf/pcscf.xml")
|
|
modparam("cdp", "config_file", "/etc/kamailio_pcscf/pcscf.xml")
|
|
# -- diameter_rx params --
|
|
# -- diameter_rx params --
|
|
-modparam("ims_qos", "rx_dest_realm", "NETWORKNAME")
|
|
|
|
|
|
+modparam("ims_qos", "rx_dest_realm", "PCRF_REALM")
|
|
|
|
+#modparam("ims_qos", "rx_forced_peer", "pcrf.epc.mnc001.mcc001.3gppnetwork.org")
|
|
|
|
+#modparam("ims_qos", "rx_forced_peer", "10.4.128.21")
|
|
|
|
+#modparam("ims_qos", "rx_dest_realm", "NETWORKNAME")
|
|
|
|
+modparam("ims_qos", "early_qosrelease_reason", "Sorry - QoS failed")
|
|
|
|
+modparam("ims_qos", "confirmed_qosrelease_headers", "X-Reason: QoS failed\r\n")
|
|
|
|
+modparam("ims_qos", "authorize_video_flow", 1)
|
|
|
|
+modparam("ims_qos", "af_signaling_ip", RX_AF_SIGNALING_IP)
|
|
|
|
+modparam("ims_qos", "include_rtcp_fd", 1)
|
|
|
|
+modparam("ims_qos", "rx_auth_expiry", 36000)
|
|
|
|
+modparam("ims_qos", "recv_mode", 1)
|
|
|
|
+modparam("ims_qos", "dialog_direction", RX_IMS_REG_DIALOG_DIRECTION)
|
|
#!endif
|
|
#!endif
|
|
|
|
|
|
# -- pua params --
|
|
# -- pua params --
|
|
@@ -400,13 +450,14 @@ modparam("ims_dialog", "dlg_flag", FLT_DIALOG)
|
|
modparam("ims_dialog", "timeout_avp", "$avp(DLG_TIMEOUT_AVP)")
|
|
modparam("ims_dialog", "timeout_avp", "$avp(DLG_TIMEOUT_AVP)")
|
|
modparam("ims_dialog", "detect_spirals", 0)
|
|
modparam("ims_dialog", "detect_spirals", 0)
|
|
modparam("ims_dialog", "profiles_no_value", "orig ; term")
|
|
modparam("ims_dialog", "profiles_no_value", "orig ; term")
|
|
|
|
+modparam("ims_dialog", "profiles_with_value", "caller ; callee")
|
|
#!ifdef DB_URL
|
|
#!ifdef DB_URL
|
|
#!ifdef DB_URL2
|
|
#!ifdef DB_URL2
|
|
modparam("ims_dialog", "db_url", "cluster://cluster1")
|
|
modparam("ims_dialog", "db_url", "cluster://cluster1")
|
|
#!else
|
|
#!else
|
|
modparam("ims_dialog", "db_url", DB_URL)
|
|
modparam("ims_dialog", "db_url", DB_URL)
|
|
#!endif
|
|
#!endif
|
|
-modparam("ims_usrloc_pcscf", "db_mode", 1)
|
|
|
|
|
|
+modparam("ims_dialog", "db_mode", 0)
|
|
#!endif
|
|
#!endif
|
|
|
|
|
|
#!ifdef CAPTURE_NODE
|
|
#!ifdef CAPTURE_NODE
|
|
@@ -431,7 +482,7 @@ modparam("statistics", "variable", "register_time")
|
|
# - processing of any incoming SIP request starts with this route
|
|
# - processing of any incoming SIP request starts with this route
|
|
route {
|
|
route {
|
|
##!ifdef WITH_DEBUG
|
|
##!ifdef WITH_DEBUG
|
|
- xlog("$rm ($fu ($si:$sp) to $tu, $ci)\n");
|
|
|
|
|
|
+ xnotice("PCSCF: $rm $ru ($fu ($si:$sp) to $tu, $ci)\n");
|
|
##!endif
|
|
##!endif
|
|
|
|
|
|
#!ifdef WITH_WEBSOCKET
|
|
#!ifdef WITH_WEBSOCKET
|
|
@@ -458,21 +509,23 @@ route {
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
- # handle requests within SIP dialogs
|
|
|
|
- route(WITHINDLG);
|
|
|
|
-
|
|
|
|
- ### only initial requests (no To tag)
|
|
|
|
-
|
|
|
|
# handle retransmissions
|
|
# handle retransmissions
|
|
- if(t_precheck_trans()) {
|
|
|
|
- t_check_trans();
|
|
|
|
- exit;
|
|
|
|
|
|
+ if (!is_method("ACK")) {
|
|
|
|
+ if(t_precheck_trans()) {
|
|
|
|
+ t_check_trans();
|
|
|
|
+ exit;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- t_check_trans();
|
|
|
|
|
|
+ #t_check_trans();
|
|
|
|
|
|
# Check for Re-Transmissions
|
|
# Check for Re-Transmissions
|
|
t_check_trans();
|
|
t_check_trans();
|
|
|
|
|
|
|
|
+ # handle requests within SIP dialogs
|
|
|
|
+ route(WITHINDLG);
|
|
|
|
+
|
|
|
|
+ ### only initial requests (no To tag)
|
|
|
|
+
|
|
if (is_method("UPDATE")) {
|
|
if (is_method("UPDATE")) {
|
|
send_reply("403", "Forbidden - Target refresh outside dialog not allowed");
|
|
send_reply("403", "Forbidden - Target refresh outside dialog not allowed");
|
|
break;
|
|
break;
|
|
@@ -482,6 +535,10 @@ route {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ #Set DLG flag to track dialogs using dialog2
|
|
|
|
+ if (!is_method("REGISTER|SUBSCRIBE"))
|
|
|
|
+ setflag(FLT_DIALOG);
|
|
|
|
+
|
|
loose_route();
|
|
loose_route();
|
|
#!ifdef WITH_SBC
|
|
#!ifdef WITH_SBC
|
|
if (ds_is_from_list(DISPATCHER_LIST_SBC)) {
|
|
if (ds_is_from_list(DISPATCHER_LIST_SBC)) {
|
|
@@ -712,10 +769,6 @@ route[REQINIT] {
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
- if (!is_method("REGISTER")) {
|
|
|
|
- ipsec_forward("location");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
# Ignore Re-Transmits:
|
|
# Ignore Re-Transmits:
|
|
if (t_lookup_request()) {
|
|
if (t_lookup_request()) {
|
|
exit;
|
|
exit;
|
|
@@ -736,17 +789,23 @@ route[RELAY] {
|
|
# Handle requests within SIP dialogs
|
|
# Handle requests within SIP dialogs
|
|
route[WITHINDLG] {
|
|
route[WITHINDLG] {
|
|
if (has_totag()) {
|
|
if (has_totag()) {
|
|
|
|
+ xnotice("Within DLG\n");
|
|
|
|
+ # sequential request withing a dialog should
|
|
|
|
+ # take the path determined by record-routing
|
|
|
|
+ if (loose_route()) {
|
|
|
|
+ xnotice("Within loose route\n");
|
|
if(!isdsturiset()) {
|
|
if(!isdsturiset()) {
|
|
handle_ruri_alias();
|
|
handle_ruri_alias();
|
|
|
|
+ #if ($rc == 1) {
|
|
|
|
+ # $ru = "sip:" + $rU + "@" + $dd + ":" + $dp + ";transport=" + $rP;
|
|
|
|
+ #}
|
|
}
|
|
}
|
|
|
|
+
|
|
if ( is_method("ACK") && ($sht(contact=>$ci) != $null) ) {
|
|
if ( is_method("ACK") && ($sht(contact=>$ci) != $null) ) {
|
|
xlog("Contact of Reply: $sht(contact=>$ci) ($ci)\n");
|
|
xlog("Contact of Reply: $sht(contact=>$ci) ($ci)\n");
|
|
$ru = $sht(contact=>$ci);
|
|
$ru = $sht(contact=>$ci);
|
|
}
|
|
}
|
|
|
|
|
|
- # sequential request within a dialog should
|
|
|
|
- # take the path determined by record-routing
|
|
|
|
- if (loose_route()) {
|
|
|
|
if ($route_uri =~ "sip:mt@.*") {
|
|
if ($route_uri =~ "sip:mt@.*") {
|
|
route(MT_indialog);
|
|
route(MT_indialog);
|
|
} else {
|
|
} else {
|
|
@@ -757,7 +816,8 @@ route[WITHINDLG] {
|
|
route(NATMANAGE);
|
|
route(NATMANAGE);
|
|
|
|
|
|
route(RELAY);
|
|
route(RELAY);
|
|
- } else {
|
|
|
|
|
|
+ exit;
|
|
|
|
+ }
|
|
if ( is_method("ACK") ) {
|
|
if ( is_method("ACK") ) {
|
|
xlog("Contact of Reply: $T_rpl($ct)\n");
|
|
xlog("Contact of Reply: $T_rpl($ct)\n");
|
|
if ( t_check_trans() ) {
|
|
if ( t_check_trans() ) {
|
|
@@ -772,7 +832,6 @@ route[WITHINDLG] {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
sl_send_reply("404", "Not here");
|
|
sl_send_reply("404", "Not here");
|
|
- }
|
|
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -827,37 +886,41 @@ route[NOTIFY]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#!ifdef WITH_NATPING
|
|
# NATPING Route: #
|
|
# NATPING Route: #
|
|
#####################################################################
|
|
#####################################################################
|
|
route[NATPING] {
|
|
route[NATPING] {
|
|
route(preload_pcscf);
|
|
route(preload_pcscf);
|
|
|
|
|
|
|
|
+ sht_lock("natping=>natpinglock");
|
|
sht_iterator_start("nat_iterator", "natping");
|
|
sht_iterator_start("nat_iterator", "natping");
|
|
while(sht_iterator_next("nat_iterator")) {
|
|
while(sht_iterator_next("nat_iterator")) {
|
|
xlog("OPTIONS to $shtitval(nat_iterator) via $shtitkey(nat_iterator)...\n");
|
|
xlog("OPTIONS to $shtitval(nat_iterator) via $shtitkey(nat_iterator)...\n");
|
|
$uac_req(method) = "OPTIONS";
|
|
$uac_req(method) = "OPTIONS";
|
|
$uac_req(ruri) = $shtitval(nat_iterator);
|
|
$uac_req(ruri) = $shtitval(nat_iterator);
|
|
$uac_req(furi) = PCSCF_URL;
|
|
$uac_req(furi) = PCSCF_URL;
|
|
|
|
+ $uac_req(sock) = $sht(natpingfrom=>$shtitkey(nat_iterator));
|
|
$uac_req(turi) = $shtitval(nat_iterator);
|
|
$uac_req(turi) = $shtitval(nat_iterator);
|
|
$uac_req(ouri) = $shtitkey(nat_iterator);
|
|
$uac_req(ouri) = $shtitkey(nat_iterator);
|
|
$uac_req(evroute) = 1;
|
|
$uac_req(evroute) = 1;
|
|
uac_req_send();
|
|
uac_req_send();
|
|
}
|
|
}
|
|
sht_iterator_end("nat_iterator");
|
|
sht_iterator_end("nat_iterator");
|
|
|
|
+ sht_unlock("natping=>natpinglock");
|
|
}
|
|
}
|
|
|
|
|
|
event_route[uac:reply] {
|
|
event_route[uac:reply] {
|
|
-#!ifdef WITH_DEBUG
|
|
|
|
|
|
+##!ifdef WITH_DEBUG
|
|
xlog("request sent to $uac_req(ruri) completed with code: $uac_req(evcode), Type $uac_req(evtype)\n");
|
|
xlog("request sent to $uac_req(ruri) completed with code: $uac_req(evcode), Type $uac_req(evtype)\n");
|
|
-#!endif
|
|
|
|
|
|
+##!endif
|
|
if (($uac_req(evtype) != 1) || ($uac_req(evcode) != 200)) {
|
|
if (($uac_req(evtype) != 1) || ($uac_req(evcode) != 200)) {
|
|
if ($sht(natpingfail=>$uac_req(ouri)) == $null) {
|
|
if ($sht(natpingfail=>$uac_req(ouri)) == $null) {
|
|
$sht(natpingfail=>$uac_req(ouri)) = 1;
|
|
$sht(natpingfail=>$uac_req(ouri)) = 1;
|
|
} else {
|
|
} else {
|
|
$sht(natpingfail=>$uac_req(ouri)) = $sht(natpingfail=>$uac_req(ouri)) + 1;
|
|
$sht(natpingfail=>$uac_req(ouri)) = $sht(natpingfail=>$uac_req(ouri)) + 1;
|
|
}
|
|
}
|
|
- # xlog(" request sent to $uac_req(ruri): Fail Counter is $sht(natpingfail=>$uac_req(ouri))\n");
|
|
|
|
- if ($sht(natpingfail=>$uac_req(ouri)) > 3) {
|
|
|
|
|
|
+ xlog(" request sent to $uac_req(ruri): Fail Counter is $sht(natpingfail=>$uac_req(ouri))\n");
|
|
|
|
+ if ($sht(natpingfail=>$uac_req(ouri)) > 30) {
|
|
if ($(uac_req(ouri){uri.transport}) == "tcp") {
|
|
if ($(uac_req(ouri){uri.transport}) == "tcp") {
|
|
$var(alias) = "alias="+$(uac_req(ouri){uri.host})+"~"+$(uac_req(ouri){uri.port})+"~2";
|
|
$var(alias) = "alias="+$(uac_req(ouri){uri.host})+"~"+$(uac_req(ouri){uri.port})+"~2";
|
|
} else if ($(uac_req(ouri){uri.transport}) == "tls") {
|
|
} else if ($(uac_req(ouri){uri.transport}) == "tls") {
|
|
@@ -867,10 +930,19 @@ event_route[uac:reply] {
|
|
}
|
|
}
|
|
xlog(" Unregistering $uac_req(ruri);$var(alias)\n");
|
|
xlog(" Unregistering $uac_req(ruri);$var(alias)\n");
|
|
setdebug("9");
|
|
setdebug("9");
|
|
- ipsec_destroy("location");
|
|
|
|
|
|
+#!ifdef WITH_IPSEC
|
|
|
|
+ ipsec_destroy_by_contact("location", "$uac_req(ruri);$var(alias)", "$(uac_req(ouri){uri.host})", "$(uac_req(ouri){uri.port})");
|
|
|
|
+#!endif
|
|
pcscf_unregister("location", "$uac_req(ruri);$var(alias)", "$(uac_req(ouri){uri.host})", "$(uac_req(ouri){uri.port})");
|
|
pcscf_unregister("location", "$uac_req(ruri);$var(alias)", "$(uac_req(ouri){uri.host})", "$(uac_req(ouri){uri.port})");
|
|
resetdebug();
|
|
resetdebug();
|
|
|
|
+ sht_lock("natping=>natpinglock");
|
|
$sht(natping=>$uac_req(ouri)) = $null;
|
|
$sht(natping=>$uac_req(ouri)) = $null;
|
|
|
|
+ sht_unlock("natping=>natpinglock");
|
|
|
|
+ $sht(natpingfail=>$uac_req(ouri)) = $null;
|
|
|
|
+
|
|
|
|
+ sht_lock("natpingfrom=>natpingfromlock");
|
|
|
|
+ $sht(natpingfrom=>$uac_req(ouri)) = $null;
|
|
|
|
+ sht_unlock("natpingfrom=>natpingfromlock");
|
|
$sht(natpingfail=>$uac_req(ouri)) = $null;
|
|
$sht(natpingfail=>$uac_req(ouri)) = $null;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -883,10 +955,9 @@ event_route[htable:expired:natping] {
|
|
}
|
|
}
|
|
|
|
|
|
event_route[htable:mod-init] {
|
|
event_route[htable:mod-init] {
|
|
- xlog("event_route[htable:mod-init] {\n");
|
|
|
|
|
|
+ xlog("event_route[htable:mod-init] \n");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
route[preload_pcscf] {
|
|
route[preload_pcscf] {
|
|
if ($shv(preload_pcscf) == 1) return;
|
|
if ($shv(preload_pcscf) == 1) return;
|
|
$shv(preload_pcscf) = 1;
|
|
$shv(preload_pcscf) = 1;
|
|
@@ -904,12 +975,15 @@ route[preload_pcscf] {
|
|
}
|
|
}
|
|
$var(noalias) = $(dbr(resultset=>[$var(i),0]){re.subst,/^(.*);alias=.*/\1/}{nameaddr.uri});
|
|
$var(noalias) = $(dbr(resultset=>[$var(i),0]){re.subst,/^(.*);alias=.*/\1/}{nameaddr.uri});
|
|
# xlog("$$var(noalias) => $var(noalias) (via $var(ouri))\n");
|
|
# xlog("$$var(noalias) => $var(noalias) (via $var(ouri))\n");
|
|
|
|
+ sht_lock("natping=>natpinglock");
|
|
$sht(natping=>$var(ouri)) = $var(noalias);
|
|
$sht(natping=>$var(ouri)) = $var(noalias);
|
|
|
|
+ sht_unlock("natping=>natpinglock");
|
|
$var(i) = $var(i) + 1;
|
|
$var(i) = $var(i) + 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
sql_result_free("resultset");
|
|
sql_result_free("resultset");
|
|
}
|
|
}
|
|
|
|
+#!endif
|
|
|
|
|
|
#!ifdef WITH_XMLRPC
|
|
#!ifdef WITH_XMLRPC
|
|
include_file "route/xmlrpc.cfg"
|
|
include_file "route/xmlrpc.cfg"
|