summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/dialplan/sip_call.lua
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-06-11 14:55:22 +0200
committerPeter Kozak <spag@golwen.net>2013-06-11 14:55:22 +0200
commit9a34bfecca1bb3d6da4af4faa4e8f8c3cf13b153 (patch)
treefa8a3be15617ceba0bbd7c824153b4336d88eccb /misc/freeswitch/scripts/dialplan/sip_call.lua
parentc51e4bad9ed2a2e1adaeda94ff1ac983106462f6 (diff)
privacy and cid_type options added
Diffstat (limited to 'misc/freeswitch/scripts/dialplan/sip_call.lua')
-rw-r--r--misc/freeswitch/scripts/dialplan/sip_call.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/misc/freeswitch/scripts/dialplan/sip_call.lua b/misc/freeswitch/scripts/dialplan/sip_call.lua
index f401c5c..66cba0e 100644
--- a/misc/freeswitch/scripts/dialplan/sip_call.lua
+++ b/misc/freeswitch/scripts/dialplan/sip_call.lua
@@ -96,6 +96,18 @@ function SipCall.fork(self, destinations, arg )
table.insert(origination_variables, 'ignore_display_updates=true');
end
+ local origination_privacy = '';
+
+ if self.caller.clir then
+ origination_privacy = 'hide_name:hide_number';
+ end
+
+ if self.caller.account then
+ origination_privacy = origination_privacy .. ':screen';
+ end
+
+ table.insert(origination_variables, 'origination_privacy=' .. origination_privacy);
+
if not destination.node_local or destination.type == 'node' then
require 'common.node'
local node = nil;
@@ -168,6 +180,9 @@ function SipCall.fork(self, destinations, arg )
if destination.caller_id_name then
table.insert(origination_variables, "origination_caller_id_name='" .. destination.caller_id_name .. "'");
end
+ if gateway.settings.sip_cid_type then
+ table.insert(origination_variables, "sip_cid_type='" .. gateway.settings.sip_cid_type .. "'");
+ end
if destination.channel_variables then
for key, value in pairs(destination.channel_variables) do
table.insert(origination_variables, tostring(key) .. "='" .. tostring(value) .. "'");