summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/dialplan/dialplan.lua
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-06-12 09:19:38 +0200
committerPeter Kozak <spag@golwen.net>2013-06-12 09:19:38 +0200
commitf024d2383255847847de9cba4f1aa454a207de84 (patch)
treec155d68d46e772bec555acd59ebbda9fa185ae25 /misc/freeswitch/scripts/dialplan/dialplan.lua
parent2834eec92f1c92e6a80e5e1e4f5a78f50672c7a8 (diff)
set_caller_id removed
Diffstat (limited to 'misc/freeswitch/scripts/dialplan/dialplan.lua')
-rw-r--r--misc/freeswitch/scripts/dialplan/dialplan.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/misc/freeswitch/scripts/dialplan/dialplan.lua b/misc/freeswitch/scripts/dialplan/dialplan.lua
index f96f857..913d7a5 100644
--- a/misc/freeswitch/scripts/dialplan/dialplan.lua
+++ b/misc/freeswitch/scripts/dialplan/dialplan.lua
@@ -370,8 +370,6 @@ function Dialplan.dial(self, destination)
end
end
self.caller:set_caller_id(destination.caller_id_number, destination.caller_id_name or self.caller.caller_id_name);
- else
- self.caller:set_caller_id('anonymous', 'Unknown');
end
local destinations = { destination };
@@ -416,7 +414,7 @@ function Dialplan.huntgroup(self, destination)
self:set_caller_picture(self.caller.account.owner.id, self.caller.account.owner.class);
end
else
- self.caller:set_caller_id('anonymous', tostring(hunt_group.record.name));
+ self.caller.anonymous_name = tostring(hunt_group.record.name);
end
self.caller.auth_account = hunt_group;
@@ -446,7 +444,7 @@ function Dialplan.acd(self, destination)
self:set_caller_picture(self.caller.account.owner.id, self.caller.account.owner.class);
end
else
- self.caller:set_caller_id('anonymous', tostring(acd.record.name));
+ self.caller.anonymous_name = tostring(acd.record.name);
end
self.caller.auth_account = acd;
@@ -814,6 +812,10 @@ function Dialplan.run(self, destination)
self.caller.date = os.date('%y%m%d%w');
self.caller.time = os.date('%H%M%S');
+ if self.config then
+ self.caller:export_variable('sip_cid_type=' .. (self.config.sip_cid_type or 'none'));
+ end
+
if type(self.config.variables) == 'table' then
for key, value in pairs(self.config.variables) do
self.caller:set_variable(key, value);