Method: GatherDigits


Function:

 

Gather digits from the line.

     

Parameters:

 

digitsCount:
The number of digits to gather.When this number of digits have been collected, the GatherDigits EVENT is raised.

terminatDigit:
The digit to terminate gathering. Once this digit is detected, the GatherDigits event is raised.

ReGatherDigit:

The digit which will clear all the gathered digits and restart gathering.

CancelDigit:


The digit to cancel gathering digits.

SpecialDigits:


The special digits which will terminate gathering digits. For example, if 0 is specified as SpecialDigits, if 0 is gathered, the gathering process will be finished. If 10 is gathered, it will not be finished. You can specifiy multiple Special Digits, each should be seperated by a comma. For example "0,*" .

firstDigitTimeOut:
A period of time in milli-seconds for which voiceangel will wait for the first digit of the digits. Once the time has expired, the GatherDigits event will be raised.

 

interDigitTimeOut:
A period of time in milliseconds for which VoiceAngel will wait between any two adjacent digits. Once this time has expired, the GatherDigits event will be raised.



TotalTimeOut:
A period of time in milliseconds for which VoiceAngel will wait all digits to be gathered. Once this time has expired, the GatherDigits event will be raised.

     

Description:

 

Each execution of GatherDigits will do one "gather". Once the GatherDigits event occurs, whether by termination or timeout, no further gathering is done. You must invoke the method again to collect more digits.

     

Dependencies:

 

The Connected event should be TRUE before using this method.

     

Events Raised:

 

GatherDigits is raised on timeout or termination. See GatherDigits event.

     

Sample Code In Visual Basic:

'The following code shows how to begin gathering digits after a digit "1" has been detected

Sub VoiceAngel1_DigitDetected(LineIndex as integer ,sDigit as String )

  VoiceAngel1.CurrentLineIndex = LineIndex

  if sDigit="1" then

     VoiceAngel1.GatherDigits 4 ,"#","","","",6000,4000 ,50000

     VoiceAngel1.OpenWaveFile "Prompt.wav"

     VoiceAngel1.StartPlaying 0,false

    

  end if

End sub