summaryrefslogtreecommitdiff
path: root/app/controllers/calls_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/calls_controller.rb')
-rw-r--r--app/controllers/calls_controller.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/controllers/calls_controller.rb b/app/controllers/calls_controller.rb
index 22ff92d..9d85a10 100644
--- a/app/controllers/calls_controller.rb
+++ b/app/controllers/calls_controller.rb
@@ -18,11 +18,11 @@ class CallsController < ApplicationController
protocol, separator, phone_number = params[:url].partition(':')
if ! phone_number.blank?
@call = @parent.calls.new()
- @call.dest = phone_number
+ @call.destination = phone_number
end
elsif !params[:number].blank?
@call = @parent.calls.new()
- @call.dest = params[:number]
+ @call.destination = params[:number]
end
end
@@ -31,8 +31,7 @@ class CallsController < ApplicationController
end
def create
- params[:call][:sip_account] = @sip_account
- @call = Call.create(params[:call])
+ @call = @sip_account.calls.create(params[:call])
if @call && @call.call
m = method( :"#{@parent.class.name.underscore}_calls_url" )