|
| [C#] | |
|
Release
(String NotificationID)
|
|
| NotificationID |
| Notification ID |
|
| | //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"); |
| | objPhone.Say(PhoneNotifID, "Can you hear this text? If yes press 0."); |
| | string resp = 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(Exception e){ |
| | //Print exception message e.Message |
| | sess.Release(SessionID); |
| | } |