diff --git a/app/voicemails/app_config.php b/app/voicemails/app_config.php index 74385608eb..30f885816c 100644 --- a/app/voicemails/app_config.php +++ b/app/voicemails/app_config.php @@ -92,6 +92,10 @@ $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "voicemail_sms_edit"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "voicemail_local_after_email"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; diff --git a/app/voicemails/voicemail_edit.php b/app/voicemails/voicemail_edit.php index 220c7875eb..6c8ab96d96 100644 --- a/app/voicemails/voicemail_edit.php +++ b/app/voicemails/voicemail_edit.php @@ -553,7 +553,7 @@ echo "\n"; echo "\n"; - if (permission_exists('sms_edit')) { + if (permission_exists('voicemail_sms_edit')) { echo "\n"; echo "\n"; echo " ".$text['label-voicemail_sms_to']."\n"; diff --git a/resources/install/scripts/app/voicemail/resources/functions/send_sms.lua b/resources/install/scripts/app/voicemail/resources/functions/send_sms.lua index 63c93f1051..fec3c02b2f 100644 --- a/resources/install/scripts/app/voicemail/resources/functions/send_sms.lua +++ b/resources/install/scripts/app/voicemail/resources/functions/send_sms.lua @@ -77,7 +77,9 @@ message_length_formatted = format_seconds(message_length); if (debug["info"]) then freeswitch.consoleLog("notice", "[voicemail-sms] message length: " .. message_length .. "\n"); - freeswitch.consoleLog("notice", "[voicemail-sms] transcription: " .. transcription .. "\n"); + if (transcription ~= nil) then + freeswitch.consoleLog("notice", "[voicemail-sms] transcription: " .. transcription .. "\n"); + end freeswitch.consoleLog("notice", "[voicemail-sms] domain_name: " .. domain_name .. "\n"); end local message_date = os.date("%A, %d %b %Y %I:%M %p", created_epoch)