From deeef6128ca6c02a8d991e5edcd0bab846690a43 Mon Sep 17 00:00:00 2001 From: lazedo Date: Tue, 27 Mar 2018 14:58:19 +0100 Subject: [PATCH] @hf_value_exists not working as expected --- kamailio/registrar-role.cfg | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/kamailio/registrar-role.cfg b/kamailio/registrar-role.cfg index 8dffeb0..1c3daa0 100644 --- a/kamailio/registrar-role.cfg +++ b/kamailio/registrar-role.cfg @@ -254,14 +254,10 @@ route[SAVE_LOCATION] } } - if(@hf_value_exists.contact.expires == "1") { - $var(expires) = @contact.expires; + if($expires(max) != $null) { + $var(expires) = $expires(max); } else { - if(is_present_hf("Expires")) { - $var(expires) = $hdr(Expires); - } else { - $var(expires) = REGISTRAR_MIN_EXPIRES; - } + $var(expires) = REGISTRAR_MIN_EXPIRES; } if($var(expires) == 0) {