From 9a34bfecca1bb3d6da4af4faa4e8f8c3cf13b153 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 11 Jun 2013 14:55:22 +0200 Subject: privacy and cid_type options added --- misc/freeswitch/scripts/dialplan/sip_call.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'misc/freeswitch/scripts/dialplan') 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) .. "'"); -- cgit v1.2.3