diff --git a/README.md b/README.md index eaf7d14..9c42cc8 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,12 @@ This is purposely minimal and unexciting. However, feel free to use, change, and Using it? Tell us how and where. We'd love to hear! +## Configuration + +### FORWARD_PHONE_TO + +Set this to a phone number to temporarily forward all calls to that number. +Must include area code and not have any spaces or other special characters +(e.g. 5558675309). + © 2014-2018, 2022 [Collective Idea](https://collectiveidea.com/) diff --git a/views/welcome.builder b/views/welcome.builder index 48b4754..c2e6ac4 100644 --- a/views/welcome.builder +++ b/views/welcome.builder @@ -1,4 +1,9 @@ -xml.Gather timeout: 5, action: "/menu", numDigits: "1" do |g| - g.Play sound_url("welcome") +if ENV["FORWARD_PHONE_TO"].present? + # Number must include area code and not have any other special characters. + xml.Dial ENV["FORWARD_PHONE_TO"] +else + xml.Gather timeout: 5, action: "/menu", numDigits: "1" do |g| + g.Play sound_url("welcome") + end + xml.Hangup end -xml.Hangup