[sr-dev] git:kamailio_3.0: set branch flags before saving location

Daniel-Constantin Mierla miconda at gmail.com
Fri Oct 30 11:49:34 CET 2009


Module: sip-router
Branch: kamailio_3.0
Commit: 2a67b2533742f7e969d17b027ca7dfea77701415
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2a67b2533742f7e969d17b027ca7dfea77701415

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Fri Oct 30 11:21:45 2009 +0100

set branch flags before saving location

- enclose parameters in double-quotes

---

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

diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index 29436ff..609c9fb 100644
--- a/etc/kamailio.cfg
+++ b/etc/kamailio.cfg
@@ -353,6 +353,11 @@ route{
 
 	if (is_method("REGISTER"))
 	{
+		if(isflagset(5))
+		{
+			setbflag("6");
+			# setbflag("7");
+		}
 		if (!save("location"))
 			sl_reply_error();
 
@@ -390,9 +395,9 @@ route{
 
 route[RELAY] {
 #n#	if (check_route_param("nat=yes")) {
-#n#		setbflag(6);
+#n#		setbflag("6");
 #n#	}
-#n#	if (isflagset(5) || isbflagset(6)) {
+#n#	if (isflagset(5) || isbflagset("6")) {
 #n#		route(RTPPROXY);
 #n#	}
 
@@ -522,10 +527,10 @@ branch_route[BRANCH_ONE] {
 onreply_route[REPLY_ONE] {
 	xdbg("incoming reply\n");
 
-#n#	if ((isflagset(5) || isbflagset(6)) && status=~"(183)|(2[0-9][0-9])") {
+#n#	if ((isflagset(5) || isbflagset("6")) && status=~"(183)|(2[0-9][0-9])") {
 #n#		force_rtp_proxy();
 #n#	}
-#n#	if (isbflagset(6)) {
+#n#	if (isbflagset("6")) {
 #n#		fix_nated_contact();
 #n#	}
 }
@@ -533,7 +538,7 @@ onreply_route[REPLY_ONE] {
 
 failure_route[FAIL_ONE] {
 #n#	if (is_method("INVITE")
-#n#			&& (isbflagset(6) || isflagset(5))) {
+#n#			&& (isbflagset("6") || isflagset(5))) {
 #n#		unforce_rtp_proxy();
 #n#	}
 




More information about the sr-dev mailing list