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

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Thu Sep 12 19:06:20 2013 +0200

b/f: fixed patch_ruri_next_hop initialization, added call profile option

also fixed sample profiles / doc about next_hop:
next_hop_ip:next_hop_port was replaced by next_hop

thanks to Juha Heinanen for reporting

---

 apps/sbc/SBCCallProfile.cpp                    |    1 +
 apps/sbc/SBCCallProfile.h                      |    4 +++-
 apps/sbc/etc/auth_b2b.sbcprofile.conf          |    3 +--
 apps/sbc/etc/auth_b2b.sbcprofile.conf.cmake    |    3 +--
 apps/sbc/etc/call_timer.sbcprofile.conf        |    3 +--
 apps/sbc/etc/call_timer.sbcprofile.conf.cmake  |    3 +--
 apps/sbc/etc/codecfilter.sbcprofile.conf       |    3 +--
 apps/sbc/etc/codecfilter.sbcprofile.conf.cmake |    3 +--
 apps/sbc/etc/prepaid.sbcprofile.conf           |    3 +--
 apps/sbc/etc/prepaid.sbcprofile.conf.cmake     |    3 +--
 apps/sbc/etc/sst_b2b.sbcprofile.conf           |    3 +--
 apps/sbc/etc/sst_b2b.sbcprofile.conf.cmake     |    3 +--
 apps/sbc/etc/transparent.sbcprofile.conf       |    7 +++----
 apps/sbc/etc/transparent.sbcprofile.conf.cmake |    7 +++----
 doc/Readme.sbc.txt                             |   14 ++++++++------
 15 files changed, 28 insertions(+), 35 deletions(-)

diff --git a/apps/sbc/SBCCallProfile.cpp b/apps/sbc/SBCCallProfile.cpp
index 6110fdd..a315e19 100644
--- a/apps/sbc/SBCCallProfile.cpp
+++ b/apps/sbc/SBCCallProfile.cpp
@@ -163,6 +163,7 @@ bool SBCCallProfile::readFromConfiguration(const string& 
name,
 
   next_hop = cfg.getParameter("next_hop");
   next_hop_1st_req = cfg.getParameter("next_hop_1st_req") == "yes";
+  patch_ruri_next_hop = cfg.getParameter("patch_ruri_next_hop") == "yes";
 
   aleg_next_hop = cfg.getParameter("aleg_next_hop");
 
diff --git a/apps/sbc/SBCCallProfile.h b/apps/sbc/SBCCallProfile.h
index e32d930..8b986dd 100644
--- a/apps/sbc/SBCCallProfile.h
+++ b/apps/sbc/SBCCallProfile.h
@@ -278,7 +278,9 @@ struct SBCCallProfile
     contact_hiding(false), 
     reg_caching(false),
     log_rtp(false),
-    log_sip(false)
+    log_sip(false),
+    patch_ruri_next_hop(false),
+    next_hop_1st_req(false)
   { }
 
   ~SBCCallProfile()
diff --git a/apps/sbc/etc/auth_b2b.sbcprofile.conf 
b/apps/sbc/etc/auth_b2b.sbcprofile.conf
index be6a6c8..848eb9b 100644
--- a/apps/sbc/etc/auth_b2b.sbcprofile.conf
+++ b/apps/sbc/etc/auth_b2b.sbcprofile.conf
@@ -24,8 +24,7 @@ To="\"$rU\" <sip:$rU@$P(d)>"
 # force outbound proxy (in-dialog requests)?
 #force_outbound_proxy=yes
 # destination IP[:port] for outgoing requests
-#next_hop_ip=192.168.5.106
-#next_hop_port=5060
+#next_hop=192.168.5.106
 
 enable_auth=yes
 auth_user=$P(u)
diff --git a/apps/sbc/etc/auth_b2b.sbcprofile.conf.cmake 
b/apps/sbc/etc/auth_b2b.sbcprofile.conf.cmake
index be6a6c8..848eb9b 100644
--- a/apps/sbc/etc/auth_b2b.sbcprofile.conf.cmake
+++ b/apps/sbc/etc/auth_b2b.sbcprofile.conf.cmake
@@ -24,8 +24,7 @@ To="\"$rU\" <sip:$rU@$P(d)>"
 # force outbound proxy (in-dialog requests)?
 #force_outbound_proxy=yes
 # destination IP[:port] for outgoing requests
-#next_hop_ip=192.168.5.106
-#next_hop_port=5060
+#next_hop=192.168.5.106
 
 enable_auth=yes
 auth_user=$P(u)
diff --git a/apps/sbc/etc/call_timer.sbcprofile.conf 
b/apps/sbc/etc/call_timer.sbcprofile.conf
index 72b4a21..bdc4b4c 100644
--- a/apps/sbc/etc/call_timer.sbcprofile.conf
+++ b/apps/sbc/etc/call_timer.sbcprofile.conf
@@ -19,8 +19,7 @@
 # force outbound proxy (in-dialog requests)?
 #force_outbound_proxy=yes
 # destination IP[:port] for outgoing requests
-#next_hop_ip=192.168.5.106
-#next_hop_port=5060
+#next_hop=192.168.5.106
 
 ## filters: 
 #header_filter=blacklist
diff --git a/apps/sbc/etc/call_timer.sbcprofile.conf.cmake 
b/apps/sbc/etc/call_timer.sbcprofile.conf.cmake
index 72b4a21..bdc4b4c 100644
--- a/apps/sbc/etc/call_timer.sbcprofile.conf.cmake
+++ b/apps/sbc/etc/call_timer.sbcprofile.conf.cmake
@@ -19,8 +19,7 @@
 # force outbound proxy (in-dialog requests)?
 #force_outbound_proxy=yes
 # destination IP[:port] for outgoing requests
-#next_hop_ip=192.168.5.106
-#next_hop_port=5060
+#next_hop=192.168.5.106
 
 ## filters: 
 #header_filter=blacklist
diff --git a/apps/sbc/etc/codecfilter.sbcprofile.conf 
b/apps/sbc/etc/codecfilter.sbcprofile.conf
index d480d51..cca1fb5 100644
--- a/apps/sbc/etc/codecfilter.sbcprofile.conf
+++ b/apps/sbc/etc/codecfilter.sbcprofile.conf
@@ -13,8 +13,7 @@
 # force outbound proxy (in-dialog requests)?
 #force_outbound_proxy=yes
 # destination IP[:port] for outgoing requests
-#next_hop_ip=192.168.5.106
-#next_hop_port=5060
+#next_hop=192.168.5.106
 
 ## filters: 
 #header_filter=blacklist
diff --git a/apps/sbc/etc/codecfilter.sbcprofile.conf.cmake 
b/apps/sbc/etc/codecfilter.sbcprofile.conf.cmake
index d480d51..cca1fb5 100644
--- a/apps/sbc/etc/codecfilter.sbcprofile.conf.cmake
+++ b/apps/sbc/etc/codecfilter.sbcprofile.conf.cmake
@@ -13,8 +13,7 @@
 # force outbound proxy (in-dialog requests)?
 #force_outbound_proxy=yes
 # destination IP[:port] for outgoing requests
-#next_hop_ip=192.168.5.106
-#next_hop_port=5060
+#next_hop=192.168.5.106
 
 ## filters: 
 #header_filter=blacklist
diff --git a/apps/sbc/etc/prepaid.sbcprofile.conf 
b/apps/sbc/etc/prepaid.sbcprofile.conf
index 4cef8d4..201915c 100644
--- a/apps/sbc/etc/prepaid.sbcprofile.conf
+++ b/apps/sbc/etc/prepaid.sbcprofile.conf
@@ -16,8 +16,7 @@ To=<$H(P-R-Uri)>
 # force outbound proxy (in-dialog requests)?
 #force_outbound_proxy=yes
 # destination IP[:port] for outgoing requests
-#next_hop_ip=192.168.5.106
-#next_hop_port=5060
+#next_hop=192.168.5.106
 
 ## filters: 
 #header_filter=blacklist
diff --git a/apps/sbc/etc/prepaid.sbcprofile.conf.cmake 
b/apps/sbc/etc/prepaid.sbcprofile.conf.cmake
index 4cef8d4..201915c 100644
--- a/apps/sbc/etc/prepaid.sbcprofile.conf.cmake
+++ b/apps/sbc/etc/prepaid.sbcprofile.conf.cmake
@@ -16,8 +16,7 @@ To=<$H(P-R-Uri)>
 # force outbound proxy (in-dialog requests)?
 #force_outbound_proxy=yes
 # destination IP[:port] for outgoing requests
-#next_hop_ip=192.168.5.106
-#next_hop_port=5060
+#next_hop=192.168.5.106
 
 ## filters: 
 #header_filter=blacklist
diff --git a/apps/sbc/etc/sst_b2b.sbcprofile.conf 
b/apps/sbc/etc/sst_b2b.sbcprofile.conf
index 683bbbe..16522ac 100644
--- a/apps/sbc/etc/sst_b2b.sbcprofile.conf
+++ b/apps/sbc/etc/sst_b2b.sbcprofile.conf
@@ -15,8 +15,7 @@
 # force outbound proxy (in-dialog requests)?
 #force_outbound_proxy=yes
 # destination IP[:port] for outgoing requests
-#next_hop_ip=192.168.5.106
-#next_hop_port=5060
+#next_hop=192.168.5.106
 
 ## filters: 
 #header_filter=blacklist
diff --git a/apps/sbc/etc/sst_b2b.sbcprofile.conf.cmake 
b/apps/sbc/etc/sst_b2b.sbcprofile.conf.cmake
index 683bbbe..16522ac 100644
--- a/apps/sbc/etc/sst_b2b.sbcprofile.conf.cmake
+++ b/apps/sbc/etc/sst_b2b.sbcprofile.conf.cmake
@@ -15,8 +15,7 @@
 # force outbound proxy (in-dialog requests)?
 #force_outbound_proxy=yes
 # destination IP[:port] for outgoing requests
-#next_hop_ip=192.168.5.106
-#next_hop_port=5060
+#next_hop=192.168.5.106
 
 ## filters: 
 #header_filter=blacklist
diff --git a/apps/sbc/etc/transparent.sbcprofile.conf 
b/apps/sbc/etc/transparent.sbcprofile.conf
index f5fd8ec..bdcfeea 100644
--- a/apps/sbc/etc/transparent.sbcprofile.conf
+++ b/apps/sbc/etc/transparent.sbcprofile.conf
@@ -18,10 +18,9 @@
 # force outbound proxy (in-dialog requests)?
 #force_outbound_proxy=yes
 # destination IP[:port] for outgoing requests
-#next_hop_ip=192.168.5.106
-#next_hop_port=5060
-# use next_hop for replies, too?
-#next_hop_for_replies=yes
+#next_hop=192.168.5.106:5060
+# set RURI to (calculated) next_hop
+#patch_ruri_next_hop=yes
 # outbound interface to use (interface ID)
 #outbound_interface=extern
 
diff --git a/apps/sbc/etc/transparent.sbcprofile.conf.cmake 
b/apps/sbc/etc/transparent.sbcprofile.conf.cmake
index f5fd8ec..b768620 100644
--- a/apps/sbc/etc/transparent.sbcprofile.conf.cmake
+++ b/apps/sbc/etc/transparent.sbcprofile.conf.cmake
@@ -18,10 +18,9 @@
 # force outbound proxy (in-dialog requests)?
 #force_outbound_proxy=yes
 # destination IP[:port] for outgoing requests
-#next_hop_ip=192.168.5.106
-#next_hop_port=5060
-# use next_hop for replies, too?
-#next_hop_for_replies=yes
+#next_hop=192.168.5.106:5060
+# set RURI as calculated next_hop
+#patch_ruri_next_hop=yes
 # outbound interface to use (interface ID)
 #outbound_interface=extern
 
diff --git a/doc/Readme.sbc.txt b/doc/Readme.sbc.txt
index dd8ac0b..49a2595 100644
--- a/doc/Readme.sbc.txt
+++ b/doc/Readme.sbc.txt
@@ -178,9 +178,9 @@ The patterns which can be used are the following:
        and
       prepaid_caller_uuid=$H(P-Caller-Uuid)
 
-    o P-NextHop-IP: 10.0.2.15
+    o P-NextHop: 10.0.2.15
        and
-      next_hop_ip=$H(P-NextHop-IP)
+      next_hop=$H(P-NextHop)
 
   $HU(headername) - header <headername> (as URI) User
   $Hd(headername) - header <headername> (as URI) domain (host:port)
@@ -189,8 +189,7 @@ The patterns which can be used are the following:
    Example:
     o P-SomeNH-URI: sip:[email protected]:5092
        and
-      next_hop_ip=$Hh(P-SomeNH-URI)
-      next_hop_port=$Hp(P-SomeNH-URI)
+      next_hop=$Hh(P-SomeNH-URI):
 
 
   $M(value=>regexmap) - map a value (any pattern) to a regexmap (see below)
@@ -269,12 +268,15 @@ also for in-dialog requests. Note that this is NOT 
RFC3261 compliant (section
 2.2 Requests within a Dialog, 12.2.1 UAC Behavior).
 
 The next hop (destination IP[:port] of outgoing requests) can be set with
-the next_hop_ip and next_hop_port options. next_hop_port defaults to 5060
+the next_hop option. next_hop port defaults to 5060
 if not set or empty. Usually, replies are sent back to where the request came
 from (honoring rport), but if next_hop should be used nevertheless,
 next_hop_for_replies profile option can be set to "yes".
 
-These two settings apply only for the UAC side, i.e. the outgoing side of
+patch_ruri_next_hop=yes sets the option to overwrite RURI in the outgoing 
request
+with the selected next hop (whether set through next_hop or determined 
otherwise).
+
+These settings apply only for the UAC side, i.e. the outgoing side of
 the initial INVITE.
 
 Filters

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to