summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-03-12 04:22:49 -0400
committerPeter Kozak <spag@golwen.net>2013-03-12 04:22:49 -0400
commit28a21a6fce2b46f44e0a08b2d9d3f7b69f6cba9b (patch)
treef5c8540a9803c71de092dfd6f304b5ff9580ff7b /app
parentf12f9e67b52f8d3f8a61ceed9d6718b029c8f74f (diff)
conference softkey provisioning
Diffstat (limited to 'app')
-rw-r--r--app/controllers/config_snom_controller.rb25
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