summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-02-27 17:02:27 -0500
committerPeter Kozak <spag@golwen.net>2013-02-27 17:02:27 -0500
commit144a26c3e33dd0072d269b7d8df18268de3c1a04 (patch)
tree2aa08448f9cf2b943f7377b891850f54c134f414
parent477fcf8bce7dff84bb11fa79a4ad4f106d1ec8ad (diff)
custom action call removed
-rw-r--r--app/controllers/sip_accounts_controller.rb31
-rw-r--r--config/routes.rb3
2 files changed, 0 insertions, 34 deletions
diff --git a/app/controllers/sip_accounts_controller.rb b/app/controllers/sip_accounts_controller.rb
index 27d464f..b34172d 100644
--- a/app/controllers/sip_accounts_controller.rb
+++ b/app/controllers/sip_accounts_controller.rb
@@ -1,7 +1,6 @@
class SipAccountsController < ApplicationController
load_resource :user
load_resource :tenant
- load_and_authorize_resource :sip_account, :only => [:call]
load_and_authorize_resource :sip_account, :through => [:user, :tenant ]
before_filter :set_and_authorize_parent
@@ -76,36 +75,6 @@ class SipAccountsController < ApplicationController
redirect_to :root, :notice => t('sip_accounts.controller.successfuly_destroyed')
end
- def call
- if !params[:url].blank?
- protocol, separator, phone_number = params[:url].partition(':')
- if ! phone_number.blank?
- @sip_account.call(phone_number)
- render(
- :status => 200,
- :layout => false,
- :content_type => 'text/plain',
- :text => "<!-- CALL -->",
- )
- return;
- end
- render(
- :status => 404,
- :layout => false,
- :content_type => 'text/plain',
- :text => "<!-- Number not found -->",
- )
- return;
- end
-
- render(
- :status => 404,
- :layout => false,
- :content_type => 'text/plain',
- :text => "<!-- Call URL not found -->",
- )
- end
-
private
def set_and_authorize_parent
@parent = @user || @tenant
diff --git a/config/routes.rb b/config/routes.rb
index 2fe1682..83ac5c4 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -277,9 +277,6 @@ Gemeinschaft42c::Application.routes.draw do
end
end
resources :voicemail_settings
- member do
- get 'call'
- end
end
resources :phones, :only => [] do