Преглед на файлове

misc/examples: use core reply_route inside the anycast example

(cherry picked from commit 71a88b1d30b3bff5d6e8e1785ddeae08b3bfe4f2)
Daniel-Constantin Mierla преди 6 години
родител
ревизия
0041d6840e
променени са 1 файла, в които са добавени 10 реда и са изтрити 8 реда
  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;
-}