From cd41d91906334f0c87aeaf6698baefb3e8c64190 Mon Sep 17 00:00:00 2001 From: spag Date: Sat, 5 Jan 2013 10:52:33 +0100 Subject: force-convert gateway and number to strings --- misc/freeswitch/scripts/dialplan/sip_call.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc/freeswitch/scripts/dialplan/sip_call.lua') diff --git a/misc/freeswitch/scripts/dialplan/sip_call.lua b/misc/freeswitch/scripts/dialplan/sip_call.lua index 57f92c6..ab6a471 100644 --- a/misc/freeswitch/scripts/dialplan/sip_call.lua +++ b/misc/freeswitch/scripts/dialplan/sip_call.lua @@ -128,7 +128,7 @@ 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 - table.insert(dial_strings, '[' .. table.concat(origination_variables , ',') .. ']sofia/gateway/' .. destination.gateway .. '/' .. destination.number); + table.insert(dial_strings, '[' .. table.concat(origination_variables , ',') .. ']sofia/gateway/' .. tostring(destination.gateway) .. '/' .. tostring(destination.number)); elseif destination.type == 'dial' then if destination.caller_id_number then table.insert(origination_variables, "origination_caller_id_number='" .. destination.caller_id_number .. "'"); -- cgit v1.2.3 From ddb3dfa92ec0878240211cb2b7a8e125961b1360 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 5 Jan 2013 23:01:16 +0100 Subject: Moved to GsParemeter.get and set defaults for a couple of validations. --- misc/freeswitch/scripts/dialplan/sip_call.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'misc/freeswitch/scripts/dialplan/sip_call.lua') diff --git a/misc/freeswitch/scripts/dialplan/sip_call.lua b/misc/freeswitch/scripts/dialplan/sip_call.lua index 57f92c6..ad7188f 100644 --- a/misc/freeswitch/scripts/dialplan/sip_call.lua +++ b/misc/freeswitch/scripts/dialplan/sip_call.lua @@ -65,11 +65,11 @@ end function SipCall.call_waiting_busy(self, sip_account) require 'common.str' if common.str.to_b(sip_account.record.call_waiting) then - self.log:info('CALL_WAITING - status: enabled'); + self.log:info('GsParameter.get('CALL_WAITING') - status: enabled'); return false; else local state = sip_account:call_state(); - self.log:info('CALL_WAITING - status: disabled, sip_account state: ', state); + self.log:info('GsParameter.get('CALL_WAITING') - status: disabled, sip_account state: ', state); return state; end end -- cgit v1.2.3 From b1fb25f0d6ee481cca54f69ed50e6196595ce777 Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 7 Jan 2013 12:57:49 +0100 Subject: fixed single quotes --- misc/freeswitch/scripts/dialplan/sip_call.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'misc/freeswitch/scripts/dialplan/sip_call.lua') diff --git a/misc/freeswitch/scripts/dialplan/sip_call.lua b/misc/freeswitch/scripts/dialplan/sip_call.lua index 0071075..ab6a471 100644 --- a/misc/freeswitch/scripts/dialplan/sip_call.lua +++ b/misc/freeswitch/scripts/dialplan/sip_call.lua @@ -65,11 +65,11 @@ end function SipCall.call_waiting_busy(self, sip_account) require 'common.str' if common.str.to_b(sip_account.record.call_waiting) then - self.log:info('GsParameter.get('CALL_WAITING') - status: enabled'); + self.log:info('CALL_WAITING - status: enabled'); return false; else local state = sip_account:call_state(); - self.log:info('GsParameter.get('CALL_WAITING') - status: disabled, sip_account state: ', state); + self.log:info('CALL_WAITING - status: disabled, sip_account state: ', state); return state; end end -- cgit v1.2.3 From 70ef0ee8e668b0f620ec74afc8347e43bcfebb87 Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 8 Jan 2013 11:15:31 +0100 Subject: update_callee_display option added --- misc/freeswitch/scripts/dialplan/sip_call.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'misc/freeswitch/scripts/dialplan/sip_call.lua') diff --git a/misc/freeswitch/scripts/dialplan/sip_call.lua b/misc/freeswitch/scripts/dialplan/sip_call.lua index ab6a471..95ab0f3 100644 --- a/misc/freeswitch/scripts/dialplan/sip_call.lua +++ b/misc/freeswitch/scripts/dialplan/sip_call.lua @@ -79,6 +79,8 @@ function SipCall.fork(self, destinations, arg ) local dial_strings = {} require 'common.sip_account' + require 'common.str' + local sip_account_class = common.sip_account.SipAccount:new{ log = self.log, database = self.database }; local call_result = { code = 404, phrase = 'No destination' }; @@ -88,6 +90,11 @@ function SipCall.fork(self, destinations, arg ) local origination_variables = { 'gs_fork_index=' .. index } self.log:info('FORK ', index, '/', #destinations, ' - ', destination.type, '=', destination.id, '/', destination.gateway or destination.uuid, '@', destination.node_id, ', number: ', destination.number); + + if not common.str.to_b(arg.update_callee_display) then + table.insert(origination_variables, 'ignore_display_updates=true'); + end + if not destination.node_local or destination.type == 'node' then require 'common.node' local node = nil; -- cgit v1.2.3 From d66a90d64f6c99070c8dde1d12d4de90d7032b49 Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 17 Jan 2013 15:10:34 +0100 Subject: display caller id in fork --- misc/freeswitch/scripts/dialplan/sip_call.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc/freeswitch/scripts/dialplan/sip_call.lua') diff --git a/misc/freeswitch/scripts/dialplan/sip_call.lua b/misc/freeswitch/scripts/dialplan/sip_call.lua index 95ab0f3..1513459 100644 --- a/misc/freeswitch/scripts/dialplan/sip_call.lua +++ b/misc/freeswitch/scripts/dialplan/sip_call.lua @@ -89,7 +89,7 @@ function SipCall.fork(self, destinations, arg ) for index, destination in ipairs(destinations) do local origination_variables = { 'gs_fork_index=' .. index } - self.log:info('FORK ', index, '/', #destinations, ' - ', destination.type, '=', destination.id, '/', destination.gateway or destination.uuid, '@', destination.node_id, ', number: ', destination.number); + self.log:info('FORK ', index, '/', #destinations, ' - ', destination.type, '=', destination.id, '/', destination.gateway or destination.uuid, '@', destination.node_id, ', number: ', destination.number, ', caller_id: "', destination.caller_id_name, '" <', destination.caller_id_number, '>'); if not common.str.to_b(arg.update_callee_display) then table.insert(origination_variables, 'ignore_display_updates=true'); -- cgit v1.2.3 From 59b51b24e78a58ecd76baee530531df64ff3f668 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 18 Jan 2013 09:47:04 +0100 Subject: set channel variables/headers --- misc/freeswitch/scripts/dialplan/sip_call.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'misc/freeswitch/scripts/dialplan/sip_call.lua') diff --git a/misc/freeswitch/scripts/dialplan/sip_call.lua b/misc/freeswitch/scripts/dialplan/sip_call.lua index 1513459..06132ab 100644 --- a/misc/freeswitch/scripts/dialplan/sip_call.lua +++ b/misc/freeswitch/scripts/dialplan/sip_call.lua @@ -135,6 +135,12 @@ 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 destination.channel_variables then + for key, value in pairs(destination.channel_variables) do + self.log:notice('FORK_CHANNEL_VARIABLES: ', tostring(key) .. "='" .. tostring(value) .. "'"); + table.insert(origination_variables, tostring(key) .. "='" .. tostring(value) .. "'"); + end + end table.insert(dial_strings, '[' .. table.concat(origination_variables , ',') .. ']sofia/gateway/' .. tostring(destination.gateway) .. '/' .. tostring(destination.number)); elseif destination.type == 'dial' then if destination.caller_id_number then -- cgit v1.2.3 From 01078d50412183ff4fbeb213643093e6d2cf8714 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 18 Jan 2013 10:08:47 +0100 Subject: log line removed --- misc/freeswitch/scripts/dialplan/sip_call.lua | 1 - 1 file changed, 1 deletion(-) (limited to 'misc/freeswitch/scripts/dialplan/sip_call.lua') diff --git a/misc/freeswitch/scripts/dialplan/sip_call.lua b/misc/freeswitch/scripts/dialplan/sip_call.lua index 06132ab..0b799e5 100644 --- a/misc/freeswitch/scripts/dialplan/sip_call.lua +++ b/misc/freeswitch/scripts/dialplan/sip_call.lua @@ -137,7 +137,6 @@ function SipCall.fork(self, destinations, arg ) end if destination.channel_variables then for key, value in pairs(destination.channel_variables) do - self.log:notice('FORK_CHANNEL_VARIABLES: ', tostring(key) .. "='" .. tostring(value) .. "'"); table.insert(origination_variables, tostring(key) .. "='" .. tostring(value) .. "'"); end end -- cgit v1.2.3 From 8744de13516c3fc2fbf2843e85aff08707f50de1 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Fri, 18 Jan 2013 12:54:45 +0100 Subject: adjust copyright date for 2013 --- misc/freeswitch/scripts/dialplan/sip_call.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc/freeswitch/scripts/dialplan/sip_call.lua') diff --git a/misc/freeswitch/scripts/dialplan/sip_call.lua b/misc/freeswitch/scripts/dialplan/sip_call.lua index 0b799e5..3f56753 100644 --- a/misc/freeswitch/scripts/dialplan/sip_call.lua +++ b/misc/freeswitch/scripts/dialplan/sip_call.lua @@ -1,5 +1,5 @@ -- Gemeinschaft 5 module: sip call class --- (c) AMOOMA GmbH 2012 +-- (c) AMOOMA GmbH 2012-2013 -- module(...,package.seeall); -- cgit v1.2.3