summaryrefslogtreecommitdiff
path: root/app/controllers/config_siemens_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/config_siemens_controller.rb')
-rw-r--r--app/controllers/config_siemens_controller.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/controllers/config_siemens_controller.rb b/app/controllers/config_siemens_controller.rb
index 7d5eb3f..3fe3aaa 100644
--- a/app/controllers/config_siemens_controller.rb
+++ b/app/controllers/config_siemens_controller.rb
@@ -194,6 +194,18 @@ class ConfigSiemensController < ApplicationController
#logger.debug(@phone_items)
@my_nonce = params[:WorkpointMessage][:Message][:nonce]
@new_settings = Array.new
+
+ phone_parameters = GsParameter.get_list('phones', 'siemens')
+ phone_parameters.each do |name, value|
+ value = value.gsub!(/\{([a-z0-9_\.]+)\}/) { |v|
+ source = @sip_account
+ $1.split('.').each do |method|
+ source = source.send(method) if source.respond_to?(method)
+ end
+ source.to_s
+ }
+ @new_settings << [name, nil, value]
+ end
@new_settings << ['dhcp', nil, 'true']
@new_settings << ['hostname', nil, mac_address.gsub(':', '') ]
@@ -479,7 +491,6 @@ class ConfigSiemensController < ApplicationController
@new_settings << ['feature-availability', 33, 'true'] # line overview
@new_settings << ['feature-availability', 33, 'false'] # phone lock
-
@soft_keys = Array.new
# Fill softkeys with keys dependent on limit of phone
@sip_account.softkeys.order(:position).each do |sk|