Office Communicator Auto Accept Calls with C# API
- by Dennis
Is there a way to automatically accept calls programmed with the C# Api when someone calls 'me' to start a video call?
Starting a video call with the API is easy:
var contactArray = new ArrayList();
contactArray.Add("[email protected]");
object[] sipUris = new object[contactArray.Count];
int currentObject = 0;
foreach (object contactObject in contactArray)
{
sipUris[currentObject] = contactObject;
currentObject++;
}
var communicator = new Messenger();
communicator.OnIMWindowCreated += new DMessengerEvents_OnIMWindowCreatedEventHandler(communicator_OnIMWindowCreated);
IMessengerAdvanced msgrAdv = communicator as CommunicatorAPI.IMessengerAdvanced;
if (msgrAdv != null)
{
try
{
object obj = msgrAdv.StartConversation(CommunicatorAPI.CONVERSATION_TYPE.CONVERSATION_TYPE_VIDEO, sipUris, null, "Conference Wall CZ - Conversation", "1", null);
}
catch (COMException ex)
{
Console.WriteLine(ex.Message);
}
}
But on the other side i want to automatically accept this call....