|
[VB.NET] | |
Sub CallEx
(NotificationID As String, ProviderID As Int32, Number As String)
|
|
NotificationID |
Notification ID |
ProviderID |
Provider ID |
Number |
Phone number |
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) |
| For i As Integer = 0 To i <= 5 |
| Try |
| objPhone.CallEx(PhoneNotifID,i,"1-800-123-4567") |
| Exit For |
| Catch e As Exception |
| If i == 5 Then |
| Throw e |
| End If |
| End Try |
| Next i |
| 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 |