diff options
author | spag <spag@golwen.net> | 2013-02-13 10:08:01 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-02-13 10:08:01 +0100 |
commit | 14b400d563b2d33706491a20e997a1062b9acc69 (patch) | |
tree | 836a156e06a56541461ec36863eebfe71e2efd16 | |
parent | 043967a309d9748c8d74d0d5eecdb90b4d433a8c (diff) |
language_code added to sip_account classes
-rw-r--r-- | app/models/sip_account.rb | 4 | ||||
-rw-r--r-- | misc/freeswitch/scripts/common/sip_account.lua | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/app/models/sip_account.rb b/app/models/sip_account.rb index 9ba1f8b..7df8e3b 100644 --- a/app/models/sip_account.rb +++ b/app/models/sip_account.rb @@ -6,7 +6,7 @@ class SipAccount < ActiveRecord::Base attr_accessible :auth_name, :caller_name, :password, :voicemail_pin, :tenant_id, :call_waiting, :clir, :clip_no_screening, :clip, :description, :callforward_rules_act_per_sip_account, - :hotdeskable, :gs_node_id + :hotdeskable, :gs_node_id, :language_code # Associations: # @@ -31,6 +31,8 @@ class SipAccount < ActiveRecord::Base belongs_to :gs_node + belongs_to :language, :foreign_key => 'language_code', :primary_key => 'code' + # Delegations: # delegate :host, :to => :sip_domain, :allow_nil => true diff --git a/misc/freeswitch/scripts/common/sip_account.lua b/misc/freeswitch/scripts/common/sip_account.lua index d023f20..5b1ea56 100644 --- a/misc/freeswitch/scripts/common/sip_account.lua +++ b/misc/freeswitch/scripts/common/sip_account.lua @@ -38,6 +38,7 @@ function SipAccount.find_by_sql(self, where) `a`.`sip_accountable_id`, \ `a`.`hotdeskable`, \ `a`.`gs_node_id`, \ + `a`.`language_code`, \ `b`.`host`, \ `c`.`sip_host`, \ `c`.`profile_name` \ |