Lync SDK 2013 - 使用meet.lync.com网址加入预定会议

时间:2017-04-20 19:30:43

标签: exchangewebservices lync skype-for-business lync-2013 lync-client-sdk

我使用以下格式从交换在线服务器(办公室365)检索预定的会议URL - https://meet.lync.com/organization/username/Y0RR3HTK

如何使用Lync SDK 2013加入此会议(不在浏览器中启动网址)?

以下代码接受格式为的网址 - " conf:sip:userUri; gruu; opaque = app:conf:focus:id:conferenceId?"

 [Serializable]
[XmlRoot("ns0:Claims")]
public class Claim
{
    [XmlElement("ClientName")]
    public string ClientName { get; set; }
    [XmlElement("UWYear")]
    public string Uwyear { get; set; }
    [XmlElement("AgreementNo")]
    public string AgreementNo { get; set; }
    [XmlElement("BusinessType")]
    public string BusinessType { get; set; }
    [XmlElement("PeriodStart")]
    public DateTime? PeriodStart { get; set; }
    [XmlElement("PeriodEnd")]
    public DateTime? PeriodEnd { get; set; }
    [XmlElement("PolicyNo")]
    public string PolicyNo { get; set; }
    [XmlElement("PolicyHolder")]
    public string PolicyName { get; set; }
    [XmlElement("DateOfLoss")]
    public DateTime? DateOfLoss { get; set; }
    [XmlElement("ClaimNo")]
    public string ClaimNo { get; set; }
    [XmlElement("ClaimantName")]
    public string ClaimantName { get; set; }
    [XmlElement("ClaimedInsured")]
    public string ClaimedInsured { get; set; }
    [XmlElement("ReportDate")]
    public DateTime? ReportDate { get; set; }
    [XmlElement("CountryOfRisk")]
    public string CountryOfRisk { get; set; }
    [XmlElement("CountryOfLoss")]
    public string CountryOfLoss { get; set; }
    [XmlElement("TypeOfLoss")]
    public string TypeOfLoss { get; set; }
    [XmlElement("InsuranceCoverage")]
    public string InsuranceCoverage { get; set; }
    [XmlElement("LineOfBuisnessNo")]
    public int? LineOfBuisnessNo { get; set; }
    [XmlElement("LineOfBuisnessName")]
    public string LineOfBuisnessName { get; set; }
    [XmlElement("ClassOfBuisnessNo")]
    public int? ClassOfBuisnessNo { get; set; }
    [XmlElement("ClassOfBuisnessName")]
    public string ClassOfBuisnessName { get; set; }
    [XmlElement("CaptiveShare")]
    public int? CaptiveShare { get; set; }
    [XmlElement("OriginalCurrency")]
    public string OriginalCurrency { get; set; }
    [XmlElement("PaymentCurrency")]
    public string PaidInCurrency { get; set; }
    [XmlElement("TotalIncurredCaptiveShare")]
    public decimal? TotalIncurredCaptiveShare { get; set; }
    [XmlElement("PaidThisPeriod")]
    public decimal? PaidThisPeriod { get; set; }
    [XmlElement("PeriodDate")]
    public DateTime? PeriodDate { get; set; }
    [XmlElement("PaymentDate")]
    public DateTime? PaymentDate { get; set; }
    [XmlElement("TotalPaidCaptiveShare")]
    public decimal? TotalPaidCaptiveShare { get; set; }
    [XmlElement("RemainingReserveCaptiveShare")]
    public decimal? RemainingReserveCaptiveShare { get; set; }
    [XmlElement("Deductible")]
    public string Deductible { get; set; }
    [XmlElement("Recovery")]
    public string Recovery { get; set; }
    [XmlElement("LocationAdress")]
    public string LocationAdress { get; set; }
    [XmlElement("Address1")]
    public string Address1 { get; set; }
    [XmlElement("Addresstype")]
    public string Address2 { get; set; }
    [XmlElement("Postalzone")]
    public string PostalCode { get; set; }
    [XmlElement("City")]
    public string PostalLocation { get; set; }
    [XmlElement("Country")]
    public string Country { get; set; }
    [XmlElement("GeograficalDiversification")]
    public string GeograficalDiversification { get; set; }
    [XmlElement("Cause")]
    public string Cause { get; set; }
    [XmlElement("Status")]
    public string Status { get; set; }
    [XmlElement("CloseDate")]
    public DateTime? CloseDate { get; set; }
    [XmlElement("DevelopmentYear")]
    public string DevelopmentYear { get; set; }
    [XmlElement("TotalIncurredInsurerShare")]
    public decimal? TotalIncurredInsurerShare { get; set; }
    [XmlElement("TotalPaidInsurerShare")]
    public decimal? TotalPaidInsurerShare { get; set; }
    [XmlElement("RemainingReserveInsurerShare")]
    public decimal? RemainingReserveInsurerShare { get; set; }

}
//[ModelMetadataType(typeof(DmgRegisterMetaData))]
[Serializable()]
[XmlRoot("ns0:Claims")]
public class ClaimsCollection
{
    [XmlArray("Claims")]
    [XmlArrayItem("Claim", typeof(Claim))]
    public Claim[] Claim { get; set; }
}

PS。我曾尝试在我的组织中创建会议,并返回另一种格式 - " https://meet.domain.ru/username/YTHJ145B" - 它可以很容易地转换为" conf:sip"格式(username@domain.ru是userUri,但在问题场景1中,用户名@ organization或username@lync.com不是userUri);

PSS。这个建议https://stackoverflow.com/a/31410399/4377953不起作用,我在调用Automation.BeginStartConversation(meetingUrl, 0, StartConversation_Callback, null); 时没有任何详细信息就得到了例外

1 个答案:

答案 0 :(得分:0)

使用LyncClient.ConversationManager.JoinConference(meetingUrl)时使用会议网址格式" conf:sip:userUri; gruu; opaque = app:conf:focus:id:conferenceId?"本身并将 sip:userUri 替换为lyncClient.Self.Contact.Uri,如以下代码所示

string meetingLink = "https://meet.domain.ru/username/YTHJ145B";
string[] linktokens = meetingLink.Split('/');
string joinUri = "conf:" + lyncClient.Self.Contact.Uri + ";gruu;opaque=app:conf:focus:id:" + linktokens.Last() + "?";
conversation = lyncClient.ConversationManager.JoinConference(joinUri);