From 6184b96c94d0fcc298dbe5bce1cd0ca9fb0445d3 Mon Sep 17 00:00:00 2001 From: Bogdan-Andrei Iancu Date: Thu, 19 May 2016 15:30:03 +0300 Subject: [PATCH] Fixed preserving 3xx Contacts in TH without dialog Reported by Pete Kelly. Closes #656. --- modules/topology_hiding/topo_hiding_logic.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/topology_hiding/topo_hiding_logic.c b/modules/topology_hiding/topo_hiding_logic.c index c616e9567c4..64e3c73081a 100644 --- a/modules/topology_hiding/topo_hiding_logic.c +++ b/modules/topology_hiding/topo_hiding_logic.c @@ -790,9 +790,11 @@ static void _th_no_dlg_onreply(struct cell* t, int type, struct tmcb_params *par return; } - if (topo_no_dlg_encode_contact(rpl,flags) < 0) { - LM_ERR("Failed to encode contact header \n"); - return; + if ( !(rpl->REPLY_STATUS>=300 && rpl->REPLY_STATUS<400) ) { + if (topo_no_dlg_encode_contact(rpl,flags) < 0) { + LM_ERR("Failed to encode contact header \n"); + return; + } } if (!(lmp = restore_vias_from_req(req,rpl))) {