Esempio n. 1
0
        public void SetConfiguration(List <AccountConfig> listofAccounts)
        {
            _config = new PhoneConfig();
            _config.Accounts.Clear();
            foreach (var acc in listofAccounts)
            {
                _config.Accounts.Add(acc);
            }
            //   _config.PublishEnabled = true;


            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);

            pjsipRegistrar.Instance.registerAccounts();
            CCallManager.Instance.MediaProxy = new CMediaPlayerProxy();
        }
Esempio n. 2
0
        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();
        }