diff options
author | spag <spag@golwen.net> | 2013-01-18 09:47:04 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-01-18 09:47:04 +0100 |
commit | 59b51b24e78a58ecd76baee530531df64ff3f668 (patch) | |
tree | 724bdf98f659d9755667e383ddbe8c82893c035e /misc | |
parent | 808c04b5b1776927dc7b854bb2a69d34b287c24c (diff) |
set channel variables/headers
Diffstat (limited to 'misc')
-rw-r--r-- | misc/freeswitch/scripts/dialplan/sip_call.lua | 6 |
1 files changed, 6 insertions, 0 deletions
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 |