Ok, I'll try to explain in a best way (sorry for my english)

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