|
@@ -13,8 +13,6 @@
|
|
|
# try http://sip-router.org/wiki/ .
|
|
|
#
|
|
|
|
|
|
-include_file "scscf.cfg"
|
|
|
-
|
|
|
####### Defined Values #########
|
|
|
# *** Value defines - IDs used later in config
|
|
|
|
|
@@ -30,10 +28,13 @@ include_file "scscf.cfg"
|
|
|
#!define DISPATCHER_DST_AVP "i:3"
|
|
|
#!define DISPATCHER_GRP_AVP "i:4"
|
|
|
#!define DISPATCHER_CNT_AVP "i:5"
|
|
|
+#!define PDB_CARRIER "i:6"
|
|
|
|
|
|
-system.shutdownmode = 0 desc "System shutdown mode"
|
|
|
|
|
|
####### Global Parameters #########
|
|
|
+
|
|
|
+include_file "scscf.cfg"
|
|
|
+
|
|
|
#!ifdef WITH_DEBUG
|
|
|
debug=5
|
|
|
log_stderror=no
|
|
@@ -44,15 +45,6 @@ log_stderror=no
|
|
|
sip_warning=no
|
|
|
#!endif
|
|
|
|
|
|
-/* uncomment and configure the following line if you want Kamailio to
|
|
|
- bind on a specific interface/port/proto (default bind on all available) */
|
|
|
-#!ifdef NETWORK_INTERFACE
|
|
|
-listen=NETWORK_INTERFACE
|
|
|
-#!endif
|
|
|
-
|
|
|
-/* port to listen to
|
|
|
- * - can be specified more than once if needed to listen on many ports */
|
|
|
-port=PORT
|
|
|
alias=HOSTNAME
|
|
|
|
|
|
user_agent_header="User-Agent: Kamailio S-CSCF"
|
|
@@ -70,10 +62,12 @@ rev_dns=no # (cmd. line: -R)
|
|
|
dns_srv_lb=yes
|
|
|
# Always: Also try IPv6:
|
|
|
dns_try_ipv6=yes
|
|
|
-# Try only IPv6:
|
|
|
+# Always prefer IPv6:
|
|
|
dns_cache_flags=6
|
|
|
+# DNS-Based failover
|
|
|
+use_dns_failover = on
|
|
|
# Query NAPTR-Records as well:
|
|
|
-dns_try_naptr=yes
|
|
|
+dns_try_naptr=no
|
|
|
|
|
|
#!ifdef WITH_XMLRPC
|
|
|
#!ifndef WITH_TCP
|
|
@@ -98,6 +92,8 @@ disable_tcp=yes
|
|
|
|
|
|
children=64
|
|
|
|
|
|
+system.shutdownmode = 0 desc "System shutdown mode"
|
|
|
+
|
|
|
# ------------------ module loading ----------------------------------
|
|
|
mpath="/usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/:/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/"
|
|
|
# (we try both the lib64 and the lib directory)
|
|
@@ -113,8 +109,19 @@ loadmodule "xlog.so"
|
|
|
loadmodule "sanity.so"
|
|
|
loadmodule "siputils.so"
|
|
|
loadmodule "kex.so"
|
|
|
+#!ifdef DB_URL
|
|
|
+loadmodule "presence"
|
|
|
+#!endif
|
|
|
+
|
|
|
+#!ifdef DB_URL
|
|
|
+loadmodule "db_mysql"
|
|
|
+#!ifdef DB_URL2
|
|
|
+loadmodule "db_cluster"
|
|
|
+#!endif
|
|
|
+#!endif
|
|
|
|
|
|
loadmodule "dispatcher"
|
|
|
+
|
|
|
loadmodule "enum"
|
|
|
loadmodule "uac"
|
|
|
|
|
@@ -129,15 +136,16 @@ loadmodule "xmlrpc"
|
|
|
|
|
|
loadmodule "cdp.so"
|
|
|
loadmodule "cdp_avp.so"
|
|
|
-#!ifdef WITH_RO
|
|
|
-loadmodule "ims_diameter_ro.so"
|
|
|
-#!endif
|
|
|
|
|
|
loadmodule "ims_usrloc_scscf.so"
|
|
|
loadmodule "ims_registrar_scscf.so"
|
|
|
loadmodule "ims_auth.so"
|
|
|
loadmodule "ims_isc.so"
|
|
|
|
|
|
+#!ifdef WITH_RO
|
|
|
+loadmodule "ims_charging.so"
|
|
|
+#!endif
|
|
|
+
|
|
|
#!ifdef CAPTURE_NODE
|
|
|
loadmodule "siptrace.so"
|
|
|
#!endif
|
|
@@ -146,29 +154,31 @@ loadmodule "siptrace.so"
|
|
|
loadmodule "debugger.so"
|
|
|
#!endif
|
|
|
|
|
|
-#!ifdef WITH_DIALPLAN
|
|
|
-loadmodule "db_text.so"
|
|
|
-loadmodule "dialplan.so"
|
|
|
+# ----------------- setting module-specific parameters ---------------
|
|
|
+#!ifdef DB_URL2
|
|
|
+# ----- db_cluster params -----
|
|
|
+modparam("db_cluster", "connection", DB_URL)
|
|
|
+modparam("db_cluster", "connection", DB_URL2)
|
|
|
+modparam("db_cluster", "cluster", "cluster1=>con1=2s2s;con2=1s1s")
|
|
|
+#!endif
|
|
|
+
|
|
|
+# ----- presence params -----
|
|
|
+#!ifdef DB_URL
|
|
|
+#!ifdef DB_URL2
|
|
|
+modparam("presence", "db_url", "cluster://cluster1")
|
|
|
+#!else
|
|
|
+modparam("presence", "db_url", DB_URL)
|
|
|
+#!endif
|
|
|
+#modparam("presence", "fallback2db", 1)
|
|
|
+modparam("presence", "db_update_period", 20)
|
|
|
#!endif
|
|
|
|
|
|
-# ----------------- setting module-specific parameters ---------------
|
|
|
# ----- mi_fifo params -----
|
|
|
modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
|
|
|
modparam("mi_fifo", "fifo_mode", 0666)
|
|
|
modparam("mi_fifo", "fifo_user", "kamailio")
|
|
|
modparam("mi_fifo", "fifo_group", "kamailio")
|
|
|
|
|
|
-#!ifdef WITH_DIALPLAN
|
|
|
-# ----- db_text params -----
|
|
|
-# Non-Caching-Mode, Caching is done by the dialplan module
|
|
|
-modparam("db_text", "db_mode", 1)
|
|
|
-
|
|
|
-# ----- dialplan params -----
|
|
|
-# Comment the following line to enable realm routing
|
|
|
-# Database files can be found in CFG_DIR/db (e.g. /etc/kamailio/db/)
|
|
|
-modparam("dialplan","db_url", "text:///etc/kamailio/db/")
|
|
|
-#!endif
|
|
|
-
|
|
|
# ----- mi_fifo params -----
|
|
|
modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
|
|
|
modparam("mi_fifo", "fifo_mode", 0666)
|
|
@@ -183,7 +193,7 @@ modparam("tm", "fr_timer", 10000)
|
|
|
# default invite retransmission timeout after 1xx: 120sec
|
|
|
modparam("tm", "fr_inv_timer", 120000)
|
|
|
# Don't reply automatically with "100 Trying"
|
|
|
-modparam("tm", "auto_inv_100", 1)
|
|
|
+modparam("tm", "auto_inv_100", 0)
|
|
|
|
|
|
# ----- rr params -----
|
|
|
# add value to ;lr param to cope with most of the UAs
|
|
@@ -196,9 +206,23 @@ modparam("rr", "add_username", 1)
|
|
|
modparam("rr", "custom_user_avp", "$avp(RR_CUSTOM_USER_AVP)")
|
|
|
|
|
|
# -- usrloc params --
|
|
|
-modparam("ims_usrloc_scscf", "enable_debug_file", 1)
|
|
|
-modparam("ims_usrloc_scscf", "usrloc_debug_file", "/var/log/usrloc_debug")
|
|
|
+modparam("ims_usrloc_scscf", "enable_debug_file", 0)
|
|
|
modparam("ims_usrloc_scscf", "matching_mode", 0)
|
|
|
+modparam("ims_registrar_scscf", "max_contacts", 5);
|
|
|
+#!ifdef DB_URL
|
|
|
+#!ifdef DB_URL2
|
|
|
+modparam("ims_usrloc_scscf", "db_url", "cluster://cluster1")
|
|
|
+#!else
|
|
|
+modparam("ims_usrloc_scscf", "db_url", DB_URL)
|
|
|
+#!endif
|
|
|
+modparam("ims_usrloc_scscf", "db_mode", 1)
|
|
|
+#!endif
|
|
|
+modparam("ims_registrar_scscf", "default_expires", 604800)
|
|
|
+modparam("ims_registrar_scscf", "min_expires", 3600)
|
|
|
+modparam("ims_registrar_scscf", "max_expires", 604800)
|
|
|
+modparam("ims_registrar_scscf", "subscription_default_expires", 654800)
|
|
|
+modparam("ims_registrar_scscf", "subscription_min_expires", 3700)
|
|
|
+modparam("ims_registrar_scscf", "subscription_max_expires", 605800)
|
|
|
|
|
|
# -- CDP params --
|
|
|
modparam("cdp","config_file","/etc/kamailio/scscf.xml")
|
|
@@ -244,16 +268,10 @@ modparam("ims_auth", "av_check_only_impu", 1)
|
|
|
modparam("ims_registrar_scscf", "default_expires", 60)
|
|
|
modparam("ims_registrar_scscf", "min_expires", 60)
|
|
|
modparam("ims_registrar_scscf", "max_expires", 60)
|
|
|
-modparam("ims_registrar_scscf", "subscription_default_expires", 80)
|
|
|
-modparam("ims_registrar_scscf", "subscription_min_expires", 80)
|
|
|
-modparam("ims_registrar_scscf", "subscription_max_expires", 80)
|
|
|
#!else
|
|
|
modparam("ims_registrar_scscf", "default_expires", 604800)
|
|
|
modparam("ims_registrar_scscf", "min_expires", 3600)
|
|
|
modparam("ims_registrar_scscf", "max_expires", 604800)
|
|
|
-modparam("ims_registrar_scscf", "subscription_default_expires", 654800)
|
|
|
-modparam("ims_registrar_scscf", "subscription_min_expires", 3700)
|
|
|
-modparam("ims_registrar_scscf", "subscription_max_expires", 605800)
|
|
|
#!endif
|
|
|
modparam("ims_registrar_scscf", "use_path", 1)
|
|
|
modparam("ims_registrar_scscf", "support_wildcardPSI",1)
|
|
@@ -266,14 +284,22 @@ modparam("ims_isc", "my_uri", HOSTNAME)
|
|
|
|
|
|
#!ifdef WITH_RO
|
|
|
# ----- ims_diameter_ro params -----
|
|
|
-modparam("ims_diameter_ro", "ro_origin_host", HOSTNAME);
|
|
|
+modparam("ims_charging", "origin_host", HOSTNAME);
|
|
|
+modparam("ims_charging", "origin_realm", NETWORKNAME);
|
|
|
#!ifdef RO_FORCED_PEER
|
|
|
-modparam("ims_diameter_ro", "ro_forced_peer", RO_FORCED_PEER);
|
|
|
+modparam("ims_charging", "ro_forced_peer", RO_FORCED_PEER);
|
|
|
#!endif
|
|
|
-modparam("ims_diameter_ro", "ro_dest_realm", NETWORKNAME);
|
|
|
+modparam("ims_charging", "destination_host", RO_DESTINATION);
|
|
|
+modparam("ims_charging", "destination_realm", NETWORKNAME);
|
|
|
+
|
|
|
+modparam("ims_charging","service_context_id_root", RO_ROOT);
|
|
|
+modparam("ims_charging","service_context_id_ext", RO_EXT);
|
|
|
+modparam("ims_charging","service_context_id_mnc", RO_MNC);
|
|
|
+modparam("ims_charging","service_context_id_mcc", RO_MCC);
|
|
|
+modparam("ims_charging","service_context_id_release", RO_RELEASE);
|
|
|
|
|
|
-modparam("ims_diameter_ro","interim_request_credits",30);
|
|
|
-modparam("ims_diameter_ro","timer_buffer",5);
|
|
|
+modparam("ims_charging","interim_update_credits",30);
|
|
|
+modparam("ims_charging","timer_buffer",5);
|
|
|
#!endif
|
|
|
|
|
|
# ----- enum params -----
|
|
@@ -302,9 +328,9 @@ modparam("dispatcher", "ds_probing_mode", 1)
|
|
|
# - processing of any incoming SIP request starts with this route
|
|
|
|
|
|
route {
|
|
|
-##!ifdef WITH_DEBUG
|
|
|
+#!ifdef WITH_DEBUG
|
|
|
xlog("L_ERR", "$rm ($fu ($si:$sp) to $tu, $ci)\n");
|
|
|
-##!endif
|
|
|
+#!endif
|
|
|
|
|
|
# per request initial checks
|
|
|
route(REQINIT);
|
|
@@ -365,7 +391,7 @@ route {
|
|
|
# Terminating
|
|
|
if (uri=~"sip:(.*)@"+NETWORKNAME_ESC +"(.*)" || uri=~"tel:.*") {
|
|
|
if (!term_impu_registered("location")) {
|
|
|
- xlog("L_ERR", "We need to do an UNREG server SAR assignemnt");
|
|
|
+ xlog("L_DBG", "We need to do an UNREG server SAR assignemnt");
|
|
|
assign_server_unreg("UNREG_SAR_REPLY", "location", "term");
|
|
|
exit;
|
|
|
}
|
|
@@ -437,37 +463,42 @@ route[REQINIT] {
|
|
|
if (t_lookup_request()) {
|
|
|
exit;
|
|
|
}
|
|
|
+ if (is_method("INVITE")) {
|
|
|
+ send_reply("100", "Trying");
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+
|
|
|
######################################################################
|
|
|
# Publish route
|
|
|
######################################################################
|
|
|
route[PUBLISH]
|
|
|
{
|
|
|
- if (!t_newtran()) {
|
|
|
- #absorb retransmissions
|
|
|
- sl_reply("500","Could not create transaction");
|
|
|
- exit;
|
|
|
- }
|
|
|
+ if (!t_newtran()) {
|
|
|
+ #absorb retransmissions
|
|
|
+ sl_reply("500","Could not create transaction");
|
|
|
+ exit;
|
|
|
+ }
|
|
|
|
|
|
- if (can_publish_reg("location")){
|
|
|
- $var(ret)= publish_reg("location");
|
|
|
- switch ($var(ret)){
|
|
|
- case 1: #success
|
|
|
- xlog("L_DBG", "Publish reg successful");
|
|
|
- break;
|
|
|
- case -1: #failure
|
|
|
- xlog("L_ERR", "Publish reg failure - sending 500 Error now\n");
|
|
|
- t_reply("500","Server Error publishing subscription");
|
|
|
- break;
|
|
|
- default:
|
|
|
- xlog("L_ERR", "Unknown return code from publish reg event alue is [$var(ret)]\n");
|
|
|
- break;
|
|
|
- }
|
|
|
- } else {
|
|
|
- t_reply("403","Forbidden to PUBLISH");
|
|
|
- exit;
|
|
|
- }
|
|
|
+ if (can_publish_reg("location")) {
|
|
|
+ $var(ret)= publish_reg("location");
|
|
|
+ switch ($var(ret)){
|
|
|
+ case 1: #success
|
|
|
+ xlog("L_DBG", "Publish reg successful");
|
|
|
+ break;
|
|
|
+ case -1: #failure
|
|
|
+ xlog("L_ERR", "Publish reg failure - sending 500 Error now\n");
|
|
|
+ t_reply("500","Server Error publishing subscription");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ xlog("L_ERR", "Unknown return code from publish reg event alue is [$var(ret)]\n");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ t_reply("403","Forbidden to PUBLISH");
|
|
|
+ exit;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
######################################################################
|
|
@@ -498,19 +529,19 @@ route[SUBSCRIBE]
|
|
|
|
|
|
$var(ret)= subscribe_to_reg("location");
|
|
|
switch ($var(ret)){
|
|
|
- case 1: #success
|
|
|
- xlog("L_DBG", "Subscribe to reg successful");
|
|
|
- break;
|
|
|
- case -1: #failure
|
|
|
- xlog("L_ERR", "Subscribe to reg failure - sending 500 Error now\n");
|
|
|
- t_reply("500","Server Error saving subscription");
|
|
|
- break;
|
|
|
- case -2: #error
|
|
|
- xlog("L_ERR", "Subscribe to reg error sending notify - 200 OK so subscription already sent\n");
|
|
|
- break;
|
|
|
- default:
|
|
|
- xlog("L_ERR", "Unknown return code from subscribe to reg event alue is [$var(ret)]\n");
|
|
|
- break;
|
|
|
+ case 1: #success
|
|
|
+ xlog("L_DBG", "Subscribe to reg successful");
|
|
|
+ break;
|
|
|
+ case -1: #failure
|
|
|
+ xlog("L_ERR", "Subscribe to reg failure - sending 500 Error now\n");
|
|
|
+ t_reply("500","Server Error saving subscription");
|
|
|
+ break;
|
|
|
+ case -2: #error
|
|
|
+ xlog("L_ERR", "Subscribe to reg error sending notify - 200 OK so subscription already sent\n");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ xlog("L_ERR", "Unknown return code from subscribe to reg event alue is [$var(ret)]\n");
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -559,7 +590,6 @@ route[SUBSCRIBE_UNREG_SAR_REPLY]
|
|
|
exit;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
######################################################################
|
|
|
# XMLRPC routing
|
|
|
######################################################################
|
|
@@ -718,46 +748,77 @@ route[orig]
|
|
|
$avp(RR_CUSTOM_USER_AVP)="mo";
|
|
|
record_route();
|
|
|
}
|
|
|
+
|
|
|
+ # Start new transaction:
|
|
|
+ t_newtran();
|
|
|
|
|
|
- if (is_method("INVITE|MESSAGE")) {
|
|
|
- append_hf("P-Called-Party-ID: <$ruri>\r\n");
|
|
|
- }
|
|
|
+ # check if dialog saved as fwded to AS
|
|
|
+ if (isc_match_filter("orig", "location")) {
|
|
|
+ t_on_failure("isc_orig_failure");
|
|
|
+ #xlog("Orig - msg was fwded to AS\n");
|
|
|
+ exit;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!isc_from_as("orig")) {
|
|
|
+ remove_hf("P-Asserted-Identity");
|
|
|
+ append_hf("P-Asserted-Identity: <sip:$fU@$fd>\r\n");
|
|
|
+ }
|
|
|
|
|
|
#!ifdef WITH_RO
|
|
|
# before we allow call - lets check credit
|
|
|
if (is_method("INVITE")) {
|
|
|
xlog("L_DBG","Sending initial CCR Request for call\n");
|
|
|
- $var(cc_ret) = Ro_send_ccr(10);
|
|
|
+ $var(cc_ret) = Ro_CCR("CHARGING_CCR_REPLY", "orig", "SCUR", "", "30", "location");
|
|
|
if ($var(cc_ret) < 0) {
|
|
|
- xlog("L_DBG","CCR Request failure\n");
|
|
|
+ xlog("L_ERR","CCR Request failure\n");
|
|
|
sl_send_reply("402","Payment required");
|
|
|
exit;
|
|
|
}
|
|
|
xlog("L_DBG","CCR Request success\n");
|
|
|
- }
|
|
|
-#!endif
|
|
|
- # check if dialog saved as fwded to AS
|
|
|
- if (isc_match_filter("orig", "location")) {
|
|
|
- t_on_failure("isc_orig_failure");
|
|
|
- xlog("Orig - msg was fwded to AS\n");
|
|
|
exit;
|
|
|
}
|
|
|
+#!endif
|
|
|
+ route(Finalize_Orig);
|
|
|
+}
|
|
|
|
|
|
- #if (!isc_from_as("orig")) {
|
|
|
- # remove_hf("P-Asserted-Identity");
|
|
|
- # append_hf("P-Asserted-Identity: <sip:$fU@$fd>\r\n");
|
|
|
- #}
|
|
|
+route[Finalize_Orig]
|
|
|
+{
|
|
|
+ # Check for PSTN destinations:
|
|
|
+ if (is_method("INVITE")) {
|
|
|
+ route(PSTN_handling);
|
|
|
+ }
|
|
|
|
|
|
- # Check for PSTN destinations:
|
|
|
- if (is_method("INVITE")) {
|
|
|
- route(PSTN_handling);
|
|
|
- }
|
|
|
+ t_on_reply("orig_reply");
|
|
|
|
|
|
- t_on_reply("orig_reply");
|
|
|
+ t_relay();
|
|
|
+}
|
|
|
|
|
|
- t_relay();
|
|
|
+route[CHARGING_CCR_REPLY]
|
|
|
+{
|
|
|
+ xlog("L_DBG","saa_return code is $avp(s:cca_return_code)\n");
|
|
|
+
|
|
|
+ switch ($avp(s:cca_return_code)){
|
|
|
+ case 1: #success
|
|
|
+ xlog("L_DBG", "CCR success - will route message\n");
|
|
|
+ route(Finalize_Orig);
|
|
|
+ break;
|
|
|
+ case -1: #failure
|
|
|
+ xlog("L_ERR", "CCR failure - error response sent from module\n");
|
|
|
+ send_reply("402","Payment required");
|
|
|
+ break;
|
|
|
+ case -2: #error
|
|
|
+ xlog("L_ERR", "CCR error - error response sent from module\n");
|
|
|
+ send_reply("500", "Charging Error");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ xlog("L_ERR", "Unknown return code from CCR: [$avp(s:cca_return_code)] \n");
|
|
|
+ send_reply("500", "Charging Error");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ exit;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
######################################################################
|
|
|
# Replies to the Initial Requests
|
|
|
######################################################################
|
|
@@ -766,18 +827,6 @@ onreply_route[orig_reply]
|
|
|
xlog("L_DBG","Orig reply\n");
|
|
|
|
|
|
route(apply_privacy);
|
|
|
-#!ifdef WITH_RO
|
|
|
- # before we allow call - lets check credit
|
|
|
- if (t_check_status("183")){
|
|
|
- xlog("L_DBG","Sending initial CCR Request for call\n");
|
|
|
- $var(cc_ret) = Ro_send_ccr(10); commented by Jason 5/4/2012
|
|
|
- if ($var(cc_ret) < 0) {
|
|
|
- xlog("L_DBG","CCR Request failure\n");
|
|
|
- dlg_terminate("all", "Sorry no funds available");
|
|
|
- }
|
|
|
- xlog("L_DBG", "IMS: Received 183 inside orig_initial_reply\n");
|
|
|
- }
|
|
|
-#!endif
|
|
|
break;
|
|
|
}
|
|
|
|
|
@@ -930,14 +979,6 @@ route[PSTN_handling]
|
|
|
if (!tel2sip("$ru", "$fd", "$ru"))
|
|
|
xlog("L_WARN","Failed to convert $ru to a sip:-URI - M=$rm R=$ru F=$fu T=$tu IP=$si:$sp ID=$ci\n\n");
|
|
|
|
|
|
-#!ifdef WITH_DIALPLAN
|
|
|
- # Check for numeric Request-Username
|
|
|
- if ($rU =~ "[0-9]+") {
|
|
|
- if (dp_translate("1")) {
|
|
|
- xlog("L_INFO", "R-URI rewritten to $rU - M=$rm R=$ru F=$fu T=$tu IP=$si:$sp ID=$ci\n");
|
|
|
- }
|
|
|
- }
|
|
|
-#!endif
|
|
|
if ($rU =~ "\+[0-9]+") {
|
|
|
# Now let's check, if the number can be found in ENUM:
|
|
|
if(!enum_query()) {
|
|
@@ -953,13 +994,14 @@ route[PSTN_handling]
|
|
|
######################################################################
|
|
|
route[PSTN]
|
|
|
{
|
|
|
- t_on_failure("PSTN_failure");
|
|
|
- # Relay the request towards the PSTN-Gateway:
|
|
|
- if (!ds_select_dst("1", "4")) {
|
|
|
+ if (!ds_select_domain("1", "4")) {
|
|
|
+ xlog("L_WARN","No PSTN-Gateways available - M=$rm R=$ru F=$fu T=$tu IP=$si:$sp ID=$ci\n\n");
|
|
|
send_reply("503", "Service not available");
|
|
|
exit;
|
|
|
}
|
|
|
# Relay the request:
|
|
|
+ t_on_failure("PSTN_failure");
|
|
|
+
|
|
|
t_relay();
|
|
|
exit;
|
|
|
}
|
|
@@ -972,7 +1014,7 @@ failure_route[PSTN_failure] {
|
|
|
# - get a local generated "408"
|
|
|
# - receive a 5xx or 6xx reply from the proxy.
|
|
|
if (t_branch_timeout() || t_check_status("[5-6]..")) {
|
|
|
- if (ds_next_dst()) {
|
|
|
+ if (ds_next_domain()) {
|
|
|
# Do Failover in case problems:
|
|
|
t_on_failure("PSTN_failure");
|
|
|
t_relay();
|
|
@@ -984,3 +1026,4 @@ failure_route[PSTN_failure] {
|
|
|
exit;
|
|
|
}
|
|
|
}
|
|
|
+
|