Thanks for your response Jakub :)
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;
...
//Take URLWS from attached data
....
Process.Start("iexplore.exe", URLWS);
}
catch (Exception ex)
{
mess = ex.Message;
MessageBox.Show("errore" + mess);
}
finally
{
}
return false;
}
}
This works fine for the Voice, but when I accept a chat, the interaction have the same behaviour of the Voice. Why?