Quellcode durchsuchen

set branch flags before saving location

- enclose parameters in double-quotes
Daniel-Constantin Mierla vor 16 Jahren
Ursprung
Commit
2a67b25337
1 geänderte Dateien mit 10 neuen und 5 gelöschten Zeilen
  1. 10 5
      etc/kamailio.cfg

+ 10 - 5
etc/kamailio.cfg

@@ -353,6 +353,11 @@ route{
 
 
 	if (is_method("REGISTER"))
 	if (is_method("REGISTER"))
 	{
 	{
+		if(isflagset(5))
+		{
+			setbflag("6");
+			# setbflag("7");
+		}
 		if (!save("location"))
 		if (!save("location"))
 			sl_reply_error();
 			sl_reply_error();
 
 
@@ -390,9 +395,9 @@ route{
 
 
 route[RELAY] {
 route[RELAY] {
 #n#	if (check_route_param("nat=yes")) {
 #n#	if (check_route_param("nat=yes")) {
-#n#		setbflag(6);
+#n#		setbflag("6");
 #n#	}
 #n#	}
-#n#	if (isflagset(5) || isbflagset(6)) {
+#n#	if (isflagset(5) || isbflagset("6")) {
 #n#		route(RTPPROXY);
 #n#		route(RTPPROXY);
 #n#	}
 #n#	}
 
 
@@ -522,10 +527,10 @@ branch_route[BRANCH_ONE] {
 onreply_route[REPLY_ONE] {
 onreply_route[REPLY_ONE] {
 	xdbg("incoming reply\n");
 	xdbg("incoming reply\n");
 
 
-#n#	if ((isflagset(5) || isbflagset(6)) && status=~"(183)|(2[0-9][0-9])") {
+#n#	if ((isflagset(5) || isbflagset("6")) && status=~"(183)|(2[0-9][0-9])") {
 #n#		force_rtp_proxy();
 #n#		force_rtp_proxy();
 #n#	}
 #n#	}
-#n#	if (isbflagset(6)) {
+#n#	if (isbflagset("6")) {
 #n#		fix_nated_contact();
 #n#		fix_nated_contact();
 #n#	}
 #n#	}
 }
 }
@@ -533,7 +538,7 @@ onreply_route[REPLY_ONE] {
 
 
 failure_route[FAIL_ONE] {
 failure_route[FAIL_ONE] {
 #n#	if (is_method("INVITE")
 #n#	if (is_method("INVITE")
-#n#			&& (isbflagset(6) || isflagset(5))) {
+#n#			&& (isbflagset("6") || isflagset(5))) {
 #n#		unforce_rtp_proxy();
 #n#		unforce_rtp_proxy();
 #n#	}
 #n#	}