[sr-dev] git:master: kamailio.cfg: handle UPDATE through nat traversal logic

Daniel-Constantin Mierla miconda at gmail.com
Tue Oct 16 22:01:29 CEST 2012


Module: sip-router
Branch: master
Commit: c76035255e556d8272097281d3e0fd0ab918c608
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c76035255e556d8272097281d3e0fd0ab918c608

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Tue Oct 16 21:59:28 2012 +0200

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

---

 etc/kamailio.cfg |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index ea22299..20db35b 100644
--- a/etc/kamailio.cfg
+++ b/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()) {




More information about the sr-dev mailing list