Play stored file with getting termination digit

Call Method
   Function PlayFileWithDigitEvent (NotificationID As String, FileName As String, LastDigits As String, MaxNumbers As int) As String
         Notification ID
         File Name
         Specifies terminating digits. Valid values ['0'-'9', '#', '*']
         Specifies maximum amount of digits to gather.
Return value
         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 = ""
      SessionID = pers.CreateSession("LogonName", "Password")
      'Create Phone notification object
      Dim objPhone As New PhoneRef.Phone()
      Dim PhoneNotifID As String = sess.CreatePhoneNotification(SessionID)
      Dim resp As String=objPhone.SayWithDigitEvent(PhoneNotifID, _
              "To play file press 0, otherwise press 9", "09",4)
      If resp = "0" Then
          resp = objPhone.PlayFileWithDigitEvent(PhoneNotifID, "Prompt.wav", "012", 4)
      End If
      objPhone.HangUp(PhoneNotifID) ' close connection
  Catch e As Exception
      'Print exception message e.Message
  End Try