From b288b03bee95dac7b8eec430242a0d32a0fb4780 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Mon, 27 May 2013 15:37:22 +0000 Subject: [PATCH] Caller id prefix prevent error if caller_id_name is not provided. --- includes/install/scripts/ivr_menu.lua | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/includes/install/scripts/ivr_menu.lua b/includes/install/scripts/ivr_menu.lua index ef6b80af5d..ed72c3ee6d 100644 --- a/includes/install/scripts/ivr_menu.lua +++ b/includes/install/scripts/ivr_menu.lua @@ -94,13 +94,12 @@ end); --set the caller id name - caller_id_name = session:getVariable("caller_id_name"); - effective_caller_id_name = session:getVariable("effective_caller_id_name"); - if (string.len(ivr_menu_cid_prefix) > 0) then - caller_id_name = ivr_menu_cid_prefix .. "#" .. caller_id_name; - effective_caller_id_name = ivr_menu_cid_prefix .. "#" .. effective_caller_id_name; - session:setVariable("caller_id_name", caller_id_name); - session:setVariable("effective_caller_id_name", effective_caller_id_name); + if (caller_id_name) then + if (string.len(ivr_menu_cid_prefix) > 0) then + caller_id_name = ivr_menu_cid_prefix .. "#" .. caller_id_name; + session:setVariable("caller_id_name", caller_id_name); + session:setVariable("effective_caller_id_name", caller_id_name); + end end --get the sounds dir, language, dialect and voice