diff options
Diffstat (limited to 'misc/freeswitch')
-rw-r--r-- | misc/freeswitch/scripts/test_route.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/freeswitch/scripts/test_route.lua b/misc/freeswitch/scripts/test_route.lua index 9ab00f7..e311690 100644 --- a/misc/freeswitch/scripts/test_route.lua +++ b/misc/freeswitch/scripts/test_route.lua @@ -46,7 +46,7 @@ dialplan_object:retrieve_caller_data(); local destination = arguments.destination or dialplan_object:destination_new{ number = caller.destination_number }; local routes = {}; -if destination.type == 'unknown' then +if destination and destination.type == 'unknown' then local clip_no_screening = common.array.try(caller, 'account.record.clip_no_screening'); caller.caller_id_numbers = {} if not common.str.blank(clip_no_screening) then @@ -63,11 +63,11 @@ if destination.type == 'unknown' then destination.callee_id_number = destination.number; destination.callee_id_name = nil; - - require 'dialplan.router'; - routes = dialplan.router.Router:new{ log = log, database = database, caller = caller, variables = caller, log_details = true }:route_run(arguments.table or 'outbound'); end +require 'dialplan.router'; +routes = dialplan.router.Router:new{ log = log, database = database, caller = caller, variables = caller, log_details = true }:route_run(arguments.table or 'outbound'); + local result = { routes = routes, destination = destination, |