summaryrefslogtreecommitdiff
path: root/app/controllers/config_snom_controller.rb
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-07-25 08:12:33 +0200
committerPeter Kozak <spag@golwen.net>2013-07-25 08:12:33 +0200
commit2d7d63a65abb86d54d3cd4d188ee60ee058c9f72 (patch)
tree01c1779fa80575509a319be2ce48228202f9f5cb /app/controllers/config_snom_controller.rb
parent331bb9d4c3ed1a52f849b1fb47dd6f8e586784c9 (diff)
phone_id in paths
Diffstat (limited to 'app/controllers/config_snom_controller.rb')
-rw-r--r--app/controllers/config_snom_controller.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb
index 844904a..9e5e18f 100644
--- a/app/controllers/config_snom_controller.rb
+++ b/app/controllers/config_snom_controller.rb
@@ -547,7 +547,7 @@ class ConfigSnomController < ApplicationController
@extension_module.update_attributes({ :ip_address => request_remote_ip })
end
- phone = @extension_module.phone
+ @phone = @extension_module.phone
provisioning_protocol = request.protocol
@@ -563,24 +563,24 @@ class ConfigSnomController < ApplicationController
softkeys = Array.new()
send_sensitve = @provisioning_authenticated || !@extension_module.provisioning_key_active
- if send_sensitve && phone
+ if send_sensitve && @phone
if @provisioning_authenticated && !@extension_module.provisioning_key_active
@extension_module.update_attributes({ :provisioning_key_active => true })
end
- @settings[:user] = phone.http_user
- @settings[:passwd] = phone.http_password
- @settings[:phone_ip] = phone.ip_address
+ @settings[:user] = @phone.http_user
+ @settings[:passwd] = @phone.http_password
+ @settings[:phone_ip] = @phone.ip_address
if !GsParameter.get('PROVISIONING_KEY_LENGTH').nil? && GsParameter.get('PROVISIONING_KEY_LENGTH') > 0 && !@extension_module.provisioning_key.blank?
@settings[:provisioning_server] = "#{provisioning_protocol}#{request.host_with_port}/snom_vision-#{@extension_module.provisioning_key}.xml"
end
- phone.sip_accounts.each do |sip_account|
+ @phone.sip_accounts.each do |sip_account|
softkeys.concat(sip_account.softkeys.order(:position))
end
- phone_defaults = SNOM_PHONE_DEFAULTS[phone.phone_model.name]
+ phone_defaults = SNOM_PHONE_DEFAULTS[@phone.phone_model.name]
softkeys.shift(phone_defaults[:softkeys_physical] * @extension_module.position)
else