diff options
author | Peter Kozak <spag@golwen.net> | 2013-06-12 09:19:38 +0200 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-06-12 09:19:38 +0200 |
commit | f024d2383255847847de9cba4f1aa454a207de84 (patch) | |
tree | c155d68d46e772bec555acd59ebbda9fa185ae25 | |
parent | 2834eec92f1c92e6a80e5e1e4f5a78f50672c7a8 (diff) |
set_caller_id removed
-rw-r--r-- | misc/freeswitch/scripts/dialplan/dialplan.lua | 10 |
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); |