Created
November 26, 2008 16:19
-
-
Save alcabanillas-engh/29433 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#If 11-digit numbers simply pass with a 9 pre-pended to allow for 1 + 10 digits from the api request | |
if $config["allow_11_digit_dialing"] == true && phone_number.to_s.length == 11 | |
phone_number = $config["dial_prefix"].to_s + phone_number.to_s | |
else | |
#See if the number is on the exception list and then either add only a dial prefix if it is | |
#or a long distance prefix if it is not | |
if phone_number.to_s.match($config["exception_list"]) | |
phone_number = $config["dial_prefix"].to_s + phone_number.to_s | |
else | |
phone_number = $config["dial_prefix"].to_s + $config["long_distance_prefix"].to_s + phone_number.to_s | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment