summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/call_routes_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/call_routes_controller.rb b/app/controllers/call_routes_controller.rb
index 2dcd648..50e7849 100644
--- a/app/controllers/call_routes_controller.rb
+++ b/app/controllers/call_routes_controller.rb
@@ -87,6 +87,13 @@ class CallRoutesController < ApplicationController
end
end
+ def test
+ sip_account = SipAccount.where(:id => params[:sip_account_id]).first;
+ destination_number = params[:destination_number]
+ routing_table = params[:routing_table]
+ @route_test = CallRoute.test_route(routing_table, {'caller.destination_number' => destination_number, 'caller.auth_account_type' => 'SipAccount', 'caller.auth_account_uuid' => sip_account.uuid})
+ end
+
private
def call_route_parameter_params
params.require(:call_route).permit(:routing_table, :name, :endpoint_type, :endpoint_id, :position)