Phone


Record

Record Voice from Phone Line into the file

Call Method
[VB.NET]
   Function Record (NotificationID As String, Timeout As int, LastDigits As String, MaxNumbers As int) As String
Parameters
   NotificationID
         Notification ID
   Timeout
         Specifies maximum timeout for recording
   LastDigits
         Specifies terminating digits. Valid values ['0'-'9', '#', '*']
   MaxNumbers
         Specifies maximum amount of digits to gather.
Return value
         Unique File Name Genereated by Server
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")
      'Record Voice form Line
      Dim FileName As String
      FileName = objPhone.Record(PhoneNotifID, 10, "#", 3)
      objPhone.PlayFile(PhoneNotifID, FileName)
      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