コード例 #1
0
 /// <summary>
 /// Indicates you must step to the desitaniton menu.
 /// </summary>
 /// <param name="destination"></param>
 protected void OnStepIntoMenu(IVRMenuElementBase destination)
 {
     if (StepIntoMenu != null)
     {
         StepIntoMenu(this, new VoIPEventArgs <IVRMenuElementBase>(destination));
     }
 }
コード例 #2
0
 protected IVRMenuElementBase(IVRMenuElementBase original)
 {
     Id = original.Id;
     Name = original.Name;
     TouchToneKey = original.TouchToneKey;
     Introduction = original.Introduction;
     ChildMenus = new List<IVRMenuElementBase>(original.ChildMenus);
     Parent = original.Parent;
 }
コード例 #3
0
 protected IVRMenuElementBase(IVRMenuElementBase original)
 {
     Id           = original.Id;
     Name         = original.Name;
     TouchToneKey = original.TouchToneKey;
     Introduction = original.Introduction;
     ChildMenus   = new List <IVRMenuElementBase>(original.ChildMenus);
     Parent       = original.Parent;
 }
コード例 #4
0
 public VmIVRMenuElementBase(IVRMenuElementBase model)
 {
     Id = model.Id;
     ParentId = model.ParentId;
     Name = model.Name;
     TouchToneKey = model.TouchToneKey;
     Introduction = model.Introduction;
     AudioFile = model.AudioFile;
     NarratorType = model.NarratorType;
     ChildMenus = new List<VmIVRMenuElementBase>();
 }
コード例 #5
0
        public CustomerCall(ICall call, IVRMenuElementBase rootmenu)
        {
            mediaManager = new MediaManager(call);

            repeatTimer = new Timer(5000);
            repeatTimer.AutoReset = false;
            repeatTimer.Elapsed += new ElapsedEventHandler(repeatTimer_Elapsed);
            currentMenu = rootmenu;
            SubscribeCurrentMenuEvents();

            PhoneCall = call;
            PhoneCall.CallErrorOccurred += (PhoneCall_CallErrorOccured);
            PhoneCall.DtmfReceived += PhoneCall_DtmfReceived;
            PhoneCall.CallStateChanged += (PhoneCall_CallStateChanged);
        }
コード例 #6
0
 public static VmIVRMenuElementBase GetMenuViewModel(IVRMenuElementBase menu)
 {
     VmIVRMenuElementBase result;
     if (menu is IVRMenuElementCallTransfer)
     {
         result = new VmIVRMenuElementCallTransfer((IVRMenuElementCallTransfer)menu);
     }
     else if (menu is IVRMenuElementInfoReader)
     {
         result = new VmIVRMenuElementInfoReader((IVRMenuElementInfoReader)menu);
     }
     else
     {
         result = new VmIVRMenuElementVoiceMessageRecorder((IVRMenuElementVoiceMessageRecorder)menu);
     }
     return result;
 }
コード例 #7
0
        void currentMenu_StepIntoMenu(object sender, VoIPEventArgs<IVRMenuElementBase> e)
        {
            repeatTimer.Stop();
            if (e.Item == null)//If event param is null it's indicates the exit command, close the call.
            {
                PhoneCall.HangUp();
                Close();
                return;
            }

            UnSubscribeCurrentMenuEvents();
            currentMenu = e.Item;
            OnNotifyAction(string.Format("Caller '{0}' is in '{1}' menu.", PhoneCall.OtherParty, currentMenu.Name));
            SubscribeCurrentMenuEvents();
            currentMenu.StartIntroduction();
        }
コード例 #8
0
 /// <summary>
 /// Indicates you must step to the desitaniton menu.
 /// </summary>
 /// <param name="destination"></param>
 protected void OnStepIntoMenu(IVRMenuElementBase destination)
 {
     if (StepIntoMenu != null)
         StepIntoMenu(this, new VoIPEventArgs<IVRMenuElementBase>(destination));
 }
コード例 #9
0
 public void DeleteMenuElement(IVRMenuElementBase element)
 {
 }
コード例 #10
0
 protected void InitModelCommonFields(IVRMenuElementBase model)
 {
     model.Id = Id;
     model.Name = Name;
     model.TouchToneKey = TouchToneKey;
     model.Introduction = Introduction;
     model.AudioFile = AudioFile;
     model.NarratorType = this.NarratorType;
     model.ParentId = ParentId;
 }