From 03947a9190faf19d7c9cfd9ba407f051cb5d4888 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 5 Aug 2013 10:23:22 +0200 Subject: constraint_value can be empty --- misc/freeswitch/scripts/common/gateway.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/freeswitch/scripts/common/gateway.lua b/misc/freeswitch/scripts/common/gateway.lua index 9b8e33d..8ea6b04 100644 --- a/misc/freeswitch/scripts/common/gateway.lua +++ b/misc/freeswitch/scripts/common/gateway.lua @@ -360,7 +360,7 @@ function Gateway.origination_variables(self, header_type, origination_variables, for index, header in ipairs(headers) do local search_string = common.array.expand_variable(header.constraint_source, variable_sets); - if common.str.blank(header.constraint_source) or self:constraint_match(header.constraint_value, variable_sets) then + if common.str.blank(header.constraint_value) or self:constraint_match(header.constraint_value, variable_sets) then if header_to_variable[header.header_type] then local origination_variable = header_to_variable[header.header_type][header.name:lower()] or header_to_variable[header.header_type].default .. header.name; table.insert(origination_variables, origination_variable .. "='" .. common.array.expand_variables(header.value, unpack(variable_sets)) .. "'"); -- cgit v1.2.3