From 6c5141ca90bb25dd358a4b2cb4bf5a7a39c22597 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 26 Mar 2013 15:55:42 +0100 Subject: global callback --- misc/freeswitch/scripts/dialplan_default.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'misc/freeswitch/scripts/dialplan_default.lua') diff --git a/misc/freeswitch/scripts/dialplan_default.lua b/misc/freeswitch/scripts/dialplan_default.lua index 2b651c5..ba51ed3 100644 --- a/misc/freeswitch/scripts/dialplan_default.lua +++ b/misc/freeswitch/scripts/dialplan_default.lua @@ -29,6 +29,9 @@ function input_call_back_callee(s, object_type, object_data, arg) end end +function global_callback_handler(...) + return global_callback:run({...}); +end -- initialize logging require 'common.log' @@ -90,6 +93,10 @@ else end end +require 'dialplan.callback'; +global_callback = dialplan.callback.Callback:new{ session = session, log = log }; + + if start_caller.from_node then log:debug('AUTHENTICATION_REQUIRED_NODE - node_id: ', start_caller.node_id, ', domain: ', start_dialplan.domain); start_dialplan:hangup(407, start_dialplan.domain); -- cgit v1.2.3 From 7ceae357dc8081afc73f74d6790340fdca3fea4f Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 6 May 2013 14:24:46 +0200 Subject: unset input callback --- misc/freeswitch/scripts/dialplan_default.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'misc/freeswitch/scripts/dialplan_default.lua') diff --git a/misc/freeswitch/scripts/dialplan_default.lua b/misc/freeswitch/scripts/dialplan_default.lua index ba51ed3..32789cb 100644 --- a/misc/freeswitch/scripts/dialplan_default.lua +++ b/misc/freeswitch/scripts/dialplan_default.lua @@ -117,6 +117,8 @@ else start_dialplan:run(start_destination); end +start_caller.session:unsetInputCallback(); + -- release database handle if database then database:release(); -- cgit v1.2.3