PresenceView는 수동으로 프로비저닝 된 응용 프로그램 끝점을 사용하여 만들어집니다. 나는 그것을 "구독"이라고하는 세 가지 목표로 제공했습니다. 하지만 첫 번째 알림 만받습니다. 그 후에는 아무 일도 일어나지 않습니다. 폴링의 경우도 마찬가지입니다. NotificationRecieved 이벤트는 첫 번째 알림 후에 실행되지 않습니다. Lync 이벤트 로그에 오류가 표시되지 않고 어떤 예외도 발생하지 않습니다.RemotePresenceView가 하나의 알림 만 수신하면 아무 일도 일어나지 않습니다.
내 설정은 응용 프로그램 풀 역할을하는 DC, Lync Server 및 Developer 컴퓨터가있는 가상 환경입니다. 모든 것이 괜찮아 보입니다.
다음은 내 코드 샘플입니다. 내 솔루션은 두 개의 프로젝트로 구성됩니다. 작은 콘솔 응용 프로그램과 lync 코드가있는 프로젝트입니다. UCMA 코드 샘플의 SubscribePresenceView 샘플 솔루션을 기반으로합니다.이 솔루션은 대신 사용자 끝점을 사용하지만 현재 상태를 올바르게 업데이트합니다.
public void Run()
{
_helper = new Helper(new ConsoleLogger());
_applicationEndpoint = _helper.CreateApplicationEndpoint();
var viewSettings = new RemotePresenceViewSettings();
viewSettings.SubscriptionMode = RemotePresenceViewSubscriptionMode.Default;
_presenceView = new RemotePresenceView(_applicationEndpoint, viewSettings);
List<RemotePresentitySubscriptionTarget> targets = new List<RemotePresentitySubscriptionTarget>();
targets.Add(new RemotePresentitySubscriptionTarget("sip:[email protected]"));
targets.Add(new RemotePresentitySubscriptionTarget("sip:[email protected]"));
targets.Add(new RemotePresentitySubscriptionTarget("sip:[email protected]"));
this.WireUpHandlersForView(_presenceView);
_presenceView.StartSubscribingToPresentities(targets);
}
핸들 알림 위임 방법 :
private void RemotePresenceView_NotificationReceived(object sender, RemotePresentitiesNotificationEventArgs e)
{
// A RemotePresentityNotification will contain all the
// categories for one user; Notifications can contain notifications
// for multiple users.
foreach (RemotePresentityNotification notification in e.Notifications)
{
Console.WriteLine("\nReceived a Notification for user "+ notification.PresentityUri + ".");
// If a category on notification is null, the category
// was not present in the notification. This means there were no
// changes in that category.
if (notification.AggregatedPresenceState != null)
{
Console.WriteLine("Aggregate State = " + notification.AggregatedPresenceState.Availability + ".");
}
if (notification.PersonalNote != null)
{
Console.WriteLine("PersonalNote: " + notification.PersonalNote.Message + ".");
}
if (notification.ContactCard != null)
{
// A ContactCard contains many properties; only display
// some.
ContactCard contactCard = notification.ContactCard;
Console.WriteLine("ContactCard Company: " + contactCard.Company + ".");
Console.WriteLine("ContactCard DisplayName: " + contactCard.DisplayName + ".");
Console.WriteLine("ContactCard EmailAddress: " + contactCard.EmailAddress + ".");
}
}
}
더 많은 정보가 필요하면 알려 주시기 바랍니다.
안녕하세요, 스택 오버플로에 오신 것을 환영합니다! 약간의 질문을 다시 시도해보십시오. 기본적으로, 여기서 문제가되지 않습니다. –
내 질문에 : 프레즌스 상태가 업데이트되지 않는 이유는 무엇입니까? – mupersan82
문제점 문을 다시 작성했습니다. 도움이되기를 바랍니다. – mupersan82