From 33f02ee923b63cb765b65ee812f55e7080c9c567 Mon Sep 17 00:00:00 2001 From: Samnang Chhun Date: Mon, 14 Aug 2023 14:01:30 +0700 Subject: [PATCH] WIP --- components/app/app/models/routing_parameters.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/app/app/models/routing_parameters.rb b/components/app/app/models/routing_parameters.rb index fc612d4c1..1f8db37df 100644 --- a/components/app/app/models/routing_parameters.rb +++ b/components/app/app/models/routing_parameters.rb @@ -17,6 +17,7 @@ def address result = national_dialing ? Phony.format(destination, format: :national, spaces: "") : destination result.gsub!(/\D/, "") result = username.present? ? client_gateway_address(result) : public_gateway_address(result) + result.prepend(dial_string_prefix) if dial_string_prefix.present? result.prepend("+") if plus_prefix result end @@ -25,12 +26,12 @@ def address def client_gateway_address(destination) services_client.build_client_gateway_dial_string( - destination: destination, - username: username + destination:, + username:, ) end def public_gateway_address(destination) - "#{dial_string_prefix}#{destination}@#{host}" + "#{destination}@#{host}" end end