Diff of /branches/1.8/test/7.cfg [r10375] .. [r10376] Maximize Restore

  Switch to side-by-side view

--- a/branches/1.8/test/7.cfg
+++ b/branches/1.8/test/7.cfg
@@ -162,7 +162,7 @@
 modparam("tm", "unix_tx_timeout", 2)
 modparam("tm", "restart_fr_on_each_reply", 1)
 modparam("tm", "pass_provisional_replies", 0)
-modparam("tm", "fr_inv_timer_avp", "$avp(s:callee_fr_inv_timer)")
+modparam("tm", "fr_inv_timer_avp", "$avp(callee_fr_inv_timer)")
 
 loadmodule "xlog/xlog.so"
 modparam("xlog", "buf_size", 4096)
@@ -187,7 +187,7 @@
 modparam("nathelper", "rtpproxy_tout", 1)
 modparam("nathelper", "rtpproxy_retr", 5)
 modparam("nathelper", "sipping_method", "OPTIONS")
-modparam("nathelper", "received_avp", "$avp(i:801)")
+modparam("nathelper", "received_avp", "$avp(received)")
 
 loadmodule "textops/textops.so"
 
@@ -209,7 +209,7 @@
 modparam("registrar", "method_filtering", 0)
 modparam("registrar", "path_mode", 2)
 modparam("registrar", "path_use_received", 0)
-modparam("registrar", "received_avp", "$avp(i:801)")
+modparam("registrar", "received_avp", "$avp(received)")
 
 loadmodule "sl/sl.so"
 modparam("sl", "enable_stats", 1)
@@ -221,7 +221,7 @@
 loadmodule "auth/auth.so"
 modparam("auth", "nonce_expire", 300)
 modparam("auth", "rpid_suffix", ";party=calling;id-type=subscriber;screen=yes")
-modparam("auth", "rpid_avp", "$avp(s:rpid)")
+modparam("auth", "rpid_avp", "$avp(rpid)")
 
 loadmodule "auth_db/auth_db.so"
 modparam("auth_db", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
@@ -231,7 +231,7 @@
 modparam("auth_db", "password_column_2", "ha1b")
 modparam("auth_db", "calculate_ha1", 1)
 modparam("auth_db", "use_domain", 0)
-modparam("auth_db", "load_credentials", "$avp(s:caller_uuid)=uuid")
+modparam("auth_db", "load_credentials", "$avp(caller_uuid)=uuid")
 
 loadmodule "uri_db/uri_db.so"
 modparam("uri_db", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
@@ -266,7 +266,7 @@
 modparam("permissions", "proto_col", "proto")
 modparam("permissions", "from_col", "from_pattern")
 modparam("permissions", "tag_col", "tag")
-modparam("permissions", "peer_tag_avp", "$avp(s:peer_uuid)")
+modparam("permissions", "peer_tag_avp", "$avp(peer_uuid)")
 
 loadmodule "lcr/lcr.so"
 modparam("lcr", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
@@ -282,14 +282,14 @@
 modparam("lcr", "prefix_column", "prefix")
 modparam("lcr", "from_uri_column", "from_uri")
 modparam("lcr", "priority_column", "priority")
-modparam("lcr", "gw_uri_avp", "$avp(i:1400)")
-modparam("lcr", "ruri_user_avp", "$avp(i:1402)")
-modparam("lcr", "contact_avp", "$avp(i:1401)")
-modparam("lcr", "fr_inv_timer_avp", "$avp(s:fr_inv_timer_avp)")
+modparam("lcr", "gw_uri_avp", "$avp(gw_uri)")
+modparam("lcr", "ruri_user_avp", "$avp(ruri_user)")
+modparam("lcr", "contact_avp", "$avp(contact)")
+modparam("lcr", "fr_inv_timer_avp", "$avp(fr_inv_timer_avp)")
 modparam("lcr", "fr_inv_timer", 90)
 modparam("lcr", "fr_inv_timer_next", 30)
-modparam("lcr", "rpid_avp", "$avp(s:rpid)")
-modparam("lcr", "flags_avp", "$avp(i:712)")
+modparam("lcr", "rpid_avp", "$avp(rpid)")
+modparam("lcr", "flags_avp", "$avp(flags)")
 
 loadmodule "uac_redirect/uac_redirect.so"
 modparam("uac_redirect", "default_filter", "accept")
@@ -329,7 +329,7 @@
 modparam("acc", "detect_direction", 1)
 modparam("acc", "acc_sip_code_column", "sip_code")
 modparam("acc", "acc_sip_reason_column", "sip_reason")
-modparam("acc", "multi_leg_info", "src_leg=$avp(i:901);dst_leg=$avp(i:902)")
+modparam("acc", "multi_leg_info", "src_leg=$avp(src_leg);dst_leg=$avp(dst_leg)")
 
 ########################################################################
 # Request route 'main'
@@ -415,8 +415,8 @@
 route[1]
 {
 	xlog("L_INFO", "Clear caller preferences - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
-	avp_delete("$avp(s:caller_cli)/g");
-	avp_delete("$avp(s:clir)/g");
+	avp_delete("$avp(caller_cli)/g");
+	avp_delete("$avp(clir)/g");
 	
 }
 
@@ -426,9 +426,9 @@
 route[2]
 {
 	xlog("L_INFO", "Clear callee preferences - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
-	avp_delete("$avp(s:callee_fr_inv_timer)/g");
-	avp_delete("$avp(s:cfu)/g");
-	avp_delete("$avp(s:cfc)/g");
+	avp_delete("$avp(callee_fr_inv_timer)/g");
+	avp_delete("$avp(cfu)/g");
+	avp_delete("$avp(cfc)/g");
 	
 }
 
@@ -438,11 +438,11 @@
 route[3]
 {
 	route(1);
-	xlog("L_INFO", "Load caller preferences for uuid '$avp(s:caller_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
+	xlog("L_INFO", "Load caller preferences for uuid '$avp(caller_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
 	# load caller avps
-	avp_db_load("$avp(s:caller_uuid)", "*");
-	avp_copy("$avp(s:cli)", "$avp(s:caller_cli)/d");
-	if(is_avp_set("$avp(s:clir)/n") && avp_check("$avp(s:clir)", "eq/i:1"))
+	avp_db_load("$avp(caller_uuid)", "*");
+	avp_copy("$avp(cli)", "$avp(caller_cli)/d");
+	if(is_avp_set("$avp(clir)/n") && avp_check("$avp(clir)", "eq/i:1"))
 	{
 		# mark for anonymization
 		setflag(28);
@@ -455,27 +455,27 @@
 ########################################################################
 route[4]
 {
-	xlog("L_INFO", "Load callee preferences for uuid '$avp(s:callee_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
+	xlog("L_INFO", "Load callee preferences for uuid '$avp(callee_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
 	# load callee avps
-	avp_db_load("$avp(s:callee_uuid)", "*");
-	if(is_avp_set("$avp(s:cfu)/s"))
-	{
-		
-		xlog("L_INFO", "Call-forward-unconditional to '$avp(s:cfu)' found - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
+	avp_db_load("$avp(callee_uuid)", "*");
+	if(is_avp_set("$avp(cfu)/s"))
+	{
+		
+		xlog("L_INFO", "Call-forward-unconditional to '$avp(cfu)' found - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
 		route(8);
-		avp_delete("$avp(s:caller_uuid)/g");
-		avp_copy("$avp(s:callee_uuid)", "$avp(s:caller_uuid)/d");
-		avp_pushto("$ru", "$avp(s:cfu)");
+		avp_delete("$avp(caller_uuid)/g");
+		avp_copy("$avp(callee_uuid)", "$avp(caller_uuid)/d");
+		avp_pushto("$ru", "$avp(cfu)");
 		
 		route(3);
 		route(14);
 		exit;
 	}
-	if(is_avp_set("$avp(s:ringtimeout)/n"))
-	{
-		
-		xlog("L_INFO", "Setting ring timeout to $avp(s:ringtimeout) secs - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
-		avp_copy("$avp(s:ringtimeout)", "$avp(s:callee_fr_inv_timer)/d");
+	if(is_avp_set("$avp(ringtimeout)/n"))
+	{
+		
+		xlog("L_INFO", "Setting ring timeout to $avp(ringtimeout) secs - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
+		avp_copy("$avp(ringtimeout)", "$avp(callee_fr_inv_timer)/d");
 	}
 	
 }
@@ -485,8 +485,8 @@
 ########################################################################
 route[5]
 {
-	xlog("L_INFO", "Setting acc source-leg for uuid '$avp(s:caller_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
-	avp_printf("$avp(i:901)", "$avp(s:caller_uuid)|$avp(s:acc_caller_user)|$avp(s:acc_caller_domain)|$avp(s:acc_state)");
+	xlog("L_INFO", "Setting acc source-leg for uuid '$avp(caller_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
+	avp_printf("$avp(src_leg)", "$avp(caller_uuid)|$avp(acc_caller_user)|$avp(acc_caller_domain)|$avp(acc_state)");
 	
 }
 
@@ -495,8 +495,8 @@
 ########################################################################
 route[6]
 {
-	xlog("L_INFO", "Setting acc destination-leg for uuid '$avp(s:callee_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
-	avp_printf("$avp(i:902)", "$avp(s:callee_uuid)|$avp(s:acc_callee_user)|$avp(s:acc_callee_domain)");
+	xlog("L_INFO", "Setting acc destination-leg for uuid '$avp(callee_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
+	avp_printf("$avp(dst_leg)", "$avp(callee_uuid)|$avp(acc_callee_user)|$avp(acc_callee_domain)");
 	
 }
 
@@ -505,7 +505,7 @@
 ########################################################################
 route[7]
 {
-	xlog("L_INFO", "Accounting failed request for uuid '$avp(s:caller_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
+	xlog("L_INFO", "Accounting failed request for uuid '$avp(caller_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
 	route(5);
 	route(6);
 	resetflag(24);
@@ -518,17 +518,17 @@
 ########################################################################
 route[8]
 {
-	$avp(s:acc_callee_user) = $rU;
-	$avp(s:acc_callee_domain) = $rd;
+	$avp(acc_callee_user) = $rU;
+	$avp(acc_callee_domain) = $rd;
 	
 	route(5);
 	route(6);
-	avp_delete("$avp(s:acc_caller_user)");
-	avp_delete("$avp(s:acc_caller_domain)");
-	avp_copy("$avp(s:acc_callee_user)", "$avp(s:acc_caller_user)");
-	avp_copy("$avp(s:acc_callee_domain)", "$avp(s:acc_caller_domain)");
-	avp_delete("$avp(s:acc_state)/g");
-	$avp(s:acc_state) = "cfu";
+	avp_delete("$avp(acc_caller_user)");
+	avp_delete("$avp(acc_caller_domain)");
+	avp_copy("$avp(acc_callee_user)", "$avp(acc_caller_user)");
+	avp_copy("$avp(acc_callee_domain)", "$avp(acc_caller_domain)");
+	avp_delete("$avp(acc_state)/g");
+	$avp(acc_state) = "cfu";
 	
 }
 
@@ -616,13 +616,13 @@
 	{
 		remove_hf("Remote-Party-ID");
 	}
-	if(is_avp_set("$avp(s:caller_cli)/s"))
+	if(is_avp_set("$avp(caller_cli)/s"))
 	{
 		if(!isflagset(28))
 		{
 			
-			xlog("L_INFO", "Set caller CLI '$avp(s:caller_cli)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
-			append_hf("P-Asserted-Identity: <$avp(s:caller_cli)>\r\n");
+			xlog("L_INFO", "Set caller CLI '$avp(caller_cli)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
+			append_hf("P-Asserted-Identity: <$avp(caller_cli)>\r\n");
 		}
 	}
 	
@@ -648,8 +648,8 @@
 		t_on_failure("2");
 		if(!isflagset(26))
 		{
-			$avp(s:acc_callee_user) = $rU;
-			$avp(s:acc_callee_domain) = $rd;
+			$avp(acc_callee_user) = $rU;
+			$avp(acc_callee_domain) = $rd;
 			
 			route(5);
 			route(6);
@@ -682,7 +682,7 @@
 	sl_send_reply("100", "Trying");
 	if(from_gw())
 	{
-		$avp(s:caller_uuid) = "0";
+		$avp(caller_uuid) = "0";
 		
 		xlog("L_INFO", "Call from PSTN' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
 		setflag(23);
@@ -691,18 +691,18 @@
 	{
 		if(allow_trusted())
 		{
-			if(is_avp_set("$avp(s:peer_uuid)/s"))
+			if(is_avp_set("$avp(peer_uuid)/s"))
 			{
 				# use tag-column from trusted-table as uuid for this caller
-				avp_copy("$avp(s:peer_uuid)", "$avp(s:caller_uuid)/d");
+				avp_copy("$avp(peer_uuid)", "$avp(caller_uuid)/d");
 			}
 			else
 			{
 				# if no uuid is set, use "0" as default uuid
-				$avp(s:caller_uuid) = "0";
+				$avp(caller_uuid) = "0";
 			}
 			
-			xlog("L_INFO", "Call from trusted peer with uuid '$avp(s:caller_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
+			xlog("L_INFO", "Call from trusted peer with uuid '$avp(caller_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
 			if(!is_domain_local("$rd"))
 			{
 				
@@ -730,9 +730,9 @@
 			}
 		}
 	}
-	$avp(s:acc_caller_user) = $fU;
-	$avp(s:acc_caller_domain) = $fd;
-	$avp(s:acc_state) = "call";
+	$avp(acc_caller_user) = $fU;
+	$avp(acc_caller_domain) = $fd;
+	$avp(acc_state) = "call";
 	
 	route(3);
 	if(nat_uac_test("19")) 
@@ -759,21 +759,21 @@
 	if(!is_domain_local("$rd"))
 	{
 		setflag(20);
-		$avp(s:callee_uuid) = "0";
+		$avp(callee_uuid) = "0";
 		
 		route(16);
 	}
-	avp_delete("$avp(s:callee_uuid)");
-	avp_db_query("select uuid from subscriber where username = '$rU'", "$avp(s:callee_uuid)");
-	if(is_avp_set("$avp(s:callee_uuid)/s"))
-	{
-		
-		xlog("L_INFO", "Callee is local, uuid='$avp(s:callee_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
+	avp_delete("$avp(callee_uuid)");
+	avp_db_query("select uuid from subscriber where username = '$rU'", "$avp(callee_uuid)");
+	if(is_avp_set("$avp(callee_uuid)/s"))
+	{
+		
+		xlog("L_INFO", "Callee is local, uuid='$avp(callee_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
 		route(15);
 	}
 	else
 	{
-		$avp(s:callee_uuid) = "0";
+		$avp(callee_uuid) = "0";
 		
 		xlog("L_INFO", "Callee is not local - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
 		route(16);
@@ -792,8 +792,8 @@
 	{
 		
 		xlog("L_INFO", "Local user offline - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
-		$avp(s:acc_callee_user) = $rU;
-		$avp(s:acc_callee_domain) = $rd;
+		$avp(acc_callee_user) = $rU;
+		$avp(acc_callee_domain) = $rd;
 		
 		route(7);
 		sl_send_reply("404", "User Offline");
@@ -879,8 +879,8 @@
 	# For international calls, either "00" or + is prefixed, like
 	# +49123456780 or 0049123456789.
 	#
-	avp_delete("$avp(s:orig_callee_user)/g");
-	$avp(s:orig_callee_user) = $rU;
+	avp_delete("$avp(orig_callee_user)/g");
+	$avp(orig_callee_user) = $rU;
 	if(uri =~ "^sip:(\+[1-9])?[0-9]+@")
 	{
 		# looks like a PSTN number
@@ -900,18 +900,18 @@
 		{
 			# unknown format, maybe NDC wasn't added before?
 			
-			xlog("L_INFO", "Not normalized callee '$avp(s:orig_callee_user)' to E.164 format - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
+			xlog("L_INFO", "Not normalized callee '$avp(orig_callee_user)' to E.164 format - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
 			return(-1);
 		}
 		# else we have "+" + CC + NDC + SN
 		
-		xlog("L_INFO", "Normalized callee '$avp(s:orig_callee_user)' to E.164 format '$rU' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
+		xlog("L_INFO", "Normalized callee '$avp(orig_callee_user)' to E.164 format '$rU' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
 		return(1);
 	}
 	else
 	{
 		
-		xlog("L_INFO", "Not normalized callee '$avp(s:orig_callee_user)' to E.164 format - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
+		xlog("L_INFO", "Not normalized callee '$avp(orig_callee_user)' to E.164 format - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
 		return(-1);
 	}
 	
@@ -940,7 +940,7 @@
 			
 			xlog("L_INFO", "ENUM query failed - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
 			# ENUM query failed, revert $rU
-			avp_pushto("$ru/username", "$avp(s:orig_callee_user)");
+			avp_pushto("$ru/username", "$avp(orig_callee_user)");
 		}
 	}
 	
@@ -1060,12 +1060,12 @@
 	}
 	if(t_check_status("301|302"))
 	{
-		avp_delete("$avp(s:acc_caller_user)/g");
-		avp_delete("$avp(s:acc_caller_domain)/g");
-		avp_delete("$avp(s:acc_state)/g");
-		avp_copy("$avp(s:acc_callee_user)", "$avp(s:acc_caller_user)");
-		avp_copy("$avp(s:acc_callee_domain)", "$avp(s:acc_caller_domain)");
-		$avp(s:acc_state) = "cfc";
+		avp_delete("$avp(acc_caller_user)/g");
+		avp_delete("$avp(acc_caller_domain)/g");
+		avp_delete("$avp(acc_state)/g");
+		avp_copy("$avp(acc_callee_user)", "$avp(acc_caller_user)");
+		avp_copy("$avp(acc_callee_domain)", "$avp(acc_caller_domain)");
+		$avp(acc_state) = "cfc";
 		setflag(29);
 		if(!get_redirects("1:1"))
 		{
@@ -1078,10 +1078,10 @@
 			exit;
 		}
 		# get last URI from destination-set and set it as R-URI
-		avp_delete("$avp(s:tmp)/g");
-		$avp(s:tmp) = $ds;	
-		avp_subst("$avp(s:tmp)", "/.*(sip:.+@[^:;>]+).*$/\1/");
-		avp_pushto("$ru", "$avp(s:tmp)");
+		avp_delete("$avp(tmp)/g");
+		$avp(tmp) = $ds;	
+		avp_subst("$avp(tmp)", "/.*(sip:.+@[^:;>]+).*$/\1/");
+		avp_pushto("$ru", "$avp(tmp)");
 		setflag(29);
 		
 		t_on_branch("1");
@@ -1089,15 +1089,15 @@
 		route(14);
 		exit;
 	}
-	if($avp(s:cfc) != NULL)
-	{
-		avp_delete("$avp(s:acc_caller_user)/g");
-		avp_delete("$avp(s:acc_caller_domain)/g");
-		avp_delete("$avp(s:acc_state)/g");
-		avp_copy("$avp(s:acc_callee_user)", "$avp(s:acc_caller_user)");
-		avp_copy("$avp(s:acc_callee_domain)", "$avp(s:acc_caller_domain)");
-		$avp(s:acc_state) = "cfc";
-		avp_pushto("$ru", "$avp(s:cfc)");
+	if($avp(cfc) != NULL)
+	{
+		avp_delete("$avp(acc_caller_user)/g");
+		avp_delete("$avp(acc_caller_domain)/g");
+		avp_delete("$avp(acc_state)/g");
+		avp_copy("$avp(acc_callee_user)", "$avp(acc_caller_user)");
+		avp_copy("$avp(acc_callee_domain)", "$avp(acc_caller_domain)");
+		$avp(acc_state) = "cfc";
+		avp_pushto("$ru", "$avp(cfc)");
 		setflag(29);
 		
 		t_on_branch("1");