public override void Setup()
 {
     base.Setup();
     _callMgr = _fixture.Freeze<Mock<ICallManagerInternal>>();
     _call = _fixture.Freeze<Mock<ICallInternal>>();
     _session = _fixture.CreateAnonymous<InviteSession>();
 }
Beispiel #2
0
        public Call(ICallManagerInternal callManager, ILocalRegistry registry, IConferenceBridge conferenceBridge)
        {
            Id = -1;
            Helper.GuardNotNull(callManager);
            Helper.GuardNotNull(conferenceBridge);
            Helper.GuardNotNull(registry);
            _callManager = callManager;

            _inviteSession = new InviteSession(this, callManager);
            _inviteSession.StateChanged += delegate { OnStateChanged(); };
            _mediaSession = new MediaSession(this, registry, callManager, conferenceBridge);
            _mediaSession.StateChanged += delegate { OnStateChanged(); };

            CallInfo info = GetCallInfo();

            if (info != null)
            {
                IsIncoming = info.Role == SipRole.RoleUas;
            }
        }
 public override void Teardown()
 {
     base.Teardown();
     _call = null;
     _session = null;
 }