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:
@@ -877,14 +877,32 @@ jQuery(document).ready(function($) {
|
||||
// console.log('Processing IVR options - raw data:', data);
|
||||
data.options = {};
|
||||
for (var i = 0; i < data.digit.length; i++) {
|
||||
// Get the appropriate target value based on action type
|
||||
var targetValue = data.target[i];
|
||||
var option = {
|
||||
action: data.action[i],
|
||||
description: data.description[i],
|
||||
number: data.target[i],
|
||||
queue_name: data.target[i],
|
||||
message: data.target[i]
|
||||
number: '',
|
||||
queue_name: '',
|
||||
message: ''
|
||||
};
|
||||
|
||||
// Set the appropriate field based on action type
|
||||
switch(data.action[i]) {
|
||||
case 'forward':
|
||||
option.number = targetValue;
|
||||
break;
|
||||
case 'queue':
|
||||
option.queue_name = targetValue;
|
||||
break;
|
||||
case 'voicemail':
|
||||
option.message = targetValue;
|
||||
break;
|
||||
case 'message':
|
||||
option.message = targetValue;
|
||||
break;
|
||||
}
|
||||
|
||||
// console.log('Processing option', i, '- action:', data.action[i], 'target:', data.target[i]);
|
||||
|
||||
// For queue action, get the actual queue name from the select option text
|
||||
|
Reference in New Issue
Block a user