Author Topic: Button InteractionVoiceInitTransfer  (Read 2225 times)

Offline jvallejos

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Button InteractionVoiceInitTransfer
« on: November 08, 2016, 02:56:03 AM »
Hello,
I used this code in my button of my form

using Genesyslab.Desktop.Infrastructure;
using Genesyslab.Desktop.Infrastructure.Commands;
using Genesyslab.Desktop.Infrastructure.Configuration;
using Genesyslab.Desktop.Infrastructure.DependencyInjection;
using Genesyslab.Desktop.Infrastructure.ViewManager;
using Genesyslab.Desktop.Modules.Core.Model.Agents;
using Genesyslab.Desktop.Modules.Core.Model.Interactions;
using Genesyslab.Desktop.Modules.Windows.Event;
using Genesyslab.Desktop.Modules.Windows.IWMessageBox;
using Genesyslab.Enterprise.Commons.Collections;
using Genesyslab.Platform.Commons.Logging;
using Genesyslab.Platform.Voice.Protocols.TServer.Events;
using Microsoft.Practices.Composite.Events;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Windows;
using Genesyslab.Desktop.Modules.Voice.Model.Interactions;
using System.Windows.Threading;
using System.IO;


        private void btn_ITransferencia_Click(object sender, RoutedEventArgs e)
        {
            IDictionary<string, object> parameters = new Dictionary<string, object>();
            //parameters.Add("CommandParameter", IInteraction);
            IInteractionVoice interactionVoice = parameters["CommandParameter"] as IInteractionVoice;
            parameters.Add("CommandParameter", interactionVoice);
            parameters.Add("Destination", "31001000");
            parameters.Add("Location", "");
            parameters.Add("UserData", new KeyValueCollection());
            parameters.Add("Reasons", new KeyValueCollection());
            parameters.Add("Extensions", new KeyValueCollection());
            parameters.Add("CorrelatorData", "");
 
            container.Resolve<ICommandManager>().GetChainOfCommandByName("InteractionVoiceInitTransfer ").Execute(parameters);
        }

but the call not started the transfer and show me this error in the log of  WDE

16-11-07 23:41:56.488 [            1] ERROR .BootstrapController - Application.DispatcherUnhandledException
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
  at Genesyslab.Desktop.Modules.InteractionExtensionSample.MySample.MySampleView.btn_ITransferencia_Click(Object sender, RoutedEventArgs e)
  at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
  at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
  at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
  at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
  at System.Windows.Controls.Primitives.ButtonBase.OnClick()
  at System.Windows.Controls.Button.OnClick()
  at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
  at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
  at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
  at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
  at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
  at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
  at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
  at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
  at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
  at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
  at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
  at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
  at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
  at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
  at System.Windows.Input.InputManager.ProcessStagingArea()
  at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
  at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
  at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
  at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
  at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
  at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
  at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
  at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
  at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Please, what am I doing wrong? My WDE is version 8.5.110.16

Best regards

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Button InteractionVoiceInitTransfer
« Reply #1 on: November 08, 2016, 12:40:33 PM »
Don't repeat questions please. Focus in a single thread. Closing this one.

Enviado de meu E6633 usando Tapatalk