我刚开始使用 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;我忘记了参考资料还是什么?
1 回答
尚方宝剑之说
TA贡献1788条经验 获得超4个赞
查看 SDK 示例,似乎该事件实际上被称为RegistrationStateChanged
. 所以这应该有效:
phoneLine.RegistrationStateChanged += phoneLine_PhoneLineStateChenged;
他们的示例也将其称为 ,这有点误导phoneLine.PhoneLineStateChanged
。我猜他们改名了。
- 1 回答
- 0 关注
- 158 浏览
添加回答
举报
0/150
提交
取消