summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-02-04 15:48:30 +0100
committerspag <spag@golwen.net>2013-02-04 15:48:30 +0100
commitb96d198d486cebad9eb803088de39262bef2e4d7 (patch)
tree4e42f073b8d43564ef1130d71de850d542eb3492
parentda3ae3cb90697c66beda10fb5d6cb6186055ed3f (diff)
sip_expiry_seconds
-rw-r--r--app/controllers/config_snom_controller.rb4
-rw-r--r--app/views/config_snom/show.xml.haml2
2 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb
index e797a43..33b63da 100644
--- a/app/controllers/config_snom_controller.rb
+++ b/app/controllers/config_snom_controller.rb
@@ -247,6 +247,7 @@ class ConfigSnomController < ApplicationController
elsif @phone.fallback_sip_account
phone_sip_accounts.push( @phone.fallback_sip_account )
end
+ expiry_seconds = GsParameter.get('SIP_EXPIRY_SECONDS')
phone_sip_accounts.each do |sip_account|
if (sip_account.sip_accountable_type == @phone.phoneable_type) and (sip_account.sip_accountable_id == @phone.phoneable_id)
snom_sip_account = {
@@ -259,7 +260,8 @@ class ConfigSnomController < ApplicationController
:name => sip_account.auth_name,
:realname => 'Call',
:idle_text => sip_account.caller_name,
- :mailbox => "<sip:#{sip_account.auth_name}@#{sip_account.host}>"
+ :mailbox => "<sip:#{sip_account.auth_name}@#{sip_account.host}>",
+ :expiry => expiry_seconds,
}
@sip_accounts.push(snom_sip_account)
sip_account_index = @sip_accounts.length
diff --git a/app/views/config_snom/show.xml.haml b/app/views/config_snom/show.xml.haml
index 30bee56..53b300c 100644
--- a/app/views/config_snom/show.xml.haml
+++ b/app/views/config_snom/show.xml.haml
@@ -121,7 +121,7 @@
%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_expiry{:idx => index, :perm => 'R'}= sip_account[:expiry]
%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'