voicemail

The Voicemail records a message from the caller and sends the recording in an email attachment to a Contact specified in the attributes.

Structure

The voicemail Rule has the following elements which are described in the XML below. The different parts are:

  • voicemailMessage: This is the welcome message in the Voicemail. e.g. "Hello! Thanks for calling, I cannot answer right now. Please leave your message after the beep". This is required in the voicemailMessage
  • completedMessage: Once the message has been recorded you can have a message to confirm the end of the recording. e.g. "Thanks for leaving your message. Goodbye!". This message will play after an amount of seconds of silence.
<voicemail id="voicemail_1" label="Voicemail" from="noreply@iovox.com" fromName="IOVOX Team" subject="Voicemail" silence="2" maxDuration="300" templateName="emailtemplate02" destinationEmailAddress="?" destinationContactId="?">
    <voicemailMessage>
        <!-- messageParts -->
    </voicemailMessage>
    <completedMessage>
        <!-- messageParts -->
    </completedMessage>
</voicemail>

Learn more about the messageParts.

There are attributes which will be defined in the table below.

Attribute Description Mandatory Default
from This will specify the email address from which the email will be sent from. e.g. "noreply@iovox.com" YES N/A
fromName This is the name portion of the email address from which the message is sent e.g. "IOVOX Team" NO (Empty)
subject The subject for the email you will send. e.g. "This is a new Voicemail" YES N/A
silence The number of seconds of silence to wait before completeting the recording YES N/A
maxDuration The max time in seconds that the voicemail recording can last. YES N/A
templateName The name of the template that contains the HTML for the email YES N/A
destinationEmailAddress The email address of the contact to which the email will be sent. This can be a fix value, or a variable value (?) YES N/A
destinationContactId The Contact ID of the contact to which the email will be sent. This can be a fix value or a variable value (?) YES N/A
destinationContactName The name of the contact to which the email will be sent. This can be a fix value or a variable value (?) YES N/A

Examples

Basic Voicemail Rule

The XML below will send an email, with the voicemail attached, to the specified fixed contact.

<voicemail id="voicemail_1" label="Voicemail" from="noreply@iovox.com" fromName="IOVOX Team" subject="You have a Voicemail" silence="2" maxDuration="300" templateName="basicTemplate" destinationEmailAddress="business@iovox.com" destinationContactId="1">
    <voicemailMessage>
        <soundFile soundLabel="Welcome to my VoiceMail!"/>
    </voicemailMessage>
</voicemail>

Basic Voicemail with a Variable Contact

In this example the destination contact for the email is set as variable (denoted by question mark). When the template is applied the contact will have to be sent.

<voicemail id="voicemail_1" label="Voicemail" from="noreply@iovox.com" fromName="CallingRulesV3Testing" subject="IOVOX Enterprise Voicemail" silence="2" maxDuration="300" templateName="emailtemplate02" destinationEmailAddress="?" destinationContactId="?">
    <voicemailMessage>
        <soundFile soundLabel="Welcome to my VoiceMail!"/>
    </voicemailMessage>
</voicemail>

To read more information on Variable Contacts, read the documentation of the call rule.

Voicemail with completed message

This last example makes use of the completedMessage element to specify a message to the caller once teh recording has been successfully taken. This happens once the caller presses hash (#) to complete the message, or the total silence, or total duration, limit is reached.

<voicemail id="voicemail_1" label="Voicemail" from="noreply@iovox.com" fromName="CallingRulesV3Testing" subject="IOVOX Enterprise Voicemail" silence="2" maxDuration="300" templateName="emailtemplate02" destinationEmailAddress="?" destinationContactId="?">
    <voicemailMessage>
        <soundFile soundLabel="Welcome to my VoiceMail!"/>
    </voicemailMessage>
    <completedMessage>
        <soundFile soundLabel="Thanks for your Voicemail, Good Bye!"/>
    </completedMessage>
</voicemail>

Error Result

HTTP Code Error String Resolution
400 Rule ID Empty Set the value of the id attribute
400 Rule Label Empty Set the value of the label attribute
400 Attribute templateName missing Add the attribute templateName
400 Attribute maxDuration missing Add the attribute maxDuration
400 From Empty Set a value for the from attribute
400 Voicemail Template Empty Set the value of the templateName attribute
400 Maximum Duration Empty Set the value of the macDuration attribute
400 You need to select a Contact The contact is not been set in the Voicemail Rule
400 Sound File Does not exist in Voicemail Message Correct the sound files in the Voicemail Message child element
400 Sound File Does not exist in Completed Message Correct the sound files in the Completed Message child element
400 Voicemail Template Invalid Correct the templateName attribute to one that exists in your account (or a default one)
400 Contact cannot have Variable and Fix details at the same time The contact details cannot have variables values and fixed values at the same time. Please correct the attributes related to the contact
400 Phone Number Invalid Correct the value of the destinationPhoneNumber attribute
400 Destination Contact does not exist The destination Contact does not exist
400 From Name Empty Set a value for the fromName attribute
400 Subject Empty Set a value for the subject attribute
400 Record Label Empty Set a value for the recordLabel attribute