Pārlūkot izejas kodu

kamailio.cfg: handle UPDATE through nat traversal logic

- BYE is handled via branch route as well
- set tm routes only if they are not set, allowing better plug and play
  config snippets
Daniel-Constantin Mierla 13 gadi atpakaļ
vecāks
revīzija
c76035255e
1 mainītis faili ar 6 papildinājumiem un 4 dzēšanām
  1. 6 4
      etc/kamailio.cfg

+ 6 - 4
etc/kamailio.cfg

@@ -520,12 +520,14 @@ route[RELAY] {
 
 
 	# enable additional event routes for forwarded requests
 	# enable additional event routes for forwarded requests
 	# - serial forking, RTP relaying handling, a.s.o.
 	# - serial forking, RTP relaying handling, a.s.o.
-	if (is_method("INVITE|SUBSCRIBE")) {
-		t_on_branch("MANAGE_BRANCH");
-		t_on_reply("MANAGE_REPLY");
+	if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {
+		if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH");
+	}
+	if (is_method("INVITE|SUBSCRIBE|UPDATE")) {
+		if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");
 	}
 	}
 	if (is_method("INVITE")) {
 	if (is_method("INVITE")) {
-		t_on_failure("MANAGE_FAILURE");
+		if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");
 	}
 	}
 
 
 	if (!t_relay()) {
 	if (!t_relay()) {