public OutGoingCallEngine(string dialedNumber, ISoftPhone softPhone, IPhoneLine phoneLine)
        {
            _connector = new MediaConnector();
            _videoSender = new PhoneCallVideoSender();
            _audioSender = new PhoneCallAudioSender();

            var dial = new DialParameters(dialedNumber) { CallType = CallType.AudioVideo };
            Call = softPhone.CreateCallObject(phoneLine, dial);
            Call.CallStateChanged += _call_CallStateChanged;        

            _videoSender.AttachToCall(Call);
            _audioSender.AttachToCall(Call);
        }
        /// <summary>
        /// Starts dialling a number on the selected phone line.
        /// </summary>
        public void Dial(string dialNumber, CallType callType)
        {
            if (string.IsNullOrEmpty(dialNumber))
            {
                return;
            }

            var dialParams = new DialParameters(dialNumber);

            dialParams.CallType = callType;

            IPhoneCall call = softPhone.CreateCallObject(SelectedLine, dialParams);

            StartCall(call);
        }
        public OutGoingCallEngine(string dialedNumber, ISoftPhone softPhone, IPhoneLine phoneLine)
        {
            _connector   = new MediaConnector();
            _videoSender = new PhoneCallVideoSender();
            _audioSender = new PhoneCallAudioSender();

            var dial = new DialParameters(dialedNumber)
            {
                CallType = CallType.AudioVideo
            };

            Call = softPhone.CreateCallObject(phoneLine, dial);
            Call.CallStateChanged += _call_CallStateChanged;

            _videoSender.AttachToCall(Call);
            _audioSender.AttachToCall(Call);
        }
示例#4
0
        public void StartCall(string dial)
        {
            if (Call != null)
            {
                return;
            }

            var dialParams = new DialParameters(dial)
            {
                CallType = CallType.AudioVideo
            };
            var call = Softphone.CreateCallObject(PhoneLine, dialParams);

            call.CallStateChanged += SingleCall_CallStateChanged;
            ConnectToCall(call);
            call.Start();

            Call = call;
        }
        /// <summary>
        /// Starts dialling a number on the selected phone line.
        /// </summary>
        public void Dial(string dialNumber, CallType callType)
        {
            if (string.IsNullOrEmpty(dialNumber))
                return;

            var dialParams = new DialParameters(dialNumber);
            dialParams.CallType = callType;

            IPhoneCall call = softPhone.CreateCallObject(SelectedLine, dialParams);
            StartCall(call);
        }
        public void StartCall(string dial)
        {
            if (Call != null)
                return;

            var dialParams = new DialParameters(dial) { CallType = CallType.AudioVideo };
            var call = Softphone.CreateCallObject(PhoneLine, dialParams);
            call.CallStateChanged += SingleCall_CallStateChanged;
            ConnectToCall(call);
            call.Start();

            Call = call;
        }