From 63fec8098a8c7455e5908af01d1861b843846f6f 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 e85e657..780fda7 100644 --- a/kamailio/auth.cfg +++ b/kamailio/auth.cfg @@ -17,6 +17,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});