From b800ffb9fb1de6ee0d7b6c2b42a25669022c1142 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Tue, 24 Mar 2020 14:50:58 +0100 Subject: [PATCH] sst: docs - more info about how timeout_avp is used --- src/modules/sst/doc/sst_admin.xml | 34 +++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/src/modules/sst/doc/sst_admin.xml b/src/modules/sst/doc/sst_admin.xml index 49f26302871..a82132bd6ef 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)
<varname>timeout_avp</varname> (string) - 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! - - This is how the sst module knows which avp in the - dialog module it has to change with the new expire value. + 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. + With this parameter, the sst module knows which avp is expected + by the dialog module to change to a new expire value. + + 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. + - Default value is NULL! it is not set by default. + Default value is NULL (not set by default). Set <varname>timeout_avp</varname> parameter ... -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}); + } + } + ... +} ...