我正在编写一个简单的 C# 应用程序来应答 Lync 呼叫并根据数据库值将其转发到另一个电话号码。这完美无缺。但是,有时我想将呼叫转接到用户的语音信箱。我不知道如何获取语音信箱的 URI :(
假设我在 ConversationAdded 事件的处理程序中。我试过这个:
Conversation conv = args.Conversation;
string voicemailURI = String.Format("{0};opaque=app:voicemail",conv.SelfParticipant.Contact.Uri);
// the contact returned here, however, does not contain the opaque=app:voicemail
Contact forwardContact = lync.ContactManager.GetContactByUri(voicemailURI);
还:
Conversation conv = args.Conversation;
// following throws ArgumentException: Value does not fall within the expected range
Phone voicemail = lync.Self.GetPhone(ContactEndpointType.VoiceMail);
string voicemailURI = voicemail.Endpoint.Uri
Contact forwardContact = lync.ContactManager.GetContactByUri(voicemailURI);
UC 语音信箱已设置并正常工作。我不确定该术语究竟是什么,但它由 Exchange 处理,并且邮件出现在我的收件箱中。如果我只是让电话响起,它最终会出现在语音邮件中,但我的应用程序知道它应该立即发送到那里,所以我想立即转发它。