Provider
Asynchronous
No Custom Parameters
Records audio from a connection or conference.
The Record action allows one to convert the voice stream of either a single connection or an entire conference into a WAV or VOX file. A connection can be recorded whether it is in or out of a conference.
Recorded files are placed into the root of the media engine audio path, which by default is C:\Program Files\Cisco Systems\Unified Application Environment\MediaServer\Audio.
The termination condition parameters on the action are a means to create a matrix of reasons that the action should stop successfully. In the Record_Complete event, one can use TerminationCondition to determine why the command stopped recording.
The Record action will analyze the Filename action parameter (if specified) to determine if it is a full path. If it is a full path and assuming the path does indeed exist on the OS filesystem, the Record action will place the recording there. Note that when a full path is specified, the media engine will not automatically expire the file, regardless of the value of the Expires parameter. If the filename is simply a file name (no path), or if it is not specified and the name is generated by the media engine automatically, then the media engine will concat the base audio path and the filename; the Record action will place the recording in this location.
The following properties cover most allowable audio file formats that can be recorded by the media engine: sample rate of 6, 8, 11, sample size of 4, 8, and 16 bit, and encoding types of ulaw, alaw, pcm, and adpcm. Only mono vox and wav files are allowed.
A Record to a connection or a conference results in a voice resource being utilized until the action results in Record_Complete event.
If a connection is specified as the recepient of the Record, the voice resource attaches to the connection. If a conference is specified as the recepient of the Record, a new connection (which uses a conference resource) is created and added to the conference for the duration of the Record, and the voice resource is attached to that new connection. It is important to understand this behavior, as the ConnectionId result data will always be the connection to which the Record voice resource is attached. In other words, in the case of a Record to a connection, the value of the ConnectionId result data is the same as that specified as an action parameter. In the case of a Record to a conference, the value of the ConnectionId result data is the value of the new connection added to conference which is only a valid value for the duration of the Record. In either case, this result data ConnectionId is what one would later specify in StopMediaOperation.
| Parameter Name | .NET Type | Default | Description |
|---|---|---|---|
| TermCondNonSilence | System.UInt32 | The amount of non-silence (in milliseconds) to observe before terminating the Record operation.
If this condition is met, the Record command will result in the Record_Complete event with a
TerminationCondition of nonsilence. | |
| TermCondMaxTime | System.UInt32 | The amount of time (in milliseconds) that can elapse before terminating the Record operation.
If this condition is met, the Record command will result in the Record_Complete event with a
TerminationCondition of maxtime. | |
| State | System.String | Optional user state information which is guaranteed present as the State event parameter in
Record_Complete or Record_Failed. | |
| Filename | System.String | The name of the audo file to create.
If not specified, the media engine will generate a random file name, which is obtainable through either the result data FileName or in the Record_Complete event via the Filename event parameter. | |
| ConnectionId | System.String | The connection to perform the Record on. If specified, ConferenceId must not be specified. | |
| ConferenceId | System.String | The conference to perform the Record on. If specified, ConnectionId must not be specified. | |
| TermCondDigit | System.String | A specific digit that will cause the Record operation to terminate.
If this condition is met, the Record command will result in the Record_Complete event with a
TerminationCondition of digit.
If you wish to know what digit or digits were pushed, use GatherDigits after Record_Complete, which will process the digits collected into the digit buffer as the Record command was executing. Note that this termination condition is only valid if one is recording a ConnectionId. | |
| TermCondSilence | System.UInt32 | The amount of silence (in milliseconds) to observe before terminating the Record operation.
If this condition is met, the Record command will result in the Record_Complete event with a
TerminationCondition of silence. | |
| Timeout | System.Int32 | The Timeout property specifies to the Application Runtime Environment how long
to wait for a response from the provider for the current action.
The ReturnValue returned in this case is Timeout. The value must be a literal value in milliseconds. | |
| AudioFileSampleRate | System.UInt32 | The sample rate of the audio file (in kHz).
Valid values are 6, 8, or 11. 11 should be avoided as it has a higher impact on the media engine. If not specified, the media engine configuration file defines the sample rate to use, which by default is 8. | |
| AudioFileSampleSize | System.UInt32 | The sample size used in the audio file (in bits).
Valid values are 4, 8, or 16. 4 and 16 should be avoided as both have a higher impact on the media engine. If not specified, the media engine configuration file defines the sample size to use, which by default is 8. | |
| AudioFileEncoding | System.String | The encoding of the audio file: ulaw, alaw, pcm, or adpcm.
Pcm and adpcm should be avoided as each has a higher impact on the media engine. If not specified, the media engine configuration file defines the file encoding to use, which by default is ulaw. | |
| AudioFileFormat | System.String | The format of the audio file: wav or vox. If not specified, the media engine configuration file defines the file format to use, which by default is vox. | |
| CommandTimeout | System.UInt32 | Indicates a command timeout value (in milliseconds).
If this condition is met, the Record command will result in the Record_Complete event with a
TerminationCondition of timeout. | |
| Expires | System.UInt32 | 1 | The number of days until the file is automatically deleted from the server. A value of 0 will indicate that the file should never be deleted by the media engine. |
| Parameter Name | .NET Type | Description |
|---|---|---|
| ConnectionId | System.String | In the case of a Record to a connection,
the value of the ConnectionId result data is the same as that specified as an action parameter.
In the case of a Record to a conference,
the value of the ConnectionId result data is the value of the new connection added to conference.
In either case, this ConnectionId is what one would later specify in
StopMediaOperation if one were to abort the command programmatically. |
| Filename | System.String | The filename used to save the recording. The filename is relative to the root of the media engine audio path. |
| Url | System.String | The URL to the recorded audio file. |
| ResultCode | System.String | A numeric code indicating the result status of the operation. A '0' indicates success; a positive number indicates an error. Please reference the Media Control Error Codes table for descriptions on specific error codes. |
| OperationId | System.String | A unique identifier to this Record operation. This identifier can later be used by the
StopMediaOperation
action to stop just this particular operation on a connection, even if multiple media operations are concurrently executing on that connection.
In the case that the Record was specified to a conference, there is no reason to store OperationId,
since the ConnectionId returned as a result data will only ever have this Record action operating on it. |
Branch Conditions
No description.
No description.
No description.