GatherDigits

Metreos.MediaControl.GatherDigits

Asynchronous Callbacks

Summary

GatherDigits instructs the media engine to watch for DTMF digits on a connection.

Usage

GatherDigits allows one to determine which digits were pushed.

The termination condition parameters on the action are a means to create a matrix of reasons that the action should stop successfully. In the GatherDigits_Complete event, one can use TerminationCondition to determine why the command stopped gathering digits.

Remarks

The media engine is continuously buffering observed digits for any given connection. GatherDigits considers any digits stored in this digit buffer at the onset of the action for the processing of any specified termination conditions. Once the GatherDigits action has started executing, digits that occur in real-time also fill up the buffer and so can cause the specified termination conditions to be met. For example, if the user pushes 123, and then a GatherDigits operation is executed with a TermCondDigitPattern of 1234 specified, the GatherDigits_Complete event will occur as soon as the user pushes 4. After the GatherDigits_Complete event is fired, the buffer is cleared of all digits.

A GatherDigits to a connection or a conference results in a voice resource being utilized until the action results in the GatherDigits_Complete event.

If a connection is specified as the recepient of the GatherDigits, the voice resource attaches to the connection. If a conference is specified as the recepient of the GatherDigits, a new connection (which uses a conference resource) is created and added to the conference for the duration of the GatherDigits, 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 GatherDigits voice resource is attached. In other words, in the case of a GatherDigits 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 GatherDigits 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 GatherDigits. In either case, this result data ConnectionId is what one would later specify in StopMediaOperation.

Action Parameters
Parameter Name.NET TypeDefaultDescription
CommandTimeoutSystem.UInt32Indicates a command timeout value (in milliseconds). If this condition is met, the GatherDigits command will result in the GatherDigits_Complete event with a TerminationCondition of timeout.
TermCondDigitListSystem.StringA list of digits that will cause the GatherDigits operation to terminate, if any one of the digits in the list is inputted. The list has no delimiters. If this condition is met, the GatherDigits command will result in the GatherDigits_Complete event with a TerminationCondition of digitlist.
TermCondDigitPatternSystem.StringA specific sequence of digits that will cause the GatherDigits operation to terminate. If this condition is met, the GatherDigits command will result in the GatherDigits_Complete event with a TerminationCondition of digitpattern.
ConnectionId *System.StringIndicates the connection to GatherDigits on.
TermCondMaxTimeSystem.UInt32The amount of time (in milliseconds) that can elapse before terminating the GatherDigits operation. If this condition is met, the GatherDigits command will result in the GatherDigits_Complete event with a TerminationCondition of maxtime.
TermCondMaxDigitsSystem.UInt32The number of digits that will cause the GatherDigits operation to terminate. If this condition is met, the GatherDigits command will result in the GatherDigits_Complete event with a TerminationCondition of maxdigits.
TermCondDigitSystem.StringA specific digit that will cause the GatherDigits operation to terminate. If this condition is met, the GatherDigits command will result in the GatherDigits_Complete event with a TerminationCondition of digit.
TermCondInterDigitDelaySystem.UInt32The amount of time between digits which will cause the GatherDigits operation to terminate. If this condition is met, the GatherDigits command will result in the GatherDigits_Complete event with a TerminationCondition of interdigdelay.
TimeoutSystem.Int32The 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.
StateSystem.StringOptional user state information which is guaranteed present as the State event parameter in GatherDigits_Complete or GatherDigits_Failed.
Result Data
Parameter Name.NET TypeDescription
ConnectionIdSystem.StringThe value of the ConnectionId result data is the same as that specified as an action parameter. This ConnectionId is what one would later specify in StopMediaOperation if one were to abort the command programmatically.
OperationIdSystem.StringA unique identifier to this GatherDigits 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.
ResultCodeSystem.StringA 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 

Success

No description.

Failure

No description.

Timeout

No description.