From 016d8c4b04f63bc792ab772f841682cb8ebead95 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 18 Apr 2022 14:34:38 -0500 Subject: [PATCH] v1 is dead and everyone has been moved --- lib/bwmsgsv2_repo.rb | 12 +----------- lib/customer_fwd.rb | 16 ---------------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/lib/bwmsgsv2_repo.rb b/lib/bwmsgsv2_repo.rb index 429ea6f..e59c80a 100644 --- a/lib/bwmsgsv2_repo.rb +++ b/lib/bwmsgsv2_repo.rb @@ -50,21 +50,11 @@ class Bwmsgsv2Repo "catapult_fwd_timeout-#{sgx.from_jid}", customer_fwd.timeout.to_i ) - ]).then do - set_default_location(tel) if customer_fwd.v2_safe? - end + ]) end protected - def set_default_location(tel) - # Migrate location if needed - BandwidthIris::SipPeer.new( - site_id: CONFIG[:bandwidth_site], - id: CONFIG[:bandwidth_peer] - ).move_tns([tel]) - end - def set_or_delete(k, v) if v.nil? REDIS.del(k) diff --git a/lib/customer_fwd.rb b/lib/customer_fwd.rb index fbf3363..0151250 100644 --- a/lib/customer_fwd.rb +++ b/lib/customer_fwd.rb @@ -57,15 +57,7 @@ class CustomerFwd BANDWIDTH_VOICE.create_call(account, body: request).data.call_id end - def v2_safe? - false - end - class Tel < CustomerFwd - def v2_safe? - true - end - def initialize(values) super raise "Bad tel format: #{uri}" unless uri.match?(/\Atel:\+1\d{10}\Z/) @@ -77,20 +69,12 @@ class CustomerFwd end class SIP < CustomerFwd - def v2_safe? - uri.end_with?(CONFIG[:sip][:realm]) - end - def to uri end end class XMPP < CustomerFwd - def v2_safe? - true - end - def to jid = uri.sub(/^xmpp:/, "") "sip:#{ERB::Util.url_encode(jid)}@sip.cheogram.com" -- 2.45.2