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.