summaryrefslogtreecommitdiff
path: root/app/controllers/api/v1/calls_controller.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-21 15:07:44 +0200
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-21 15:07:44 +0200
commit4ce04ec03bc8f362d48ded43833645e7f454cb5c (patch)
treef078d226e17a64b6dc17b2976bb5dddcc9768715 /app/controllers/api/v1/calls_controller.rb
parent51db65fb71e638a1e2b5b2d8f19f6a685017099f (diff)
Added blind transfer functionality for the switchboard.
Diffstat (limited to 'app/controllers/api/v1/calls_controller.rb')
-rw-r--r--app/controllers/api/v1/calls_controller.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/controllers/api/v1/calls_controller.rb b/app/controllers/api/v1/calls_controller.rb
new file mode 100644
index 0000000..e6fbed4
--- /dev/null
+++ b/app/controllers/api/v1/calls_controller.rb
@@ -0,0 +1,24 @@
+module Api
+ module V1
+ class CallsController < ApplicationController
+ respond_to :json
+
+ def index
+ @calls = Call.limit(10)
+
+ respond_with @calls
+ end
+
+ def show
+ @call = Call.find(params[:id])
+
+ if params[:transfer_blind]
+ @call.transfer_blind(params[:transfer_blind])
+ end
+
+ respond_with @call
+ end
+
+ end
+ end
+end