Author Topic: Not Getting Custom Command in WDE  (Read 5946 times)

Offline Niranjan

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
Not Getting Custom Command in WDE
« on: December 08, 2015, 07:25:45 AM »
Hi Guys,

in Extension sample modules in initialize method I gave a command called
commandManager.InsertCommandToChainOfCommandBefore("InteractionVoiceAnswerCall", "AnswerCall", new List<CommandActivator>() { new CommandActivator() { CommandType = typeof(OnAnswerCallCommand), Name = "AnswerCall" } });

but my custom command class is not executing when I answered a call from IWS,

Same problem is happening to ShowInteractionWindow Command Also, and I cant able to get the IInteractionVoice object in WDE.

commandManager.InsertCommandToChainOfCommandAfter("ShowInteractionsWindow", "ShowInteractionsWindow", new List<CommandActivator>() { new CommandActivator() { CommandType = typeof(OnNewShowIntrWindow), Name = "ShowInteractionsWindow" } });

So please help me to resolve this issue

Thanks and Regards
Niranjan M

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Not Getting Custom Command in WDE
« Reply #1 on: December 08, 2015, 10:32:39 AM »
Mentioned commands seem to be not exist. Check them against the documentation.

Offline Niranjan

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
Re: Not Getting Custom Command in WDE
« Reply #2 on: December 08, 2015, 12:22:52 PM »
Hi Kubig,

Thanks for your reply,

I searched in IWS 8.5.1 Developers Book

Section: Open and Restore Interaction Windows
Chain Name : ShowInteractionsWindow

and also here one more major issue is I cant able to get the IInteractionVoice Object parameter, I tried to get the IInteractionVocie in OnMakecall Event and EventDialing, but here I am getting IInteractionVoice object as null, so where and how I can retrieve the IInteractionVoice  object.

Regards
Niranjan M



Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Not Getting Custom Command in WDE
« Reply #3 on: December 08, 2015, 05:18:59 PM »
The mentioned commands do not exist - so use the properly commands for the purposes. About the IInboundVoice, try to post your code to find out the root-cause.

Offline Niranjan

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
Re: Not Getting Custom Command in WDE
« Reply #4 on: December 09, 2015, 05:41:51 AM »
Here is my Sample code in OnMakeCall Command

public bool Execute(IDictionary<string, object> parameters, IProgressUpdater progress)
        {
            // To go to the main thread
                      if (Application.Current.Dispatcher != null && !Application.Current.Dispatcher.CheckAccess())
            {
                object result = Application.Current.Dispatcher.Invoke(DispatcherPriority.Send, new ExecuteDelegate(Execute), parameters, progress);
                return (bool)result;
            }
            else
            {
                log.Info("Execute on make call event...");
                IInteractionVoice _ixnvce = parameters["CommandParameter"] as IInteractionVoice;
                if (_ixnvce != null)
                {
                    log.Debug("Voice is Not Null");
                }
                else
                {
                    log.Debug("ixnvoice is null in on make call Command");
                }
}
}


Here Always I am getting interaction voice as null. suggest me if any other areas or other methods to get the IInteractionVoice Object

Regards
Niranjan M

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Not Getting Custom Command in WDE
« Reply #5 on: December 09, 2015, 08:21:32 AM »
And on what command are you executing that?

Offline Niranjan

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
Re: Not Getting Custom Command in WDE
« Reply #6 on: December 09, 2015, 09:18:27 AM »
MediaVoiceMakeCall Command

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Not Getting Custom Command in WDE
« Reply #7 on: December 09, 2015, 01:12:52 PM »
Try to execute that on Dialing event (do not know the exactly name of the command)

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Re: Not Getting Custom Command in WDE
« Reply #8 on: December 10, 2015, 08:51:45 AM »
What are you trying to do once you have the IInteractionVoice? It might help if we can understand what you are trying to achieve.

On the MediaVoiceMakeCall  the 'CommandParameter' is the IMediaVoice rather than the IInteractionVoice.

Pete.

Offline daniel_san

  • Jr. Member
  • **
  • Posts: 84
  • Karma: 1
Re: Not Getting Custom Command in WDE
« Reply #9 on: December 10, 2015, 10:24:24 AM »
[quote author=Niranjan link=topic=9250.msg41699#msg41699 date=1449559545]
Hi Guys,

in Extension sample modules in initialize method I gave a command called
commandManager.InsertCommandToChainOfCommandBefore("InteractionVoiceAnswerCall", "AnswerCall", new List<CommandActivator>() { new CommandActivator() { CommandType = typeof(OnAnswerCallCommand), Name = "AnswerCall" } });

but my custom command class is not executing when I answered a call from IWS,

Same problem is happening to ShowInteractionWindow Command Also, and I cant able to get the IInteractionVoice object in WDE.

commandManager.InsertCommandToChainOfCommandAfter("ShowInteractionsWindow", "ShowInteractionsWindow", new List<CommandActivator>() { new CommandActivator() { CommandType = typeof(OnNewShowIntrWindow), Name = "ShowInteractionsWindow" } });

So please help me to resolve this issue

Thanks and Regards
Niranjan M
[/quote]

How yo answered the call? I f you are doing with desktop button it must work.

I was trying to work with the chain of command Release Call, and it never worked for me, because release chain is only executing when you press the button release call, not when you release call with hardphone or the client release...

I can see the InteractionVoiceReleaseCall on the documentation but not the ShowInteractionsWindow...

https://docs.genesys.com/Documentation/IW/8.5.1/Developer/Voice
« Last Edit: December 10, 2015, 10:26:38 AM by daniel_san »

Offline Niranjan

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
Re: Not Getting Custom Command in WDE
« Reply #10 on: December 10, 2015, 10:38:42 AM »
Yes I answerd the call but the Command Control is not going in to the onAnswerCallcommand Class.

and I Need the IInteractionVoice object to release the call with my custom button.

Offline Niranjan

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
Re: Not Getting Custom Command in WDE
« Reply #11 on: December 10, 2015, 10:45:57 AM »
Hi Pete,

Thanks for your Reply

Please find the below link it contains the command called showinteractionswindow

https://docs.genesys.com/Documentation/IW/latest/Developer/Windows#Open_and_Restore_Interaction_Windows

if I will get the command on showinteractionswindow I can able to get the IInteractionVoice Command in this window, and I have set of validations to perform in this control.

Regards
Niranjan M

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Re: Not Getting Custom Command in WDE
« Reply #12 on: December 10, 2015, 12:28:55 PM »
Ok, so if you are using the 'ShowInteractionsWindow' command chain that is dependent on which version of WDE you are using, if it is 8.5 or later then by default it does not open an InteractionWindow

There is a config option that you can use to set it to the old mode where you get separate windows for each interaction:

interaction-bar.enable-quick-access = false

Offline Niranjan

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
Re: Not Getting Custom Command in WDE
« Reply #13 on: December 10, 2015, 01:25:54 PM »
Thanks Pete,

it helped me a lot. now a new interaction window is opening for each call, and I can able to get the control over the windows now,

Thanks a lot once again.

Regards
Niranjan M