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

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

            CallInfo info = GetCallInfo();//TODO: move to inviteSession

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