Browse Source

misc/examples: use core reply_route inside the anycast example

Daniel-Constantin Mierla 6 years ago
parent
commit
71a88b1d30
1 changed files with 10 additions and 8 deletions
  1. 10 8
      misc/examples/mixed/kamailio-minimal-anycast.cfg

+ 10 - 8
misc/examples/mixed/kamailio-minimal-anycast.cfg

@@ -300,17 +300,24 @@ route[WITHINDLG] {
 	exit;
 }
 
-# Manage outgoing branches
+# TM manage for outgoing branches
 branch_route[MANAGE_BRANCH] {
 	xdbg("new branch [$T_branch_idx] to $ru\n");
 }
 
-# Manage incoming replies
+# TM manage for incoming replies
 onreply_route[MANAGE_REPLY] {
 	xdbg("incoming reply\n");
+}
 
-	if($si != IPADDR_MAINSRV) {
+# TM manage for failure routing cases
+failure_route[MANAGE_FAILURE] {
+	if (t_is_canceled()) exit;
+}
 
+# Core handling for incoming replies
+reply_route {
+	if($si != IPADDR_MAINSRV) {
 		if($si == IPADDR_PAIRNODE) {
 			# receiving a transparent proxied request from pair server
 			if(is_present_hf("X-Src-Addr")) {
@@ -338,8 +345,3 @@ onreply_route[MANAGE_REPLY] {
 	}
 	# from now on, the usual sip response processing
 }
-
-# Manage failure routing cases
-failure_route[MANAGE_FAILURE] {
-	if (t_is_canceled()) exit;
-}