Makes a recording over the phone.
@phone::record(String playType, String fileName[, String eventDomain][, int maxLength [, boolean trimSilence]][, String language])
None
The following example illustrates a script used to manage recordings. This script is called when a user adds a recording using the web user interface and initiates a call-out to record the message. Note that you can end the recording by pressing any key.
IF (!exists($voiceMessageLanguage))
$language = $recipient.language
ENDIF
$recordingType = "PHRASE"
$recordingFileName = "SampleRecording"
$recordingDomain = "messaging"
@phone::clearDtmf()
@phone::play("phrase", "BEGIN RECORDING AFTER THE BEEP")
$recordDone = false
WHILE (!$recordDone)
@phone::record($recordingType, $recordingFileName, $recordingDomain, $language)
$recordTry = 1
$recordAccepted = false
WHILE (($recordTry <= 3) && (!$recordAccepted))
@phone::play("phrase", "ToReviewRecording")
@phone::play("phrase", "Press1")
@phone::play("phrase", "ToReRecord")
@phone::play("phrase", "Press2")
@phone::play("phrase", "ToAcceptRecording")
@phone::play("phrase", "Press3")
$key = @phone::getDigits(1, 5, "")
@phone::clearDtmf()
IF ($key == "")
# timeout
$recordTry = $recordTry + 1
ELSE-IF ($key == "1")
GOSUB PlaySelectedRecording
sleep(1)
ELSE-IF ($key == "2")
# just go to the outer loop
$recordAccepted = true
ELSE-IF ($key == "3")
$recordAccepted = true
$recordDone = true
sleep(1)
ENDIF
ENDWHILE
ENDWHILE
Note: If you are adding a recording to a Scenario, use the @phone::recordVoiceMessage method.