Browse code

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 authored on 16/10/2012 19:59:28
Showing 1 changed files
... ...
@@ -520,12 +520,14 @@ route[RELAY] {
520 520
 
521 521
 	# enable additional event routes for forwarded requests
522 522
 	# - serial forking, RTP relaying handling, a.s.o.
523
-	if (is_method("INVITE|SUBSCRIBE")) {
524
-		t_on_branch("MANAGE_BRANCH");
525
-		t_on_reply("MANAGE_REPLY");
523
+	if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {
524
+		if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH");
525
+	}
526
+	if (is_method("INVITE|SUBSCRIBE|UPDATE")) {
527
+		if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");
526 528
 	}
527 529
 	if (is_method("INVITE")) {
528
-		t_on_failure("MANAGE_FAILURE");
530
+		if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");
529 531
 	}
530 532
 
531 533
 	if (!t_relay()) {