|
[VB.NET] | |
Function WaitDigits
(NotificationID As String, Timeout As int, MaxNumbers As int, LastDigits As String)
As
String |
|
NotificationID |
Notification ID |
Timeout |
Specifies maximum timeout value for digits gathering operation |
MaxNumbers |
Specifies maximum amount of digits to gather. |
LastDigits |
Specifies terminating digits. Valid values ['0'-'9', '#', '*'] |
|
Digits that was pressed on the phoneset keypad |
VB.NET
Example |
Switch to language:
[C#] |
|
| 'Create personalizer object and Session object |
| Dim pers As New PersonalizerRef.Personalizer()
|
| Dim sess As New SessionRef.Session()
|
| Dim SessionID As
String = "" |
| Try |
| SessionID = pers.CreateSession("LogonName", "Password") |
| 'Create Phone notification object |
| Dim objPhone As New PhoneRef.Phone()
|
| Dim PhoneNotifID As
String = sess.CreatePhoneNotification(SessionID) |
| objPhone.Call(PhoneNotifID,"1-800-123-4567") |
| objPhone.Say(PhoneNotifID, "Can you hear this text? If yes press 0.") |
| Dim resp As
String = objPhone.WaitDigits(PhoneNotifID,30,1,"#") 'Get response from user |
| objPhone.PlayDigits(PhoneNotifID,resp) 'playback user response |
| objPhone.HangUp(PhoneNotifID) ' close connection |
| objPhone.Release(PhoneNotifID) |
| sess.Release(SessionID) |
| Catch e As Exception |
| 'Print exception message e.Message |
| sess.Release(SessionID) |
| End Try |