Records and attaches a voice message to this phone script object.
@phone::recordVoiceMessage(String language)
(String) language: The language in which the voice message will be recorded.
None
The following example illustrates how the recordVoiceMessage method can be used to record a call-in User's voice message and attach it to a Fast Access Scenario before launching it. (Note that this process differs from the @phone::record method used to manage and store the recordings played by xMatters.)
IF (!exists($voiceMessageLanguage))
$voiceMessageLanguage = $recipient.language
ENDIF
# Record the voice message
@phone::clearDtmf()
@phone::play("phrase", "RecordAfterTheBeep")
@phone::recordVoiceMessage($voiceMessageLanguage)
# Allow the user to review the recording
$recordDone = false
$recordRetry = 3
WHILE (($recordRetry > 0) && (!$recordDone))
@phone::clearDtmf()
$recordingExists = @phone::isVoiceMessage()
@phone::clearDtmf()
IF ($recordingExists)
@phone::play("phrase", "ToReviewVoiceMessage")
@phone::play("phrase", "Press1")
@phone::play("phrase", "ToDeleteVoiceMessage")
@phone::play("phrase", "Press2")
ENDIF
@phone::play("phrase", "ToReplaceVoiceMessage")
@phone::play("phrase", "Press3")
@phone::play("phrase", "ToSend")
@phone::play("phrase", "Press4")
$subKey = @phone::getDigits(1, 5, "")
@phone::clearDtmf()
# Process the selection
IF (($recordingExists) && ($subKey == "1"))
@phone::playVoiceMessage()
$recordRetry = 3
ELSE-IF (($recordingExists) && ($subKey == "2"))
@phone::deleteVoiceMessage()
@phone::play("phrase", "MessageRemoved")
$recordRetry = 3
ELSE-IF ($subKey == "3")
# Re-record the message
@phone::recordVoiceMessage($voiceMessageLanguage)
$recordRetry = 3
ELSE-IF ($subKey == "4")
# Send as is
$recordDone = true
ELSE
# Invalid key or timeout
$recordRetry = $recordRetry - 1
ENDIF
ENDWHILE