The voice messaging subroutines are similar to the voice segment subroutines, but with some additional considerations.
A voice message is tagged in the Blueworx Voice Response database with a unique message ID. If you want to create, delete, or retrieve a voice message, or send it to another mailbox, you will need its message ID. For an existing voice message, you can query this message ID using CA_Get_Voice_Msg_Info(). Before creating a new voice message, you should first call CA_Create_Voice_Msg_Id() to generate a new message ID.
Once you have created a voice message, you must send it to a mailbox within 24 hours. Otherwise, it is automatically deleted from the Blueworx Voice Response database.
To send a voice message to another mailbox, use the CA_Send_Voice_Msg() subroutine. To save an incoming voice message in a mailbox, use CA_Save_Voice_Msg(). You cannot annotate a voice message using custom server subroutines.
When you query a voice message using CA_Get_Voice_Msg_Info(), you need to provide the index number of the message. You can find out how many new, saved, and outgoing messages are in a particular mailbox by calling CA_Get_Profile() for the application profile that owns the mailbox. The messages in each category are indexed sequentially, starting from number 1.
These counts are the same as the numbers displayed in the Message Window for the mailbox. They correspond to the more detailed classification of voice messages by a state table, as follows:
If you wish, you may associate a transaction ID with the voice message when you send it using CA_Send_Voice_Msg(). The transaction ID is a string of your choosing and is not checked or modified by Blueworx Voice Response. When you call CA_Get_Voice_Msg_Info(), you may, optionally, restrict the search to a specific transaction ID. In this case, only messages with that transaction ID are counted in the indexed search.
For more information about voice messaging, see the Blueworx Voice Response for AIX: Application Development using State Tables information.