Use DeleteVoiceMessage to delete a voice message from a mailbox and clear the message information from the workspace.
The message to be deleted must first be retrieved by CheckVoiceMessages. When a message is retrieved, then deleted, the status of the message changes to Deleted in the list of retrieved messages.
DeleteVoiceMessage deletes the current message based on the following criteria:
Since DeleteVoiceMessage clears the workspace, any newly recorded or annotated message will be irretrievably lost. To avoid losing recorded messages in this way, ensure that SendVoiceMessage always follows RecordVoiceMessage.
If the sender requested acknowledgment of the message (using the Receipt Acknowledgment parameter of ChangeMessageAttributes), and the recipient did not play the message before deleting it, the message is sent to the sender’s mailbox as a New message and the Message : Receipt acknowledgment status system variable (SV161) has a value of 3, which indicates that the message was received but not listened to.
No parameters are required. This action deletes the message identified by the value in the Message : Message number system variable (SV21).
DeleteVoiceMessage can have one of the following results:
When using an ASCII editor, code this action as the example demonstrates:
label: "Check Edges" DeleteVoiceMessage() edge EDGE_DELETE_VCE_SUCCESSFUL: successful edge EDGE_DELETE_VCE_UNSUCCESSFUL: unsuccessful edge EDGE_DELETE_VCE_NO_VOICE: no_voice ;
The edges are described above under "Possible results". For more information, see Testing a state table using the debugger.