[sr-dev] git:master:e771c554: rr: docs for loose_route_mode() function

Daniel-Constantin Mierla miconda at gmail.com
Mon Sep 14 18:53:49 CEST 2020


Module: kamailio
Branch: master
Commit: e771c554d8ca8ec691c8f02efdf6f85187f49b0f
URL: https://github.com/kamailio/kamailio/commit/e771c554d8ca8ec691c8f02efdf6f85187f49b0f

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-09-14T13:34:38+02:00

rr: docs for loose_route_mode() function

---

Modified: src/modules/rr/doc/rr_admin.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/e771c554d8ca8ec691c8f02efdf6f85187f49b0f.diff
Patch: https://github.com/kamailio/kamailio/commit/e771c554d8ca8ec691c8f02efdf6f85187f49b0f.patch

---

diff --git a/src/modules/rr/doc/rr_admin.xml b/src/modules/rr/doc/rr_admin.xml
index fb7b4d03ca..514c8b4a04 100644
--- a/src/modules/rr/doc/rr_admin.xml
+++ b/src/modules/rr/doc/rr_admin.xml
@@ -442,6 +442,34 @@ if(!loose_route_preloaded()) {
       </example>
     </section>
 
+	<section id="rr.f.loose_route_mode">
+      <title><function moreinfo="none">loose_route_mode(vmode)</function></title>
+
+	  <para>The function is similar to `loose_route()`, but it does only
+	  loose routing processing if vmode==1, skipping the testing of r-uri==myself
+	  for performing strict routing. If vmode==0, it behaves like loose_route().
+      </para>
+      <para>It is a convenient function to use with application servers that
+      set the Contact URI to SIP server address.
+      </para>
+      <para>This function can be used from REQUEST_ROUTE.</para>
+
+      <example>
+        <title><function>loose_route_mode</function> usage</title>
+
+        <programlisting format="linespecific">
+...
+if(has_totag() and uri==myself) {
+    if(loose_route_mode("1")) {
+        rewritehostport("my.app.server:5090");
+        t_relay();
+        exit;
+    }
+}
+...
+</programlisting>
+      </example>
+    </section>
 
     <section id="rr.f.record_route">
       <title><function moreinfo="none">record_route([sparams])</function></title>




More information about the sr-dev mailing list