2

I have two Lync clients Hulk and Batman. Hulk calls Batman after which it rings Batman's Lync client.

Now, I want to write an UCMA 4.0 trusted application that should accept that incoming call so that there is an RTP connection between the two Lync clients Hulk and Batman.

I do the following:

_userEndpoint.RegisterForIncomingCall<AudioVideoCall>(IncomingCallDelegate);

The user endpoint (configured with the SIP URI sip:batman_lync@artus.demo) was created with the new keyword: new UserEndpoint(_collaborationPlatform, endpointSettings);

But because of this new keyword, the call is actually forked to two locations: It rings Batman's Lync client and IncomingCallDelegate is invoked. As soon as I accept the call in IncomingCallDelegate, Batman's Lync client stops ringing, but the Lync client isn't in a call unfortunately (it's status is set to "Available" also).

public void IncomingCallDelegate(object sender, CallReceivedEventArgs<AudioVideoCall> args)
{
    _logger.Log("Call incoming...");
    var call = args.Call;

    call.BeginAccept(ar =>
    {
        call.EndAccept(ar);
        _logger.Log("Call accepted.");
    }, null);
}

How can I accept the right user endpoint? A user endpoint's EndpointUri property is read-only and the setter for InnerEndpoint.Gruu is protected. I don't know how to get the Gruu for a given SIP URI anyway...

Thanks.

1 Answers1

0

You are effectively adding another device (endpoint) to the SIP address and then answering the call on that device so it is right that the call stops ringing on the other devices as it has been answered. Admittedly I'm surprised that presence doesn't change to "in call".

If you want to automatically answer a call on a particular device I would suggest that UCMA is probably the wrong tool for the job and recommend using the Lync Client SDK to watch for incoming AV calls locally instead.

Paul Hodgson
  • 939
  • 8
  • 15