[sr-dev] git:master:b800ffb9: sst: docs - more info about how timeout_avp is used

Daniel-Constantin Mierla miconda at gmail.com
Tue Mar 24 14:51:48 CET 2020


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-03-24T14:50:58+01:00

sst: docs - more info about how timeout_avp is used

---

Modified: src/modules/sst/doc/sst_admin.xml

---

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

---

diff --git a/src/modules/sst/doc/sst_admin.xml b/src/modules/sst/doc/sst_admin.xml
index 49f2630287..a82132bd6e 100644
--- a/src/modules/sst/doc/sst_admin.xml
+++ b/src/modules/sst/doc/sst_admin.xml
@@ -207,25 +207,41 @@ modparam("sst", "min_se", 2400)
 	<section id="sst.p.timeout_avp">
 		<title><varname>timeout_avp</varname> (string)</title>
 
-		<para>This parameter MUST be set to the same value as the
-		dialog module parameter of the same name. If this parameter is
-		NOT set, the sst module will not do anything!</para>
-
-		<para>This is how the sst module knows which avp in the
-		dialog module it has to change with the new expire value.</para>
+		<para>This parameter must be set to the same value as the
+		dialog module parameter of the same name, when it is wanted to update
+		dialog timeout using Session-Expires header value. If this parameter is
+		not set, the sst module will not update dialog timeout.</para>
 
+		<para>With this parameter, the sst module knows which avp is expected
+		by the dialog module to change to a new expire value.</para>
+		<para>
 		<para>
+		Note that the avp is set only for requests within dialog, not for
+		the initial INVITE. For this one, it can be done using script operations,
+		see the next example for such solution.
+		</para>
 		<emphasis>
-			Default value is <quote>NULL!</quote> it is not set by default.
+			Default value is <quote>NULL</quote> (not set by default).
 		</emphasis>
 		</para>
 		<example>
 		<title>Set <varname>timeout_avp</varname> parameter</title>
 		<programlisting format="linespecific">
 ...
-modparam("dialog", "timeout_avp", "$avp(i:10)")
+modparam("dialog", "timeout_avp", "$avp(dlgtimeout)")
 # Set the sst modules timeout_avp to be the same value
-modparam("sst", "timeout_avp", "$avp(i:10)")
+modparam("sst", "timeout_avp", "$avp(dlgtimeout)")
+...
+request_route {
+    ...
+    # when wanting to use Session-Expires value for initial INVITE
+    if(is_method("INVITE") and !has_totag()) {
+        if(is_present_hf("Session-Expires")) {
+            $avp(dlgtimeout) = $(hdr(Session-Expires){s.int});
+        }
+    }
+    ...
+}
 ...
 </programlisting>
 		</example>




More information about the sr-dev mailing list