From 9457bd97ee07f6eb163d7fc83bdc8e9e3172d9d7 Mon Sep 17 00:00:00 2001 From: lazedo Date: Mon, 3 Feb 2020 00:04:17 +0000 Subject: [PATCH] only add x-headers for INVITE|MESSAGE|REFER * also excludes in-dialog --- kamailio/auth.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kamailio/auth.cfg b/kamailio/auth.cfg index 47c2deb..3f5cdd4 100644 --- a/kamailio/auth.cfg +++ b/kamailio/auth.cfg @@ -22,6 +22,10 @@ route[AUTH_HEADERS] { remove_hf_re("^X-"); + if (!is_method("INVITE|MESSAGE|REFER") || has_totag()) { + return; + } + xavp_params_implode("hf", "$var(outx)"); $var(out) = $(var(outx){re.subst,/^(.*);$$/\1/}); $var(c) = $(var(out){param.count});