2
0
Эх сурвалжийг харах

etc/kamailio.cfg: set no connect flags for replies and natted messages

Daniel-Constantin Mierla 6 жил өмнө
parent
commit
3036a53fbb

+ 8 - 0
etc/kamailio.cfg

@@ -554,6 +554,9 @@ route[RELAY] {
 
 
 # Per SIP request initial checks
 # Per SIP request initial checks
 route[REQINIT] {
 route[REQINIT] {
+	# no connect for sending replies
+	set_reply_no_connect();
+
 #!ifdef WITH_ANTIFLOOD
 #!ifdef WITH_ANTIFLOOD
 	# flood detection from same IP and traffic ban for a while
 	# flood detection from same IP and traffic ban for a while
 	# be sure you exclude checking trusted peers, such as pstn gateways
 	# be sure you exclude checking trusted peers, such as pstn gateways
@@ -821,6 +824,11 @@ route[NATMANAGE] {
 				set_contact_alias();
 				set_contact_alias();
 		}
 		}
 	}
 	}
+
+	if(isbflagset(FLB_NATB)) {
+		# message in a dialog involving NAT traversal - no connect
+		set_forward_no_connect();
+	}
 #!endif
 #!endif
 	return;
 	return;
 }
 }