Office Communicator Auto Accept Calls with C# API

Posted by Dennis on Stack Overflow See other posts from Stack Overflow or by Dennis
Published on 2010-06-09T07:47:38Z Indexed on 2010/06/09 7:52 UTC
Read the original article Hit count: 469

Filed under:
|
|
|

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....

© Stack Overflow or respective owner

Related posts about c#

Related posts about api