summaryrefslogtreecommitdiff
path: root/app/models/sip_account.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-05 23:10:07 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-05 23:10:07 +0100
commit3862734b5e0833ed108300102c68159e40ffd93a (patch)
tree4491044dbf48aea515303382e7664cf9be2cb182 /app/models/sip_account.rb
parent380a4cdfe5cfa573fb916ca7c2145a6062ef8198 (diff)
parent57196d838691aeba38ad7e088e83c0881a213861 (diff)
Merge branch 'replace_constants' into develop
Diffstat (limited to 'app/models/sip_account.rb')
-rw-r--r--app/models/sip_account.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/sip_account.rb b/app/models/sip_account.rb
index 8459265..5388395 100644
--- a/app/models/sip_account.rb
+++ b/app/models/sip_account.rb
@@ -71,7 +71,7 @@ class SipAccount < ActiveRecord::Base
after_update :log_out_phone_if_not_local
def to_s
- truncate((self.caller_name || "SipAccount ID #{self.id}"), :length => TO_S_MAX_CALLER_NAME_LENGTH) + " (#{truncate(self.auth_name, :length => TO_S_MAX_LENGTH_OF_AUTH_NAME)}@...#{self.host.split(/\./)[2,3].to_a.join('.') if self.host })"
+ truncate((self.caller_name || "SipAccount ID #{self.id}"), :length => GsParameter.get('TO_S_MAX_CALLER_NAME_LENGTH')) + " (#{truncate(self.auth_name, :length => GsParameter.get('TO_S_MAX_LENGTH_OF_AUTH_NAME'))}@...#{self.host.split(/\./)[2,3].to_a.join('.') if self.host })"
end
def call_forwarding_toggle( call_forwarding_service, to_voicemail = nil )
@@ -200,7 +200,7 @@ class SipAccount < ActiveRecord::Base
# log out phone if sip_account is not on this node
def log_out_phone_if_not_local
- if self.gs_node_id && ! GsNode.where(:ip_address => HOMEBASE_IP_ADDRESS, :id => self.gs_node_id).first
+ if self.gs_node_id && ! GsNode.where(:ip_address => GsParameter.get('HOMEBASE_IP_ADDRESS'), :id => self.gs_node_id).first
self.phones.each do |phone|
phone.user_logout;
end