From c95b2189caa7c3d87ed6ab54ec98f81147e1b5fa Mon Sep 17 00:00:00 2001 From: Flaviu Mates Date: Thu, 8 Apr 2021 13:17:37 +0300 Subject: [PATCH] TT#116900 Use multidomain when deleting a registration * deleting a registration would fail when the domain of the registrations would not exist due to the fact that multidomain is not enabled Change-Id: If512c0c9ce6c8f7a72deaa5b6a8ebe6737404f2a (cherry picked from commit a9817e52d8d59a9185678e8b2ea2960c46837d1f) --- lib/NGCP/Panel/Controller/Subscriber.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Controller/Subscriber.pm b/lib/NGCP/Panel/Controller/Subscriber.pm index ec46969de0..af5a93dae8 100644 --- a/lib/NGCP/Panel/Controller/Subscriber.pm +++ b/lib/NGCP/Panel/Controller/Subscriber.pm @@ -4353,7 +4353,7 @@ sub delete_registered :Chained('registered') :PathPart('delete') :Args(0) { try { my $reg = $c->stash->{registered} // die "No registration data"; - my $aor = $reg->username . '@' . $reg->domain; + my $aor = $reg->username . ($c->config->{features}->{multidomain} ? '@' . $reg->domain : ''); NGCP::Panel::Utils::Kamailio::delete_location_contact($c, $aor, $reg->contact); } catch($e) { NGCP::Panel::Utils::Message::error(