Dennis
Dennis

Reputation: 1848

Office Communicator Auto Accept Calls with C# API

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

Upvotes: 0

Views: 943

Answers (1)

Scott Hanselman
Scott Hanselman

Reputation: 17692

Not possible with OC so far as I've found, presumably for security reasons. What I ended up doing was having the remote bot call me then I answer. So I chat "start video" to a messenger account that I've got a service listening to. That service calls me, then I answer it on my side manually.

Upvotes: 1

Related Questions