/// <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));
     }
 }
 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;
 }
 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;
 }
 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>();
 }
Exemplo n.º 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);
        }
Exemplo n.º 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;
 }
Exemplo n.º 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();
        }
 /// <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));
 }
Exemplo n.º 9
0
 public void DeleteMenuElement(IVRMenuElementBase element)
 {
 }
 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;
 }