diff options
author | Peter Kozak <spag@golwen.net> | 2013-03-12 04:22:49 -0400 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-03-12 04:22:49 -0400 |
commit | 28a21a6fce2b46f44e0a08b2d9d3f7b69f6cba9b (patch) | |
tree | f5c8540a9803c71de092dfd6f304b5ff9580ff7b /app/controllers/config_snom_controller.rb | |
parent | f12f9e67b52f8d3f8a61ceed9d6718b029c8f74f (diff) |
conference softkey provisioning
Diffstat (limited to 'app/controllers/config_snom_controller.rb')
-rw-r--r-- | app/controllers/config_snom_controller.rb | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb index eb94038..ae58ab8 100644 --- a/app/controllers/config_snom_controller.rb +++ b/app/controllers/config_snom_controller.rb @@ -281,7 +281,30 @@ class ConfigSnomController < ApplicationController when 'log_in' @softkeys.push({:context => sip_account_index, :label => softkey.label, :data => "speed f-li-#{softkey.number}"}) when 'conference' - @softkeys.push({:context => sip_account_index, :label => softkey.label, :data => "blf <sip:#{softkey.number}@#{sip_account.host}>|f-ta-"}) + conference = softkey.softkeyable + if conference.class == Conference + @softkeys.push({ + :context => sip_account_index, + :function => softkey.softkey_function.name, + :label => softkey.label, + :softkey => softkey, + :general_type => t("softkeys.functions.#{softkey.softkey_function.name}"), + :subscription => { + :to => "sip:conference#{conference.id}@#{sip_account.host}", + :for => "sip:conference#{conference.id}@#{sip_account.host}", + }, + :actions => [{ + :type => :dial, + :target => "f-ta-#{softkey.number}", + :when => 'on press', + :states => 'connected,holding', + },{ + :type => :dial, + :target => softkey.number, + :when => 'on press', + }], + }) + end when 'parking_stall' parking_stall = softkey.softkeyable if parking_stall.class == ParkingStall |