summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/dialplan
diff options
context:
space:
mode:
Diffstat (limited to 'misc/freeswitch/scripts/dialplan')
-rw-r--r--misc/freeswitch/scripts/dialplan/dialplan.lua8
-rw-r--r--misc/freeswitch/scripts/dialplan/functions.lua2
2 files changed, 6 insertions, 4 deletions
diff --git a/misc/freeswitch/scripts/dialplan/dialplan.lua b/misc/freeswitch/scripts/dialplan/dialplan.lua
index f4dca9e..391f5bf 100644
--- a/misc/freeswitch/scripts/dialplan/dialplan.lua
+++ b/misc/freeswitch/scripts/dialplan/dialplan.lua
@@ -872,6 +872,8 @@ function Dialplan.run(self, destination)
self.caller:set_variable('gs_save_cdr', true);
self.caller:set_variable('gs_call_service', 'dial');
self.caller.session:setAutoHangup(false);
+ self.caller.date = os.date('%y%m%d%w');
+ self.caller.time = os.date('%H%M%S');
self.routes = common.configuration_file.get('/opt/freeswitch/scripts/ini/routes.ini');
self.caller.domain_local = self.domain;
@@ -905,9 +907,8 @@ function Dialplan.run(self, destination)
end
end
- self.log:info('DIALPLAN start - caller_id: ',self.caller.caller_id_number, ' "', self.caller.caller_id_name,'"',
- ', number: ', destination.number);
-
+ self.log:info('DIALPLAN start - caller_id: ',self.caller.caller_id_number, ' "', self.caller.caller_id_name, '" , number: ', destination.number);
+
local result = { continue = false };
local loop = self.caller.loop_count;
while self.caller:ready() and loop < self.max_loops do
@@ -918,6 +919,7 @@ function Dialplan.run(self, destination)
' - destination: ', destination.type, '=', destination.id, '/', destination.uuid,'@', destination.node_id,
', number: ', destination.number);
+ self.caller:set_variable('gs_clir', self.caller.clir);
self.caller:set_variable('gs_destination_type', destination.type);
self.caller:set_variable('gs_destination_id', destination.id);
self.caller:set_variable('gs_destination_uuid', destination.uuid);
diff --git a/misc/freeswitch/scripts/dialplan/functions.lua b/misc/freeswitch/scripts/dialplan/functions.lua
index c104f89..9a89857 100644
--- a/misc/freeswitch/scripts/dialplan/functions.lua
+++ b/misc/freeswitch/scripts/dialplan/functions.lua
@@ -31,7 +31,7 @@ function Functions.dialplan_function(self, caller, dialed_number)
local fid = tostring(parameters[2]);
local result = { continue = false, code = 404, phrase = 'Function not found', no_cdr = true };
- self.log:debug('DIALPLAN_DUNCTION - execute: ', dialed_number);
+ self.log:debug('DIALPLAN_FUNCTION - execute: ', dialed_number);
if fid == "ta" then
result = self:transfer_all(caller, parameters[3]);