internal PhoneConfig(AccountConfig account) { _acclist.Clear(); _acclist.Add(account); //AccountConfig c = new AccountConfig(); //c.AccountName = "105"; //c.DisplayName = "105"; //c.UserName = "******"; //c.Id = "105"; //c.Password = "******"; //c.HostName = "192.168.0.16"; //c.TransportMode = ETransportMode.TM_UDP; //c.ProxyAddress = ""; //_acclist.Add(c); }
public void SetConfiguration(AccountConfig objAccount) { _config = new PhoneConfig(objAccount); CallManager.CallStateRefresh += new DCallStateRefresh(CallManager_CallStateRefresh); pjsipRegistrar.Instance.AccountStateChanged += new Sipek.Common.DAccountStateChanged(Instance_AccountStateChanged); CallManager.StackProxy = pjsipStackProxy.Instance; CallManager.Config = Config; pjsipStackProxy.Instance.Config = Config; pjsipRegistrar.Instance.Config = Config; CallManager.Initialize(); CallManager.IncomingCallNotification += new DIncomingCallNotification(CallManager_IncomingCallNotification); // CallManager.CallAnswerNotification += new CCallManager.OnAnswerCall(CallManager_CallAnswerNotification); pjsipRegistrar.Instance.registerAccounts(); CCallManager.Instance.MediaProxy = new CMediaPlayerProxy(); }