Beispiel #1
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;
 }
Beispiel #2
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>();
 }
        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);
        }
        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();
        }
Beispiel #5
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);
        }
Beispiel #6
0
 public void DeleteMenuElement(IVRMenuElementBase element)
 {
 }