summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-27 20:59:32 +0200
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-27 20:59:32 +0200
commitd95155baebf7004bfc99c13545e343b8bd0882b6 (patch)
tree480d5bdf3f8e1354e56281d497300f776a1c980b /app
parentaad51572a6c75a4cbd2d44804b82f634a4ddd732 (diff)
parent51c51156e22b16fb5c120aed8dfef13a2d10b465 (diff)
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'app')
-rw-r--r--app/controllers/sip_accounts_controller.rb1
-rw-r--r--app/models/sip_account.rb13
-rw-r--r--app/views/config_snom/show.xml.haml1
3 files changed, 9 insertions, 6 deletions
diff --git a/app/controllers/sip_accounts_controller.rb b/app/controllers/sip_accounts_controller.rb
index cd34953..3dc5a54 100644
--- a/app/controllers/sip_accounts_controller.rb
+++ b/app/controllers/sip_accounts_controller.rb
@@ -85,6 +85,7 @@ class SipAccountsController < ApplicationController
m = method( :"#{@parent.class.name.underscore}_sip_account_path" )
redirect_to m.( @parent, @sip_account ), :notice => t('sip_accounts.controller.successfuly_updated')
else
+ possible_voicemail_accounts
render :edit
end
end
diff --git a/app/models/sip_account.rb b/app/models/sip_account.rb
index 668fbfe..a2644e9 100644
--- a/app/models/sip_account.rb
+++ b/app/models/sip_account.rb
@@ -154,14 +154,15 @@ class SipAccount < ActiveRecord::Base
return SipRegistration.where(:sip_user => self.auth_name).first
end
- def call( phone_number, origin_cid_number = nil, origin_cid_name = 'Call' )
- origin_cid_number = origin_cid_number || phone_number
+ def call( phone_number, caller_id_number = nil, caller_id_name = 'Call', auto_answer = false )
require 'freeswitch_event'
- return FreeswitchAPI.execute(
+ origination_uuid = UUID.new.generate
+ if FreeswitchAPI.execute(
'originate',
- "{origination_uuid=#{UUID.new.generate},origination_caller_id_number='#{phone_number}',origination_caller_id_name='#{origin_cid_name}'}user/#{self.auth_name} #{phone_number}",
- true
- );
+ "{origination_uuid=#{origination_uuid},origination_caller_id_number='#{caller_id_number||phone_number}',origination_caller_id_name='#{caller_id_name}',sip_auto_answer='#{auto_answer}'}user/#{self.auth_name} #{phone_number}",
+ true)
+ return origination_uuid
+ end
end
def target_group_ids_by_permission(permission)
diff --git a/app/views/config_snom/show.xml.haml b/app/views/config_snom/show.xml.haml
index 22df8bc..8b501ab 100644
--- a/app/views/config_snom/show.xml.haml
+++ b/app/views/config_snom/show.xml.haml
@@ -37,6 +37,7 @@
%display_method{:perm => 'RW'}= 'display_name_number'
%callpickup_dialoginfo{:perm => 'RW'}= 'on'
%pickup_indication{:perm => 'RW'}= 'off'
+ %auto_connect_indication{:perm => 'RW'}= 'off'
%show_local_line{:perm => 'RW'}= 'off'
%mwi_notification{:perm => 'RW'}= 'silent'
%mwi_dialtone{:perm => 'RW'}= 'normal'