Provider
Asynchronous
No Custom Parameters
PlayTone generates a tone to a connection or conference.
PlayTone allows one to mix two frequencies, each with distinct amplitudes, for a specified duration.
A PlayTone to a connection or a conference results in a voice resource being utilized until the action results in the PlayTone_Complete event.
If a connection is specified as the recepient of the PlayTone, the voice resource attaches to the connection. If a conference is specified as the recepient of the PlayTone, a new connection (which uses a conference resource) is created and added to the conference for the duration of the PlayTone, 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 PlayTone voice resource is attached. In other words, in the case of a PlayTone 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 PlayTone 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 PlayTone. In either case, this result data ConnectionId is what one would later specify in StopMediaOperation.
| Parameter Name | .NET Type | Default | Description |
|---|---|---|---|
| State | System.String | Optional user state information which is guaranteed present as the State event parameter in
PlayTone_Complete or PlayTone_Failed. | |
| ConnectionId | System.String | The connection to perform the PlayTone on.
If specified, ConferenceId must not be specified. | |
| ConferenceId | System.String | The conference to perform the PlayTone on.
If specified, ConnectionId must not be specified. | |
| TermCondMaxTime | System.UInt32 | The amount of time (in milliseconds) that can elapse before terminating the PlayTone operation.
If this condition is met, the PlayTone command will result in the PlayTone_Complete event with a TerminationCondition of maxtime. | |
| TermCondDigit | System.String | A specific digit that will cause the PlayTone operation to terminate.
If this condition is met, the PlayTone command will result in the PlayTone_Complete event with a TerminationCondition of digit. Note that this termination condition is only valid if one is playing a tone to a ConnectionId. | |
| TermCondSilence | System.UInt32 | The amount of silence (in milliseconds) to observe before terminating the PlayTone operation.
If this condition is met, the PlayTone command will result in the PlayTone_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. | |
| TermCondNonSilence | System.UInt32 | The amount of non-silence (in milliseconds) to observe before terminating the PlayTone operation.
If this condition is met, the PlayTone command will result in the PlayTone_Complete event with a
TerminationCondition of nonsilence. | |
| Frequency1 | System.UInt32 | The frequency to be played (in Hz). The valid range is from 200 to 3000. | |
| Frequency2 | System.UInt32 | The frequency to combine with the first frequency (in Hz). The valid range is from 200 to 3000. | |
| Amplitude1 | System.Int32 | The amplitude of the Frequency1 (in dB). The valid Range is from -40 to 0. | |
| Amplitude2 | System.Int32 | The amplitude of the Frequency2 (in dB). The valid Range is from -40 to 0. | |
| Duration | System.UInt32 | The length of time to play tone (in milliseconds). |
| Parameter Name | .NET Type | Description |
|---|---|---|
| ConnectionId | System.String | In the case of a PlayTone 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 PlayTone 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. |
| OperationId | System.String | A unique identifier to this PlayTone 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 PlayTone 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 PlayTone action operating on it. |
| 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. |
Branch Conditions
No description.
No description.
No description.