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') 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