Browse Source

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 years ago
parent
commit
c76035255e
1 changed files with 6 additions and 4 deletions
  1. 6 4
      etc/kamailio.cfg

+ 6 - 4
etc/kamailio.cfg

@@ -520,12 +520,14 @@ route[RELAY] {
 
 	# enable additional event routes for forwarded requests
 	# - 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")) {
-		t_on_failure("MANAGE_FAILURE");
+		if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");
 	}
 
 	if (!t_relay()) {