summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/sip_account.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/sip_account.rb b/app/models/sip_account.rb
index 930069d..cea5f0e 100644
--- a/app/models/sip_account.rb
+++ b/app/models/sip_account.rb
@@ -213,6 +213,11 @@ class SipAccount < ActiveRecord::Base
return states
end
+ def non_e164_phone_numbers
+ array_of_phone_numbers_as_strings = self.phone_numbers.map{ |phone_number| phone_number.number.to_s }.sort
+ self.phone_numbers.where(:number => array_of_phone_numbers_as_strings.select { |phone_number| phone_number[0] != '+' })
+ end
+
private
def save_value_of_to_s