Interacting with callers and messages

A caller is anyone who dials or calls into the system, for example, to record a message or greeting or listen to a voice message. This caller is represented by the Caller : Profile - ID system variable (SV20), and the mailbox from which voice messages are sent or retrieved for listening is represented by the Caller : Mailbox - ID system variable (SV32). Each voice message is always associated with the Profile ID and Mailbox ID from which it was sent and the Profile ID and Mailbox ID from which it is to be retrieved.

Recorded voice messages are stored in temporary workspace until they are sent to a mailbox. Voice messages can be retrieved from mailboxes to be played, annotated (repeatedly, if required), sent, deleted, saved, or their attributes can be changed before sending them to a specified mailbox. The attributes of a message in a mailbox are defined by the Message system variables, described in the Blueworx Voice Response for AIX: Application Development using State Tables information. The status of a message is stored in the Message : Status system variable (SV47).

Incoming messages are received messages in the recipient's mailbox; the status of incoming messages can be New, Checked, Listened, Saved, or Undeliverable. Outgoing messages are sent messages in the sender's mailbox; the status of outgoing messages can be New or Future.

Recording messages

The RecordVoiceMessage state table action records a message in the workspace. Recording a new message clears the workspace of any existing voice data. RecordVoiceMessage is also used to annotate an existing message, as described in Annotating messages.

After recording, a message is typically sent to a specified mailbox using the SendVoiceMessage state table action.

Sending messages

The SendVoiceMessage state table action sends a message to a mailbox. The message is stored in the recipient's mailbox as a New message, and is added to the sender's outgoing messages. If sent to someone else's mailbox, the message will be kept in the sender's outgoing messages until the recipient checks the message. If the message is future dated (status is Future), the message is not sent to the recipient's mailbox until the specified date and time. SendVoiceMessage is also used to forward messages from one mailbox to another, as described in Forwarding messages.

If the sender requested acknowledgment of the message (using the Receipt Acknowledgment parameter of ChangeMessageAttributes), the message will be sent to the sender's mailbox as a New message when the recipient plays or deletes the message. The Message : Receipt acknowledgment status system variable (SV161) is set to indicate whether the message was listened to or not.

Retrieving messages

The CheckVoiceMessages state table action retrieves a list of messages from a mailbox. Before a message in a mailbox can be played, forwarded, annotated, saved, deleted, or the attributes changed, it must be retrieved from the mailbox by CheckVoiceMessages. When a message is retrieved, the Message system variables are initialized with the message information. Whenever the mailbox is accessed and a New message is counted, SV32 is set and the status of the message is changed to Checked . A retrieved message remains Checked until it is listened to, saved, or deleted.

CheckVoiceMessages can retrieve one of the following categories of messages:

When a list of messages is retrieved, the first message in the list is the current message, which can be played, forwarded, annotated, saved, deleted, or the attributes changed. Once the list is retrieved, subsequent CheckVoiceMessages (Next Message) actions update the current message to the next message in the list. The Message system variables are always initialized with the current message information.

To select a specific message in the list, you can use the AssignData state table action to assign a value to a Message system variable that defines the message you want. For example, to select the third message in a list retrieved by CheckVoiceMessages, you can assign the Message : Message number system variable (SV21) a value of 3. This automatically updates the current message to the third message in the CheckVoiceMessages list.

You can also select a specific message based on the transaction ID of the message. By setting the Message : Transaction ID system variable (SV126) to a value, the list is searched for a message with a transaction ID that matches the value. If the first message in a newly retrieved list matches, that message remains the current message. Subsequent AssignData actions select and refresh the workspace information with subsequent matching messages in the list. In other words, subsequent checks for matches with the same transaction ID begin following the current message, not starting with the current message.

If the sender requested acknowledgment of the message (using the Receipt Acknowledgment parameter of ChangeMessageAttributes), the Message : Receipt acknowledgment status system variable (SV161) has a value of 1.

Playing messages

If the voice message has just been recorded, the PlayVoiceMessage action plays it from the workspace; if the voice message is the current message in the list of retrieved messages, the PlayVoiceMessage action plays it from the mailbox. As soon as the mailbox is accessed, the status of all messages changes from New to Checked. When a message has been played successfully all the way through to the end, the status changes to Listened.

If the sender requested acknowledgment of the message, (using the Receipt Acknowledgment parameter of ChangeMessageAttributes), the message is sent to the sender's mailbox as a New message when the recipient plays the message and the Message : Receipt acknowledgment status system variable (SV161) has a value of 2, which indicates that the message was listened to.

Forwarding messages

After a message has been retrieved from a mailbox, the SendVoiceMessage state table action can be used to forward the message from one mailbox to another. The recipient of a message can forward the message directly to another mailbox or can first change the attributes of a message or annotate the message before forwarding. In all cases, the sender information of the forwarded message reflects the forwarder. The sender information of the original message remains unchanged.

For example, if Jay sends a message to Nick's mailbox, and Nick then forwards it to Daisy, the message in Daisy's mailbox will indicate Nick as the sender. Nick can also record an annotation to the message before sending it to Daisy. Jay's outgoing messages include the original message sent to Nick, but not the annotated message sent by Nick to Daisy. Nick's incoming messages include the original message sent by Jay; his outgoing messages include the message sent to Daisy. Daisy's incoming messages include the message sent by Nick.

Annotating messages

The RecordVoiceMessage state table action can use the options Add To Beginning and Add To End to annotate the message. The message can be a newly recorded message in the workspace or the current message retrieved by CheckVoiceMessages. The same message can be annotated multiple times.

Changing message attributes

The ChangeMessageAttributes state table action sets and changes the attributes of the message in the workspace. The attributes that can be changed are the date it is to be delivered, the security level, urgency level, whether to acknowledge receipt of the message, or transaction ID.

Deleting messages

After a voice message has been retrieved from a mailbox, the DeleteVoiceMessage state table action can be used to change the status of the message in the list to Deleted and clears the Message system variables.

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.

Saving messages

After a voice message has been retrieved from a mailbox, the SaveVoiceMessage state table action can be used to change the status of the message in the mailbox from Checked, Listened, or Undeliverable to Saved.

If you make any changes to a voice message (by using ChangeMessageAttributes or RecordVoiceMessage), you have created a new message, which must be sent to a mailbox. The mailbox can be the sender's own mailbox, or a different mailbox. If sent to the sender's mailbox, the message will be a New incoming message. If sent to someone else's mailbox, the message will be kept in the sender's outgoing messages until the recipient checks the message. Whether a message is sent to the sender's own mailbox or to another mailbox, the message is always added to the sender's outgoing messages list.