M config-schema.dhall => config-schema.dhall +1 -1
@@ 20,7 20,7 @@
forall (address : Text) -> forall (customer_id : Text) -> Text
, interac : Text
, keep_area_codes : List Text
-, keep_area_codes_in : { account : Text, site : Text }
+, keep_area_codes_in : { account : Text, sip_peer_id : Text, site_id : Text }
, notify_admin : Text
, notify_from : Text
, ogm_path : Text
M config.dhall.sample => config.dhall.sample +1 -1
@@ 78,7 78,7 @@ in
admins = ["test\\40example.com@example.net"],
unbilled_targets = ["+14169938000"],
keep_area_codes = ["555"],
- keep_area_codes_in = { account = "", site = "" },
+ keep_area_codes_in = { account = "", site_id = "", sip_peer_id = "" },
upstream_domain = "example.net",
approved_domains = toMap { `example.com` = Some "customer_id" }
}
M lib/bandwidth_tn_repo.rb => lib/bandwidth_tn_repo.rb +2 -2
@@ 32,9 32,9 @@ class BandwidthTnRepo
tn = tel.sub(/\A\+1/, "")
if CONFIG[:keep_area_codes].find { |area| tn.start_with?(area) }
BandwidthIris::Tn.new({ telephone_number: tn }, @move_client).move(
- site_id: CONFIG[:keep_area_codes_in][:site],
customer_order_id: order_name,
- source_account_id: CONFIG[:creds][:account]
+ source_account_id: CONFIG[:creds][:account],
+ **CONFIG[:keep_area_codes_in].slice(:site_id, :sip_peer_id)
)
else
BandwidthIris::Disconnect.create(order_name, tn)