'IPhoneLine' 不包含 'PhoneLineStateChenged' 的定义

'IPhoneLine' does not contain a definition for 'PhoneLineStateChenged'

我刚开始使用 Ozeki VoIP SDK。 在我的注册方法中,我的 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,这有点误导。我猜他们改名了。