diff options
author | Peter Kozak <spag@golwen.net> | 2013-03-27 08:20:46 +0100 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-03-27 08:20:46 +0100 |
commit | 8e9f9fd6f76356c18f43a1a1526e5a5ac40bb1f5 (patch) | |
tree | 552ec856fee6a6ac9c2ff37ba537b29fd28ecbd7 | |
parent | b2bfc8a3f6a826c1c0b2bd10213c11439df11aad (diff) |
deletion of last message fixed
-rw-r--r-- | misc/freeswitch/scripts/dialplan/voicemail.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/misc/freeswitch/scripts/dialplan/voicemail.lua b/misc/freeswitch/scripts/dialplan/voicemail.lua index 4fd5612..522f9c2 100644 --- a/misc/freeswitch/scripts/dialplan/voicemail.lua +++ b/misc/freeswitch/scripts/dialplan/voicemail.lua @@ -275,11 +275,6 @@ function Voicemail.menu_messages(self, folder, messages) index = index + 1; end - if index > #messages then - digits, key = self.ivr:ivr_phrase('voicemail_no_messages', message_menu, 0, 0); - return; - end - if key.action == 'delete' and self:message_delete(message) then self.caller:send_display('Message deleted'); digits = self.caller.session:sayPhrase('voicemail_ack', 'deleted'); @@ -287,6 +282,9 @@ function Voicemail.menu_messages(self, folder, messages) self.caller:send_display('Message saved'); digits = self.caller.session:sayPhrase('voicemail_ack', 'saved'); end + if index > #messages then + digits = self.ivr:ivr_phrase('voicemail_no_messages', message_menu, 0, 0); + end end end |