summaryrefslogtreecommitdiff
path: root/misc/freeswitch
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-03-21 15:25:03 +0100
committerPeter Kozak <spag@golwen.net>2013-03-21 15:25:03 +0100
commitc60844ed7d0cbc2c1fa417e41d0c7be90adf68cd (patch)
treeee3fe3d8d8f19c3f065c4df2cdaafd16c740c703 /misc/freeswitch
parent1e43dc850a3b8bfb9a2df59e2575094baf5c9426 (diff)
preserve caller_id
Diffstat (limited to 'misc/freeswitch')
-rw-r--r--misc/freeswitch/scripts/dialplan/dialplan.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/misc/freeswitch/scripts/dialplan/dialplan.lua b/misc/freeswitch/scripts/dialplan/dialplan.lua
index 63158d9..5335328 100644
--- a/misc/freeswitch/scripts/dialplan/dialplan.lua
+++ b/misc/freeswitch/scripts/dialplan/dialplan.lua
@@ -894,11 +894,18 @@ function Dialplan.run(self, destination)
self.caller:set_variable('sound_prefix', common.array.try(self.config, 'sounds.' .. tostring(self.caller.language)));
self.log:info('DIALPLAN start - caller_id: ',self.caller.caller_id_number, ' "', self.caller.caller_id_name, '" , number: ', destination.number, ', language: ', self.caller.language);
+
+ self.caller.static_caller_id_number = self.caller.caller_id_number;
+ self.caller.static_caller_id_name = self.caller.caller_id_name;
+
local result = { continue = false };
local loop = self.caller.loop_count;
while self.caller:ready() and loop < self.max_loops do
loop = loop + 1;
self.caller.loop_count = loop;
+
+ self.caller.caller_id_number = self.caller.static_caller_id_number;
+ self.caller.caller_id_name = self.caller.static_caller_id_name;
self.log:info('LOOP ', loop,
' - destination: ', destination.type, '=', destination.id, '/', destination.uuid,'@', destination.node_id,