Confirming voicemail deletions in ARI?

aaelghat

Member
Joined
Dec 4, 2007
Messages
40
Reaction score
0
Hi, when people currently delete voicemails using the ARI interface, there is no "Are you sure you want to delete?" message. Let's say I wanted to add one... I found the relevant code in voicemail.module (see below), but what would the syntax be for adding a confirm/delete dialogue box?


Thanks in advance.

Code:
// get files
    $files = array();
    foreach($_REQUEST as $key => $value) {
      if (preg_match('/selected/',$key)) {
        array_push($files, $value);
      }
    }
      if ($a=='delete') {
      $this->deleteVoicemailData($files);
    }
    else if ($a=='move_to') {
      $folder_rx = getArgument($args,'folder_rx');
      if ($folder_rx=='') {
        $_SESSION['ari_error']
          = _("A folder must be selected before the message can be moved.");
      }
      else {
        $context = $_SESSION['ari_user']['context'];
        $extension = $_SESSION['ari_user']['extension'];
        $this->moveVoicemailData($files, $context, $extension, $folder_rx);
      }
    }
    else if ($a=='forward_to') {
        $mailbox_rx = getArgument($args,'mailbox_rx');
      list($context_rx,$extension_rx) = split('/',$mailbox_rx);
      if ($extension_rx=='') {
        $_SESSION['ari_error']
          = _("An extension must be selected before the message can be forwarded.");
      }
      else {
        $folder_rx = $ASTERISK_VOICEMAIL_FOLDERS[0]['folder'];
        $this->moveVoicemailData($files, $context_rx, $extension_rx, $folder_rx);
      }
    }
 

Members online

No members online now.

Forum statistics

Threads
26,687
Messages
174,411
Members
20,257
Latest member
Dempan
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top