C# ';IPhoneLine';不包含';电话线状态转换';

C# ';IPhoneLine';不包含';电话线状态转换';,c#,windows-phone-voip,C#,Windows Phone Voip,我只是从Ozeki VoIP SDK开始。 在我的register方法中,我的phoneLine无法识别PhoneLineStateChanged。 我的代码如下 public void Register(bool registrationRequired,string displayName, string userName, string authenticationId, string registerPassword, string domainHost, string domainPo

我只是从Ozeki VoIP SDK开始。 在我的register方法中,我的phoneLine无法识别PhoneLineStateChanged。 我的代码如下

public void Register(bool registrationRequired,string displayName, string userName, string authenticationId, string registerPassword, string domainHost, string domainPort)
    {
        try
        {
            var account = new SIPAccount(registrationRequired, displayName, userName, authenticationId, registerPassword, domainHost, domainPort);
            Console.WriteLine("\n Creating SIP account {0}", account);
            var natConfiguration = new NatConfiguration(NatTraversalMethod.None);
            var phoneLineConfiguration = new PhoneLineConfiguration(account);
            //phoneLine = softPhone.CreatePhoneLine(account);
            phoneLine = softPhone.CreatePhoneLine(phoneLineConfiguration);
            Console.WriteLine("Phoneline created.");
            phoneLine.PhoneLineStateChanged += phoneLine_PhoneLineStateChanged;
        }
        catch
        { }
    }
我的推荐信是

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ozeki.Network.Nat;
using Ozeki.VoIP;
using Ozeki.VoIP.SDK;

我忘记引用了吗?

查看SDK示例,似乎该事件实际上被称为
RegistrationStateChanged
。因此,这应该是可行的:

phoneLine.RegistrationStateChanged += phoneLine_PhoneLineStateChenged;

他们的示例也将其称为
phoneLine.PhoneLineStateChanged
,这有点误导。我想他们把它改名了。

你试过用A而不是E来改变它吗?(即PhoneLineStateChanged)A和e是什么?A是字母表的第一个字母。E是字母表中的第五个字母。我的观点是PhoneLineStateChensed不会起作用,因为这不是拼写更改的方式,API的创建者已更改了正确的拼写方式(使用A)。好吧,这是一个错误,但phoneLine也无法识别PhoneLineStateChensed!。我有一个新问题!当我运行我的程序时,程序不能运行这一行softPhone=SoftPhoneFactory.CreateSoftPhone(500010000);并将继续在这条线上奔跑@哈桑:最好就这一点发布一个新问题。