From acda022e259700a0957581c113c02bea6b819bb7 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Tue, 16 Feb 2016 13:05:25 -0700 Subject: [PATCH] Company directory allow only setting the first or last name. --- resources/install/scripts/directory.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/resources/install/scripts/directory.lua b/resources/install/scripts/directory.lua index f0f6ab8ac2..b59d74bcc5 100644 --- a/resources/install/scripts/directory.lua +++ b/resources/install/scripts/directory.lua @@ -211,7 +211,7 @@ --end if (search_dtmf_digits == row.last_name_digits) or (search_dtmf_digits == row.first_name_digits) then - if (row.first_name and row.last_name) then + if (row.first_name) then --play the recorded name if (storage_type == "base64") then sql = [[SELECT * FROM v_voicemails @@ -241,7 +241,9 @@ --announce the first and last names session:execute("say", "en name_spelled iterated "..row.first_name); --session:execute("sleep", "500"); - session:execute("say", "en name_spelled iterated "..row.last_name); + if (row.last_name ~= nil) then + session:execute("say", "en name_spelled iterated "..row.last_name); + end end end); elseif (storage_type == "http_cache") then @@ -258,8 +260,10 @@ else --announce the first and last names session:execute("say", "en name_spelled iterated "..row.first_name); - --session:execute("sleep", "500"); - session:execute("say", "en name_spelled iterated "..row.last_name); + if (row.last_name ~= nil) then + --session:execute("sleep", "500"); + session:execute("say", "en name_spelled iterated "..row.last_name); + end end end