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

120 views Asked by At

I am just starting with Ozeki VoIP SDK. in my register method, my phoneLine does not recognize PhoneLineStateChanged. my code is below.

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
        { }
    }

and my references are

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;

did I forget a reference or what?

1

There are 1 answers

2
ProgrammingLlama On BEST ANSWER

Looking at the SDK examples, it seems that the event is actually called RegistrationStateChanged. So this should work:

phoneLine.RegistrationStateChanged += phoneLine_PhoneLineStateChenged;

It's a little misleading that their example also calls it phoneLine.PhoneLineStateChanged. I guess they renamed it.