Remember 2 weeks ago how we used the conversation object, when the same principal applies here, as we show an example of how to park a call.
try
{
if (c.CanInvoke(ConversationAction.Park))
{
c.BeginPark(myar =>
{
c.EndPark(myar);
try
{
SetPropertyCall(c, ConversationProperty.Subject, (object)("Call Parked by : " + _yourname));
}
catch { }
}, null);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Now the call is in orbit in the Lync parking lot. We can find a list of our parked calls by examining the following. (and you'll see why I said not really above)
object cpo;
c.Properties.TryGetValue(ConversationProperty.CallParkOrbit, out cpo);
if (cpo != null)
{
//YOU FOUND A PARKED CALL
CallParkOrbit mypark = (CallParkOrbit)cpo;
if (!string.IsNullOrEmpty(mypark.SafeRetrieveUri.ToString()))
{
//THIS IS THE DIAL URI to RETRIEVE THE CALL
}
}
You can have anyone dial the uri to retrieve the call, most often it's a 4 or 5 digit number, not anything terribly complicated.
Your normal parking lot numbers can be found here.
That will conclude this weeks blog on call parking with the Lync/Skype4b client sdk.
Doug Routledge, C# Lync, Skype for Business, SQL, Exchange, UC Developer BridgeOC
Twitter - @droutledge @ndbridge
No comments:
Post a Comment
Any spam comments will be deleted and your user account will be disabled.