" /> How to create a custom module for Voice and Chat (WDE) - Genesys CTI User Forum

Author Topic: How to create a custom module for Voice and Chat (WDE)  (Read 4559 times)

Offline Daere

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
How to create a custom module for Voice and Chat (WDE)
« on: October 02, 2015, 10:18:39 AM »
Advertisement
Hi,
it's my first post and I hope that anyone can help me :)
I've tryed to customize the Chat and Voice events with the PSDK .NET and developed two different modules to handle this events.
It's possible to create an unique module for two different chains of commands?
Another problem is that when arrive the chat events and I accept the interaction through the WDE, this interaction will caught only from Voice module. Where I go wrong?

Thank You
Laura

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: How to create a custom module for Voice and Chat (WDE)
« Reply #1 on: October 02, 2015, 10:45:12 AM »
It does not make sense, to develop to independent modules, where each of them will use same set of commands. You can divide it to the two modules, where each module will serve own set of commands.

Offline Daere

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: How to create a custom module for Voice and Chat (WDE)
« Reply #2 on: October 02, 2015, 11:08:01 AM »
[quote author=Kubig link=topic=9134.msg41042#msg41042 date=1443782712]
It does not make sense, to develop to independent modules, where each of them will use same set of commands. You can divide it to the two modules, where each module will serve own set of commands.
[/quote]
The two modules are divided and use different chain of command, but it doesn't work anyway.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: How to create a custom module for Voice and Chat (WDE)
« Reply #3 on: October 02, 2015, 11:19:04 AM »
There must be any mistake in your code. What is the issue? What say logs or debug infos?

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: How to create a custom module for Voice and Chat (WDE)
« Reply #4 on: October 02, 2015, 11:47:27 AM »
Can you post you cfg file showing how you are calling the modules?

Offline Daere

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: How to create a custom module for Voice and Chat (WDE)
« Reply #5 on: October 02, 2015, 12:30:10 PM »
This is the .module-config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
  <section name="modules" type="Microsoft.Practices.Composite.Modularity.ModulesConfigurationSection, Microsoft.Practices.Composite" />
  <section name="tasks" type="Genesyslab.Desktop.Infrastructure.Config.TasksSection, Genesyslab.Desktop.Infrastructure" />
</configSections>

<tasks>
    <task name="InteractionWorkspace.Voice.canUse" clickOnceGroupsToDownload="Voice" modulesToLoad="ExtensionModule" />
  </tasks>

<modules>
  <!-- Uncomment the following to load the module if the corresponding task is granted -->
  <module assemblyFile="Genesyslab.Desktop.Modules.Extension.dll"
    moduleType="Genesyslab.Desktop.Modules.Extension.ExtensionModule"
    moduleName="ExtensionModule"
    startupLoaded="false"/>
</modules>
</configuration>

Thank you
« Last Edit: October 02, 2015, 12:37:52 PM by Daere »

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: How to create a custom module for Voice and Chat (WDE)
« Reply #6 on: October 02, 2015, 12:41:54 PM »
Ok, but this is just loading of one mentioned modules. Where is the second?

Offline Daere

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: How to create a custom module for Voice and Chat (WDE)
« Reply #7 on: October 02, 2015, 12:53:48 PM »
[quote author=Kubig link=topic=9134.msg41049#msg41049 date=1443789714]
Ok, but this is just loading of one mentioned modules. Where is the second?
[/quote]
The problem is that with only this Voice module we intercept both InteractionVoiceAnswerCall and InteractionChatAcceptChat (the name of the chain of command).

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: How to create a custom module for Voice and Chat (WDE)
« Reply #8 on: October 02, 2015, 12:55:24 PM »
I do not understand, why do you use both commands within one module, if this module is developed just as the voice? This does not make a sense. If your module is just for voice, use just commands related to the voice channel, in other module for chat use the chat's commands.

Offline Daere

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: How to create a custom module for Voice and Chat (WDE)
« Reply #9 on: October 02, 2015, 01:16:16 PM »
Ok, I'll try to explain in a best way (sorry for my english) :D

With this module-config, that's used only for voice, during the event of accept chat, the behaviour is the same of the answer call. The chat module isn't deployed for this issue.
The code:

In the module.cs:
...
public void Initialize()
{
  ....
  commandManager.InsertCommandToChainOfCommandBefore("InteractionVoiceAnswerCall","AnswerCall",new List<CommandActivator>() { new CommandActivator() { CommandType = typeof(InteractionVoiceAnswerCallCommand), Name = "AnswerCall" } });

....
}

In the CustomCommand.cs:
...
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
            {
                // Ok, we are in the main thread
                log.Info("Execute");
                try
                {
                   
                    IInteractionVoice interactionVoice = parameters["CommandParameter"] as IInteractionVoice;

                  MessageBox.Show("In the VoiceAnswer Command");
                 
    ...
    //Take URLWS from attached data
    ....
   
                    Process.Start("iexplore.exe", URLWS);

                }
                catch (Exception ex)
                {
                    mess = ex.Message;
                    MessageBox.Show("errore" + mess);
                }
                finally
                {
                 
                }
                return false;
            }
        }

The message box ("In the VoiceAnswer Command") is show for both voice and chat

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: How to create a custom module for Voice and Chat (WDE)
« Reply #10 on: October 02, 2015, 01:19:31 PM »
As I wrote on Genesys community site, try to :
[list]
[li]check in RN for IWS/WDE[/li]
[li]find out what commands exactly are fired during the incoming chat (within debug IWS logs)[/li]
[li]check if there are no other commands, which can be related to mentioned action[/li]
[/list]

Offline Daere

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: How to create a custom module for Voice and Chat (WDE)
« Reply #11 on: October 03, 2015, 10:52:45 AM »
Thanks to all, I 've resolved! My mistake was that I've declared  a view that started every time both for voice and chat.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: How to create a custom module for Voice and Chat (WDE)
« Reply #12 on: October 03, 2015, 03:46:02 PM »
8) Good job