From 29eb5c09076e2966224d7653146ea06f066481b0 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 12 Jun 2013 18:27:14 +0200 Subject: settings can be nil --- misc/freeswitch/scripts/dialplan/sip_call.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'misc') diff --git a/misc/freeswitch/scripts/dialplan/sip_call.lua b/misc/freeswitch/scripts/dialplan/sip_call.lua index 256508a..1966a41 100644 --- a/misc/freeswitch/scripts/dialplan/sip_call.lua +++ b/misc/freeswitch/scripts/dialplan/sip_call.lua @@ -179,16 +179,16 @@ function SipCall.fork(self, destinations, arg ) local asserted_identity_clir = tostring(gateway.settings.asserted_identity); local caller_id_number = destination.caller_id_number or self.caller.caller_id_number; local caller_id_name = destination.caller_id_name or self.caller.caller_id_name; - local from_uri = common.array.expand_variables(gateway.settings.from, destination, self.caller, { gateway = gateway }); + local from_uri = common.array.expand_variables(gateway.settings.from or '', destination, self.caller, { gateway = gateway }); if gateway.settings.asserted_identity then - local identity = common.array.expand_variables(gateway.settings.asserted_identity, destination, self.caller, { gateway = gateway }) + local identity = common.array.expand_variables(gateway.settings.asserted_identity or '', destination, self.caller, { gateway = gateway }) if self.caller.clir then caller_id_number = self.caller.anonymous_number or 'anonymous'; caller_id_name = self.caller.anonymous_name or 'Anonymous'; - from_uri = common.array.expand_variables(gateway.settings.from_clir, destination, self.caller, { gateway = gateway }) or from_uri; - identity = common.array.expand_variables(gateway.settings.asserted_identity_clir, destination, self.caller, { gateway = gateway }) or identity; + from_uri = common.array.expand_variables(gateway.settings.from_clir or '', destination, self.caller, { gateway = gateway }) or from_uri; + identity = common.array.expand_variables(gateway.settings.asserted_identity_clir or '', destination, self.caller, { gateway = gateway }) or identity; table.insert(origination_variables, "origination_caller_id_number='" .. caller_id_number .. "'"); table.insert(origination_variables, "origination_caller_id_name='" .. caller_id_name .. "'"); table.insert(origination_variables, "sip_h_Privacy='id'"); -- cgit v1.2.3