summaryrefslogtreecommitdiff
path: root/app/views/config_snom
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
commitb80bd744ad873f6fc43018bc4bfb90677de167bd (patch)
tree072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/views/config_snom
parent3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff)
Start of GS5.
Diffstat (limited to 'app/views/config_snom')
-rw-r--r--app/views/config_snom/_snom_phone_directory.xml.haml19
-rw-r--r--app/views/config_snom/_snom_phone_input.xml.haml19
-rw-r--r--app/views/config_snom/_snom_phone_menu.xml.haml17
-rw-r--r--app/views/config_snom/_snom_phone_text.xml.haml16
-rw-r--r--app/views/config_snom/call_history.xml.haml2
-rw-r--r--app/views/config_snom/idle_screen.xml.haml33
-rw-r--r--app/views/config_snom/log_in.xml.haml3
-rw-r--r--app/views/config_snom/show.xml.haml151
-rw-r--r--app/views/config_snom/state_settings.xml.haml49
-rw-r--r--app/views/config_snom/switch_protocol.xml.builder18
10 files changed, 327 insertions, 0 deletions
diff --git a/app/views/config_snom/_snom_phone_directory.xml.haml b/app/views/config_snom/_snom_phone_directory.xml.haml
new file mode 100644
index 0000000..698f2e5
--- /dev/null
+++ b/app/views/config_snom/_snom_phone_directory.xml.haml
@@ -0,0 +1,19 @@
+!!! XML
+%SnomIPPhoneDirectory{:speedselect => 'off'}
+ %Title= @phone_xml_object[:title]
+ %Prompt= @phone_xml_object[:prompt]
+ - @phone_xml_object[:entries].each do |entry|
+ %DirectoryEntry{:sel => entry[:selected].to_s}
+ %Name= entry[:text]
+ %Telephone= entry[:number]
+
+ - if @phone_xml_object[:softkeys]
+ - @phone_xml_object[:softkeys].each do |softkey|
+ %SoftKeyItem
+ %Name= softkey[:name]
+ - if ! softkey[:label].blank?
+ %Label= softkey[:label]
+ - if ! softkey[:url].blank?
+ %URL= softkey[:url]
+ - if ! softkey[:softkey].blank?
+ %URL= softkey[:softkey]
diff --git a/app/views/config_snom/_snom_phone_input.xml.haml b/app/views/config_snom/_snom_phone_input.xml.haml
new file mode 100644
index 0000000..6038282
--- /dev/null
+++ b/app/views/config_snom/_snom_phone_input.xml.haml
@@ -0,0 +1,19 @@
+!!! XML
+%SnomIPPhoneInput
+ %Title= @phone_xml_object[:title]
+ %Prompt= @phone_xml_object[:prompt]
+ %URL= @phone_xml_object[:url]
+ %InputItem
+ %DisplayName= @phone_xml_object[:display_name]
+ %QueryStringParam= @phone_xml_object[:query_string_param]
+ %DefaultValue= @phone_xml_object[:default_value]
+ %InputFlags= @phone_xml_object[:input_flags]
+ - if @phone_xml_object[:softkeys]
+ - @phone_xml_object[:softkeys].each do |softkey|
+ %SoftKeyItem
+ %Name= softkey[:name]
+ %Label= softkey[:label]
+ - if ! softkey[:url].blank?
+ %URL= softkey[:url]
+ - if ! softkey[:softkey].blank?
+ %URL= softkey[:softkey]
diff --git a/app/views/config_snom/_snom_phone_menu.xml.haml b/app/views/config_snom/_snom_phone_menu.xml.haml
new file mode 100644
index 0000000..de016c0
--- /dev/null
+++ b/app/views/config_snom/_snom_phone_menu.xml.haml
@@ -0,0 +1,17 @@
+!!! XML
+%SnomIPPhoneMenu{:speedselect => 'off'}
+ %Title= @phone_xml_object[:title]
+ - @phone_xml_object[:entries].each do |entry|
+ %MenuItem{:sel => entry[:selected].to_s}
+ %Name= entry[:text]
+ %URL= entry[:url]
+
+ - if @phone_xml_object[:softkeys]
+ - @phone_xml_object[:softkeys].each do |softkey|
+ %SoftKeyItem
+ %Name= softkey[:name]
+ %Label= softkey[:label]
+ - if ! softkey[:url].blank?
+ %URL= softkey[:url]
+ - if ! softkey[:softkey].blank?
+ %URL= softkey[:softkey]
diff --git a/app/views/config_snom/_snom_phone_text.xml.haml b/app/views/config_snom/_snom_phone_text.xml.haml
new file mode 100644
index 0000000..6c3773c
--- /dev/null
+++ b/app/views/config_snom/_snom_phone_text.xml.haml
@@ -0,0 +1,16 @@
+!!! XML
+%SnomIPPhoneText
+ %Title= @phone_xml_object[:title]
+ %Prompt= @phone_xml_object[:prompt]
+ %Text= @phone_xml_object[:text]
+ - if @phone_xml_object[:softkeys]
+ - @phone_xml_object[:softkeys].each do |softkey|
+ %SoftKeyItem
+ %Name= softkey[:name]
+ %Label= softkey[:label]
+ - if ! softkey[:url].blank?
+ %URL= softkey[:url]
+ - if ! softkey[:softkey].blank?
+ %URL= softkey[:softkey]
+ -if @phone_xml_object[:fetch_url]
+ %fetch{:mil => @phone_xml_object[:fetch_mil]}= @phone_xml_object[:fetch_url]
diff --git a/app/views/config_snom/call_history.xml.haml b/app/views/config_snom/call_history.xml.haml
new file mode 100644
index 0000000..00f9990
--- /dev/null
+++ b/app/views/config_snom/call_history.xml.haml
@@ -0,0 +1,2 @@
+!!! XML
+= render @phone_xml_object[:name]
diff --git a/app/views/config_snom/idle_screen.xml.haml b/app/views/config_snom/idle_screen.xml.haml
new file mode 100644
index 0000000..9476c44
--- /dev/null
+++ b/app/views/config_snom/idle_screen.xml.haml
@@ -0,0 +1,33 @@
+!!! XML
+%screen_description
+ - if @phone_xml_object[:image]
+ %Image
+ %Data{:encoding => 'base64'}= @phone_xml_object[:image][:data]
+ %LocationX= @phone_xml_object[:image][:location_x]
+ %LocationY= @phone_xml_object[:image][:location_y]
+ %Invert= @phone_xml_object[:image][:invert]
+ - if @phone_xml_object[:clock]
+ %Clock
+ %LocationX= @phone_xml_object[:clock][:location_x]
+ %LocationY= @phone_xml_object[:clock][:location_y]
+ - if @phone_xml_object[:digital_clock]
+ %DigitalClock
+ %LocationX= @phone_xml_object[:digital_clock][:location_x]
+ %LocationY= @phone_xml_object[:digital_clock][:location_y]
+ - if @phone_xml_object[:date]
+ %Date
+ %LocationX= @phone_xml_object[:date][:location_x]
+ %LocationY= @phone_xml_object[:date][:location_y]
+ - if @phone_xml_object[:line]
+ %Line
+ %Account
+ %LocationX= @phone_xml_object[:line][:location_x]
+ %LocationY= @phone_xml_object[:line][:location_y]
+ - if @phone_xml_object[:status]
+ %Status
+ %LocationX= @phone_xml_object[:status][:location_x]
+ %LocationY= @phone_xml_object[:status][:location_y]
+ - if @phone_xml_object[:softkeys]
+ %Softkeys
+ %LocationX= @phone_xml_object[:softkeys][:location_x]
+ %LocationY= @phone_xml_object[:softkeys][:location_y]
diff --git a/app/views/config_snom/log_in.xml.haml b/app/views/config_snom/log_in.xml.haml
new file mode 100644
index 0000000..1f45d93
--- /dev/null
+++ b/app/views/config_snom/log_in.xml.haml
@@ -0,0 +1,3 @@
+!!! XML
+= render @phone_xml_object[:name]
+
diff --git a/app/views/config_snom/show.xml.haml b/app/views/config_snom/show.xml.haml
new file mode 100644
index 0000000..d9953c5
--- /dev/null
+++ b/app/views/config_snom/show.xml.haml
@@ -0,0 +1,151 @@
+!!! XML
+%settings
+ %phone-settings
+ %auto_reboot_on_setting_change{:perm => 'RW'}= 'off'
+ - if !@phone_settings[:setting_server].blank?
+ %setting_server{:perm => 'RW'}= @phone_settings[:setting_server]
+ %web_language{:perm => 'RW'}= 'English'
+ %language{:perm => 'RW'}= @phone_settings[:language]
+ %timezone{:perm => 'RW'}= 'GER+1'
+ %date_us_format{:perm => 'RW'}= 'off'
+ %time_24_format{:perm => 'RW'}= 'on'
+ %reset_settings{:perm => 'RW'}= ''
+ %update_policy{:perm => 'RW'}= 'settings_only'
+ %settings_refresh_timer{:perm => 'RW'}= '0'
+ %firmware_status{:perm => 'RW'}= ''
+ %webserver_type{:perm => 'R'}= 'http_https'
+ %http_scheme{:perm => 'RW'}= 'off'
+ %http_port{:perm => 'R'}= '80'
+ %https_port{:perm => 'R'}= '443'
+ %http_user{:perm => 'R'}= @phone_settings[:http_user]
+ %http_pass{:perm => 'R'}= @phone_settings[:http_pass]
+ %admin_mode_password{:perm => 'R'}= @phone_settings[:admin_mode_password]
+ %tone_scheme{:perm => 'RW'}= @phone_settings[:tone_scheme]
+ %keytones{:perm => 'RW'}= 'off'
+ %dtmf_speaker_phone{:perm => 'RW'}= 'off'
+ %disable_redirection_menu{:perm => 'R'}= 'on'
+ %retry_after_failed_register{:perm => 'RW'}= '70'
+ %encode_display_name{:perm => 'R'}= 'on'
+ %dtmf_payload_type{:perm => 'RW'}= '101'
+ %ignore_security_warning{:perm => 'R'}= 'on'
+ %call_completion{:perm => 'RW'}= 'on'
+ %block_url_dialing{:perm => 'RW'}= 'on'
+ %redirect_ringing{:perm => 'RW'}= 'on'
+ %goto_virtual_keys_state_on_activity{:perm => 'RW'}= 'off'
+ %goto_monitor_state_on_line_activity{:perm => 'RW'}= 'on'
+ %ringer_animation{:perm => 'RW'}= 'on'
+ %display_method{:perm => 'RW'}= 'display_name_number'
+ %callpickup_dialoginfo{:perm => 'RW'}= 'on'
+ %show_local_line{:perm => 'RW'}= 'off'
+ %mwi_notification{:perm => 'RW'}= 'silent'
+ %mwi_dialtone{:perm => 'RW'}= 'normal'
+ %prefer_saved_over_received_photo{:perm => 'RW'}= 'off'
+ %no_dnd{:perm => 'RW'}= 'on'
+ %logon_wizard{:perm => 'RW'}= 'off'
+ %disable_deflection{:perm => 'RW'}= 'off'
+ %csta_control{:perm => 'RW'}= 'on'
+ %save_latest_callrecords_to_flash{:perm => 'RW'}= 'off'
+ %use_proxy_number_guessing{:perm => 'RW'}= 'off'
+ %guess_number{:perm => 'RW'}= 'off'
+ %guess_start_length{:perm => 'RW'}= '3'
+ %ieee8021x_eap_md5_username{:perm => 'RW'}= PROVISIONING_IEEE8021X_EAP_USERNAME
+ %ieee8021x_eap_md5_password{:perm => 'RW'}= PROVISIONING_IEEE8021X_EAP_PASSWORD
+
+ - 0.upto(9) do |ringer_idx|
+ %internal_ringer_text{:idx => ringer_idx, :perm => 'RW'}= "Ringer#{(ringer_idx+1)}"
+ %internal_ringer_file{:idx => ringer_idx, :perm => 'RW'}= "Ringer#{(ringer_idx+1)}"
+
+ %internal_ringer_text{:idx => 10, :perm => 'RW'}= "Ringer0"
+ %internal_ringer_file{:idx => 10, :perm => 'RW'}= "Silent"
+
+ %gui_fkey1{:perm => 'R'}= 'none'
+ %gui_fkey2{:perm => 'R'}= 'none'
+ %gui_fkey3{:perm => 'R'}= 'none'
+ %gui_fkey4{:perm => 'R'}= 'none'
+
+ %dkey_menu{:perm => 'RW'}= @dkeys[:menu]
+ %dkey_retrieve{:perm => 'RW'}= @dkeys[:retrieve]
+ %dkey_conf{:perm => 'RW'}= @dkeys[:conf]
+ %dkey_redial{:perm => 'RW'}= @dkeys[:redial]
+ %dkey_directory{:perm => 'RW'}= @dkeys[:directory]
+
+ %idle_ok_key_action{:perm => 'RW'}= @dkeys[:idle_ok]
+ %idle_cancel_key_action{:perm => 'RW'}= @dkeys[:idle_cancel]
+ %idle_up_key_action{:perm => 'RW'}= @dkeys[:idle_up]
+ %idle_down_key_action{:perm => 'RW'}= @dkeys[:idle_down]
+ %idle_left_key_action{:perm => 'RW'}= @dkeys[:idle_left]
+ %idle_right_key_action{:perm => 'RW'}= @dkeys[:idle_right]
+
+ != "\<!-- sip accounts: #{@sip_accounts.count} --\>"
+ - @sip_accounts.each_with_index do |sip_account, array_index|
+ - index = array_index + 1
+ != "\<!-- sip account #{array_index}: #{sip_account[:idle_text]}, #{sip_account[:active]} --\>"
+ %user_active{:idx => index, :perm => 'R'}= sip_account[:active]
+ %user_pname{:idx => index, :perm => 'R'}= sip_account[:pname]
+ %user_pass{:idx => index, :perm => 'R'}= sip_account[:pass]
+ %user_host{:idx => index, :perm => 'R'}= sip_account[:host]
+ %user_outbound{:idx => index, :perm => 'R'}= sip_account[:outbound]
+ %user_name{:idx => index, :perm => 'R'}= sip_account[:name]
+ %user_realname{:idx => index, :perm => 'R'}= sip_account[:realname]
+ %user_idle_text{:idx => index, :perm => 'R'}= sip_account[:idle_text]
+ %user_mailbox{:idx => index, :perm => 'R'}= sip_account[:mailbox]
+ %user_expiry{:idx => index, :perm => 'R'}= ''
+ %user_server_type{:idx => index, :perm => 'R'}= 'default'
+ %user_send_local_name{:idx => index, :perm => 'RW'}= 'on'
+ %user_dtmf_info{:idx => index, :perm => 'RW'}= 'off'
+ %user_dp_exp{:idx => index, :perm => 'RW'}= ''
+ %user_dp_str{:idx => index, :perm => 'RW'}= ''
+ %user_dp{:idx => index, :perm => 'RW'}= ''
+ %user_q{:idx => index, :perm => 'RW'}= '1.0'
+ %user_failover_identity{:idx => index, :perm => 'RW'}= 'none'
+ %user_full_sdp_answer{:idx => index, :perm => 'RW'}= 'on'
+ %user_dynamic_payload{:idx => index, :perm => 'RW'}= 'on'
+ %user_g726_packing_order{:idx => index, :perm => 'R'}= 'on'
+ %user_srtp{:idx => index, :perm => 'RW'}= 'off'
+ %user_savp{:idx => index, :perm => 'RW'}= 'off'
+ %codec_size{:idx => index, :perm => 'RW'}= '20'
+ %codec1_name{:idx => index, :perm => 'RW'}= "0"
+ %codec2_name{:idx => index, :perm => 'RW'}= "8"
+ %codec3_name{:idx => index, :perm => 'RW'}= "3"
+ %codec4_name{:idx => index, :perm => 'RW'}= "9"
+ %codec5_name{:idx => index, :perm => 'RW'}= "2"
+ %codec6_name{:idx => index, :perm => 'RW'}= "18"
+ %codec7_name{:idx => index, :perm => 'RW'}= "4"
+ %record_missed_calls{:idx => index, :perm => 'RW'}= 'on'
+ %record_received_calls{:idx => index, :perm => 'RW'}= 'off'
+ %record_missed_calls_cwi_off{:idx => index, :perm => 'RW'}= 'off'
+ %record_dialed_calls{:idx => index, :perm => 'RW'}= 'off'
+
+ / all sip accounts done
+
+ %functionKeys
+ - @softkeys.each_with_index do |softkey, index|
+ - if softkey[:data]
+ %fkey{:idx => index, :context => (softkey[:context] ? softkey[:context].to_s : 'active'), :label => softkey[:label], :perm => 'RW'}= softkey[:data]
+ - elsif softkey[:general_type]
+ %fkey{:idx => index, :context => (softkey[:context] ? softkey[:context].to_s : 'active'), :label => softkey[:label], :perm => 'RW'}
+ %general{:type => softkey[:general_type]}
+ %default_state{:name => 'initial'}
+ %appearance
+ %line_info_layer
+ %line_format{:line => '0'}= '$state $type'
+ %line_format{:line => '1'}= '$continue $name'
+ - if softkey[:subscription]
+ %subscription{:type => 'dialog', :to => softkey[:subscription][:to], :for => softkey[:subscription][:for]}
+ %NotifyParsingRules{:type => 'applies'}
+ %level1{:translates_to => 'OK'}= "/dialog-info[@entity=\"sip:#{softkey[:subscription][:to]}\"]"
+ %NotifyParsingRules{:type => 'state'}
+ %level1{:translates_to => 'available'}= '/dialog-info/dialog/state[.="terminated"]'
+ %level2{:translates_to => 'ringing'}= '/dialog-info/dialog/state[.="early"]'
+ %level3{:translates_to => 'active'}= '/dialog-info/dialog/state[.="confirmed"]'
+ %level4{:fetch_content => 'true'}= '/dialog-info/dialog/state'
+ %default{:translates_to => 'unknown'}
+ - if softkey[:actions]
+ %action
+ - softkey[:actions].each do |action|
+ - if action[:type] == :url
+ %url{:target => action[:target], :when => action[:when]}
+
+ %uploads
+ - if @state_settings_url
+ %file{:url => @state_settings_url, :type => "gui_xml_state_settings"}
diff --git a/app/views/config_snom/state_settings.xml.haml b/app/views/config_snom/state_settings.xml.haml
new file mode 100644
index 0000000..ac0e872
--- /dev/null
+++ b/app/views/config_snom/state_settings.xml.haml
@@ -0,0 +1,49 @@
+!!! XML
+%SnomIPPhoneMenu{:state => 'relevant', :title => "Gemeinschaft #{GEMEINSCHAFT_VERSION}"}
+ %MenuItem{:name => '$(lang:menu100_phone_book)'}
+ %URL= "#{@base_url}/#{@sip_account_ids.first}/phone_book.xml"
+ %Menu{:name => '$(lang:menu100_call_lists)'}
+ %MenuItem{:name => '$(lang:list_missed)'}
+ - @sip_account_ids.each_with_index do |id, index|
+ %If{:condition => "$(current_line)==#{index+1}"}
+ %URL= "#{@base_url}/#{id}/call_history_missed.xml"
+ %MenuItem{:name => '$(lang:list_taken)'}
+ - @sip_account_ids.each_with_index do |id, index|
+ %If{:condition => "$(current_line)==#{index+1}"}
+ %URL= "#{@base_url}/#{id}/call_history_received.xml"
+ %MenuItem{:name => '$(lang:list_dialed)'}
+ - @sip_account_ids.each_with_index do |id, index|
+ %If{:condition => "$(current_line)==#{index+1}"}
+ %URL= "#{@base_url}/#{id}/call_history_dialed.xml"
+ %MenuItem{:name => '$(lang:sel100_activeline)'}
+ %Action= 'active_line'
+
+ - if @enable_login
+ %MenuItem{:name => 'Log in'}
+ %URL= "#{@base_url}/log_in.xml"
+ - if @enable_logout
+ %MenuItem{:name => 'Log out'}
+ %URL= "#{@base_url}/log_out.xml"
+
+ %Menu{:name => '$(lang:preferences_settings)'}
+ %MenuItem{:name => '$(lang:menu_gen_contrast)'}
+ %Action= 'contrast'
+ %MenuItem{:name => '$(lang:use_backlight)'}
+ %Action= 'use_backlight'
+ %MenuItem{:name => '$(lang:use_backlight) $(lang:backlight_when_active)'}
+ %Action= 'backlight_active'
+ %MenuItem{:name => '$(lang:use_backlight) $(lang:backlight_when_idle)'}
+ %Action= 'backlight_idle'
+ %MenuItem{:name => '$(lang:menu_equalizer)'}
+ %Action= 'equalizer'
+ %Menu{:name => '$(lang:maintenance_settings)'}
+ %MenuItem{:name => '$(lang:system_information_menu)'}
+ %Action= 'sysinfo'
+ %MenuItem{:name => '$(lang:sel100_reboot)'}
+ %Action= 'reboot'
+ %If{:condition => '$(set:admin_mode)'}
+ %MenuItem{:name => '$(lang:reset_settings)'}
+ %Action= 'reset_settings'
+ %If{:condition => '$(update_available)'}
+ %MenuItem{:name => '$(lang:update_header)'}
+ %Action= 'software_update' \ No newline at end of file
diff --git a/app/views/config_snom/switch_protocol.xml.builder b/app/views/config_snom/switch_protocol.xml.builder
new file mode 100644
index 0000000..cd71486
--- /dev/null
+++ b/app/views/config_snom/switch_protocol.xml.builder
@@ -0,0 +1,18 @@
+xml.instruct! # <?xml version="1.0" encoding="UTF-8"?>
+
+xml.settings {
+ xml.tag!( 'phone-settings' ) {
+ xml.auto_reboot_on_setting_change( 'on', :perm => 'RW' )
+ xml.settings_refresh_timer( '60', :perm => 'RW' )
+ xml.reset_settings( 'main net stack user fkey speeddial phonebook', :perm => 'RW' )
+ #xml.dhcp( 'off', :perm => 'RW' )
+ #xml.ip_adr( @ip_address, :perm => 'RW' )
+ xml.setting_server( @prov_url, :perm => 'RW' )
+ }
+}
+
+
+# Local Variables:
+# mode: ruby
+# End:
+