Phone


Record

Record Voice from Phone Line into the file

Call Method
[C#]
   String Record (String NotificationID, int Timeout, String LastDigits, int MaxNumbers)
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
C# Example Switch to language: [VB.NET]
  //Create personalizer object and Session object
  PersonalizerRef.Personalizer pers = new PersonalizerRef.Personalizer() ;
  SessionRef.Session sess = new SessionRef.Session() ;
  string SessionID = "";
  try{
      SessionID = pers.CreateSession("LogonName", "Password");
      //Create Phone notification object
      PhoneRef.Phone objPhone = new PhoneRef.Phone() ;
      string PhoneNotifID = sess.CreatePhoneNotification(SessionID);
      objPhone.Call(PhoneNotifID,"1-800-123-4567");
      //Record Voice form Line
      string FileName;
      FileName = objPhone.Record(PhoneNotifID, 10, "#", 3);
      objPhone.PlayFile(PhoneNotifID, FileName);
      objPhone.HangUp(PhoneNotifID) ; // close connection
      objPhone.Release(PhoneNotifID);
      sess.Release(SessionID);
  }
  catch(Exception e){
      //Print exception message e.Message
      sess.Release(SessionID);
  }