예제 #1
0
        public void JoinLocation(AudioVideoCall incomingCall, Location location)
        {
            _location = location;

            // Call Leg 1
            BackToBackCallSettings settings1 = new BackToBackCallSettings(incomingCall);
            // Call Leg 2
            BackToBackCallSettings settings2 = new BackToBackCallSettings(new AudioVideoCall(location.Conversation));

            settings2.CallEstablishOptions = new AudioVideoCallEstablishOptions()
            {
                UseGeneratedIdentityForTrustedConference = true,
                SupportsReplaces = CapabilitySupport.Supported
            };

            // Create and establish the back to back call.
            _b2bCall = new BackToBackCall(settings1, settings2);
            _b2bCall.StateChanged += new EventHandler<BackToBackCallStateChangedEventArgs>(_b2bCall_StateChanged);
            _b2bCall.BeginEstablish(
                ar =>
                {
                    try
                    {
                        _b2bCall.EndEstablish(ar);

                        EstablishControlCall();
                    }
                    catch (RealTimeException ex)
                    {
                        Log(ex.ToString());
                    }
                },
                null);
        }
        public static Cargo NewCargo(TrackingId trackingId, Location origin, Location destination,
                                     DateTime arrivalDeadline)
        {           

            var routeSpecification = new RouteSpecification(origin, destination, arrivalDeadline);
            return new Cargo(trackingId, routeSpecification);
        }
예제 #3
0
 private static Voyage CreateVoyage(string id, Location from, Location to)
 {
     var carrierMovements = new List<CarrierMovement>
                                {new CarrierMovement(from, to, new DateTime(), new DateTime())};
     var schedule = new Schedule(carrierMovements);
     return new Voyage(new VoyageNumber(id), schedule);
 }
예제 #4
0
 public UserCall(string uri, AudioVideoCall avCall, Location location)
 {
     _uri = uri;
     JoinLocation(avCall, location);
 }