From a22231a3e7a4d54572431017be8bd641e34a57ac Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Fri, 3 Mar 2017 20:24:29 +0100 Subject: [PATCH] TT#10151 Don't add trailing slash in 3pcc api url Change-Id: Ib2d02df5a26e2292d7b68b262bd3f2c1a50cae5b --- lib/NGCP/Panel/Utils/PartyCallControl.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Utils/PartyCallControl.pm b/lib/NGCP/Panel/Utils/PartyCallControl.pm index 969cc8747f..464b9c0ab6 100644 --- a/lib/NGCP/Panel/Utils/PartyCallControl.pm +++ b/lib/NGCP/Panel/Utils/PartyCallControl.pm @@ -30,7 +30,12 @@ sub dispatch { # apply known placeholders to the url foreach my $v (qw(caller callee callid token prefix suffix)) { my $t = $url_ph_map{$v} // ""; - $t .= $t ? "/" : ""; + + # only add trailing slash if not last param (suffix here) + unless($v eq "suffix") { + $t .= $t ? "/" : ""; + } + $url =~ s/(\$\{$v\})/$t/g; }