Fix voicemail and queue announcement issues

- Fixed phone agents getting 'Unauthorized' error when accessing voicemails by checking for twp_access_voicemails capability
- Fixed missing ElevenLabs parameter in queue TwiML generation that prevented announcement messages
- Fixed IVR voicemail messages not being saved correctly - now properly assigns message field based on action type
- Added proper permission checks for both ajax_get_voicemail and ajax_get_voicemail_audio functions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-08-13 10:04:20 -07:00
parent 7a539df27a
commit 7beb0aa4f3
3 changed files with 29 additions and 5 deletions

View File

@@ -975,7 +975,8 @@ class TWP_Workflow {
return self::create_voicemail_twiml($action, $elevenlabs);
case 'queue':
return self::create_queue_twiml($action);
$elevenlabs = new TWP_ElevenLabs_API();
return self::create_queue_twiml($action, $elevenlabs);
case 'ring_group':
return self::create_ring_group_twiml($action);