From abeeb36d77e05df4a4a3fc71af1f0795dc2a7e61 Mon Sep 17 00:00:00 2001 From: Bogdan-Andrei Iancu Date: Mon, 6 Dec 2021 13:46:28 +0200 Subject: [PATCH] [topology-hiding] fix detection of the UAC requests Use a more generix approach (check VIA2 presence) to see if we deal with a locally generated or proxyed requests. Fixes #2690, credits go to @bcnewlin for reporting. --- modules/topology_hiding/topo_hiding_logic.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/topology_hiding/topo_hiding_logic.c b/modules/topology_hiding/topo_hiding_logic.c index d379e943b9e..0665a9c2727 100644 --- a/modules/topology_hiding/topo_hiding_logic.c +++ b/modules/topology_hiding/topo_hiding_logic.c @@ -1036,11 +1036,10 @@ static void topo_dlg_onroute (struct dlg_cell* dlg, int type, return; } - /* we also may end up here via TERMINATE event triggered by internal - * dlg termination -> the requests we have here are dummy, so nothing - * to be done */ - if (is_dummy_sip_msg(req)==0) { - LM_DBG("dummy request identified, skipping...\n"); + /* filter out the case we end up here for local UAC request (one VIA), as + * there is no relaying to follow, so nothing to be done here */ + if (req->via2==NULL) { + LM_DBG("uac/dummy request identified, skipping...\n"); return; }