From cd6481ed1af0909ea50ea4afab465943e4d32ae6 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 8 Oct 2016 09:52:21 -0600 Subject: [PATCH] Update macro.lua --- .../app/voicemail/resources/functions/macro.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/install/scripts/app/voicemail/resources/functions/macro.lua b/resources/install/scripts/app/voicemail/resources/functions/macro.lua index 2207ac8d67..2ab2b65d00 100644 --- a/resources/install/scripts/app/voicemail/resources/functions/macro.lua +++ b/resources/install/scripts/app/voicemail/resources/functions/macro.lua @@ -1,5 +1,5 @@ -- Part of FusionPBX --- Copyright (C) 2013 Mark J Crane +-- Copyright (C) 2013 - 2016 Mark J Crane -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -12,7 +12,7 @@ -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- --- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +-- THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, @@ -41,10 +41,12 @@ if (name == "person_not_available_record_message") then table.insert(actions, {app="streamFile",data="voicemail/vm-person.wav"}); --pronounce the voicemail_id - if (voicemail_alternate_greet_id) then + if (voicemail_alternate_greet_id and string.len(voicemail_alternate_greet_id) > 0) then table.insert(actions, {app="say.number.iterated",data=voicemail_alternate_greet_id}); - else + elseif (voicemail_greet_id and string.len(voicemail_greet_id) > 0) then table.insert(actions, {app="say.number.iterated",data=voicemail_greet_id}); + else + table.insert(actions, {app="say.number.iterated",data=voicemail_id}); end table.insert(actions, {app="streamFile",data="voicemail/vm-not_available.wav"}); end