Переглянути джерело

misc/examples/ims/pcscf: location renamed to pcscf_location

- GH #4177
- table has different name to avoid conflict with usrloc
- pre-commit whitespaces fixes
Daniel-Constantin Mierla 4 місяців тому
батько
коміт
dc269b336c
1 змінених файлів з 23 додано та 23 видалено
  1. 23 23
      misc/examples/ims/pcscf/kamailio.cfg

+ 23 - 23
misc/examples/ims/pcscf/kamailio.cfg

@@ -48,11 +48,11 @@ max_while_loops=5000
 listen=tcp:127.0.0.1:5060
 listen=tcp:127.0.0.1:5060
 #!endif
 #!endif
 
 
-# Locks all ser pages into memory making it unswappable (in general one 
+# Locks all ser pages into memory making it unswappable (in general one
 # doesn't want his sip proxy swapped out )
 # doesn't want his sip proxy swapped out )
 mlock_pages=yes
 mlock_pages=yes
-# Tries to pre-fault all the shared memory, before starting. When "on", start 
-# time will increase, but combined with mlock_pages will guarantee ser will get 
+# Tries to pre-fault all the shared memory, before starting. When "on", start
+# time will increase, but combined with mlock_pages will guarantee ser will get
 # all its memory from the beginning (no more kswapd slow downs)
 # all its memory from the beginning (no more kswapd slow downs)
 shm_force_alloc=yes
 shm_force_alloc=yes
 
 
@@ -108,9 +108,9 @@ tcp_connection_lifetime=36000
 # 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).
 #
 #
-# Note: For NAT traversal of TCP clients it is better to not use 
-# tcp_accept_aliases but just use nathelper module and 
-# fix_nated_[contact|register] functions. 
+# Note: For NAT traversal of TCP clients it is better to not use
+# tcp_accept_aliases but just use nathelper module and
+# fix_nated_[contact|register] functions.
 tcp_accept_aliases=no
 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
@@ -136,7 +136,7 @@ auto_aliases=no
 udp_mtu = 1300
 udp_mtu = 1300
 udp_mtu_try_proto = TCP
 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) */
 
 
 system.shutdownmode = 0 desc "System shutdown mode"
 system.shutdownmode = 0 desc "System shutdown mode"
@@ -172,7 +172,7 @@ loadmodule "path"
 loadmodule "statistics"
 loadmodule "statistics"
 
 
 loadmodule "ims_dialog"
 loadmodule "ims_dialog"
-loadmodule "ims_usrloc_pcscf" 
+loadmodule "ims_usrloc_pcscf"
 # Following module is required even in case of IPSec being disabled.
 # Following module is required even in case of IPSec being disabled.
 loadmodule "ims_ipsec_pcscf"
 loadmodule "ims_ipsec_pcscf"
 loadmodule "ims_registrar_pcscf"
 loadmodule "ims_registrar_pcscf"
@@ -545,7 +545,7 @@ route {
 		if (is_method("INVITE")) {
 		if (is_method("INVITE")) {
 			if (is_present_hf("C-Params")) {
 			if (is_present_hf("C-Params")) {
 				remove_hf("Contact");
 				remove_hf("Contact");
-				remove_hf("C-Params");	
+				remove_hf("C-Params");
 				append_hf("Contact: $ct;$hdr(C-Params)\r\n");
 				append_hf("Contact: $ct;$hdr(C-Params)\r\n");
 			}
 			}
 			if ($route_uri =~ "sip:mo@.*") {
 			if ($route_uri =~ "sip:mo@.*") {
@@ -580,7 +580,7 @@ route {
 				# Handle NAT
 				# Handle NAT
 				route(NATMANAGE);
 				route(NATMANAGE);
 				# Handle Mobile Terminated requests
 				# Handle Mobile Terminated requests
-				route(MT);	
+				route(MT);
 			}
 			}
 		}
 		}
 		if (is_method("REGISTER")) {
 		if (is_method("REGISTER")) {
@@ -596,7 +596,7 @@ route {
 				if (!strempty($(ct{tobody.params}))) {
 				if (!strempty($(ct{tobody.params}))) {
 					append_hf("C-Params: $(ct{tobody.params})\r\n");
 					append_hf("C-Params: $(ct{tobody.params})\r\n");
 				}
 				}
-				
+
 				append_hf("SBC: mt\r\n");
 				append_hf("SBC: mt\r\n");
 				# Do some Round-Robin on the SBC's
 				# Do some Round-Robin on the SBC's
 				t_on_failure("SBC_failure");
 				t_on_failure("SBC_failure");
@@ -626,7 +626,7 @@ route {
 			route(NATMANAGE);
 			route(NATMANAGE);
 			# prepend mo as user for record route
 			# prepend mo as user for record route
 			$avp(RR_CUSTOM_USER_AVP)="mt";
 			$avp(RR_CUSTOM_USER_AVP)="mt";
-			route(MT);	
+			route(MT);
 #!endif
 #!endif
 		} else {
 		} else {
 			force_rport();
 			force_rport();
@@ -639,14 +639,14 @@ route {
 				route(REGISTER);
 				route(REGISTER);
 				exit;
 				exit;
 			}
 			}
-		
+
 			# prepend mo as user for record route
 			# prepend mo as user for record route
 			$avp(RR_CUSTOM_USER_AVP)="mo";
 			$avp(RR_CUSTOM_USER_AVP)="mo";
 			# Set Flag for MO:
 			# Set Flag for MO:
 			setflag(FLT_MOBILE_ORIG);
 			setflag(FLT_MOBILE_ORIG);
 			# Increase timer for inbound requests, we may have to do failover:
 			# Increase timer for inbound requests, we may have to do failover:
 			t_set_fr(120000, 30000);
 			t_set_fr(120000, 30000);
-			route(MO);	
+			route(MO);
 			if (is_method("INVITE")) {
 			if (is_method("INVITE")) {
 				# SRTP in RTP übersetzen
 				# SRTP in RTP übersetzen
 				if ($pr == "tls") {
 				if ($pr == "tls") {
@@ -721,7 +721,7 @@ route[REQINIT] {
 
 
 	# Trace this message
 	# Trace this message
 #!ifdef CAPTURE_NODE
 #!ifdef CAPTURE_NODE
-	sip_trace();	
+	sip_trace();
 	setflag(FLT_CAPTURE);
 	setflag(FLT_CAPTURE);
 #!endif
 #!endif
 
 
@@ -776,7 +776,7 @@ route[REQINIT] {
 
 
 	if (is_method("INVITE|REGISTER")) {
 	if (is_method("INVITE|REGISTER")) {
 		send_reply("100", "Trying");
 		send_reply("100", "Trying");
-	}	
+	}
 }
 }
 
 
 route[RELAY] {
 route[RELAY] {
@@ -860,7 +860,7 @@ failure_route[SBC_failure] {
 	# - receive a 5xx or 6xx reply from the proxy.
 	# - receive a 5xx or 6xx reply from the proxy.
 	if (t_branch_timeout() || t_check_status("[5-6]..")) {
 	if (t_branch_timeout() || t_check_status("[5-6]..")) {
 		if (ds_next_dst()) {
 		if (ds_next_dst()) {
-			# Do Failover in case problems:		
+			# Do Failover in case problems:
 			t_on_failure("SBC_failure");
 			t_on_failure("SBC_failure");
 			t_relay();
 			t_relay();
 		} else {
 		} else {
@@ -877,7 +877,7 @@ failure_route[SBC_failure] {
 route[NOTIFY]
 route[NOTIFY]
 {
 {
 	xlog("L_DBG", "IMS: INSIDE NOTIFY\n");
 	xlog("L_DBG", "IMS: INSIDE NOTIFY\n");
-	if (reginfo_handle_notify("location")) {
+	if (reginfo_handle_notify("pcscf_location")) {
 		send_reply("200", "OK - P-CSCF processed notification");
 		send_reply("200", "OK - P-CSCF processed notification");
 		break;
 		break;
 	} else {
 	} else {
@@ -901,9 +901,9 @@ route[NATPING] {
 		$uac_req(furi) = PCSCF_URL;
 		$uac_req(furi) = PCSCF_URL;
 		$uac_req(sock) = $sht(natpingfrom=>$shtitkey(nat_iterator));
 		$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");
 	sht_unlock("natping=>natpinglock");
@@ -931,9 +931,9 @@ event_route[uac:reply] {
 			xlog("  Unregistering $uac_req(ruri);$var(alias)\n");
 			xlog("  Unregistering $uac_req(ruri);$var(alias)\n");
 			setdebug("9");
 			setdebug("9");
 #!ifdef WITH_IPSEC
 #!ifdef WITH_IPSEC
-			ipsec_destroy_by_contact("location", "$uac_req(ruri);$var(alias)", "$(uac_req(ouri){uri.host})", "$(uac_req(ouri){uri.port})");
+			ipsec_destroy_by_contact("pcscf_location", "$uac_req(ruri);$var(alias)", "$(uac_req(ouri){uri.host})", "$(uac_req(ouri){uri.port})");
 #!endif
 #!endif
-			pcscf_unregister("location", "$uac_req(ruri);$var(alias)", "$(uac_req(ouri){uri.host})", "$(uac_req(ouri){uri.port})");
+			pcscf_unregister("pcscf_location", "$uac_req(ruri);$var(alias)", "$(uac_req(ouri){uri.host})", "$(uac_req(ouri){uri.port})");
 			resetdebug();
 			resetdebug();
 			sht_lock("natping=>natpinglock");
 			sht_lock("natping=>natpinglock");
 			$sht(natping=>$uac_req(ouri)) = $null;
 			$sht(natping=>$uac_req(ouri)) = $null;
@@ -962,7 +962,7 @@ route[preload_pcscf] {
 	if ($shv(preload_pcscf) == 1) return;
 	if ($shv(preload_pcscf) == 1) return;
 	$shv(preload_pcscf) = 1;
 	$shv(preload_pcscf) = 1;
 
 
-	sql_query("pcscf", "select aor, received, received_port, received_proto from location;", "resultset");
+	sql_query("pcscf", "select aor, received, received_port, received_proto from pcscf_location;", "resultset");
 	xlog("Preloading NAT-PING. Rows: $dbr(resultset=>rows)\n");
 	xlog("Preloading NAT-PING. Rows: $dbr(resultset=>rows)\n");
 	if($dbr(resultset=>rows)>0) {
 	if($dbr(resultset=>rows)>0) {
 		$var(i) = 0;
 		$var(i) = 0;