/// <summary> /// Destroy call. Calculate call duration time, edit call log, destroy session. /// </summary> public override void Destroy() { // stop tones & timers StopAllTimers(); MediaProxy.stopTone(); // Calculate timing if (true == Counting) { Duration = DateTime.Now.Subtract(Time); } Counting = false; // update call log if (((Type != ECallType.EDialed) || (CallingNumber.Length > 0)) && (Type != ECallType.EUndefined)) { CallLoger.addCall(Type, CallingNumber, CallingName, Time, Duration); CallLoger.save(); } // reset data CallingNumber = ""; Incoming = false; ChangeState(EStateId.IDLE); if (null != _manager) { _manager.DestroySession(Session); } }
internal override void OnEntry() { // set incoming call flags _smref.Incoming = true; int sessionId = SessionId; // Start no response timer _smref.StartTimer(ETimerType.ENORESPONSE); CallProxy.alerted(); _smref.Type = ECallType.EMissed; MediaProxy.playTone(ETones.EToneRing); // if CFNR active start timer if (_smref.Config.CFNRFlag) { _smref.StartTimer(ETimerType.ENOREPLY); } // auto answer call (if single call) if ((_smref.Config.AAFlag == true) && (_smref.NumberOfCalls == 1)) { this.acceptCall(); } }
internal override void OnEntry() { if (_smref.Config.AudioPlayOutgoing) { Task.Factory.StartNew(() => MediaProxy.playTone(ETones.EToneRingback), TaskCreationOptions.PreferFairness); } }
public override void onEntry() { _smref.Incoming = true; int sessionId = _smref.Session; if ((_smref.Config.CFUFlag == true) && (_smref.Config.CFUNumber.Length > 0)) { CallProxy.serviceRequest(sessionId, (int)EServiceCodes.SC_CFU, _smref.Config.CFUNumber); } else if (_smref.Config.DNDFlag == true) { CallProxy.serviceRequest(sessionId, (int)EServiceCodes.SC_DND, ""); } else if (_smref.Config.AAFlag == true) { this.acceptCall(sessionId); } else { CallProxy.alerted(sessionId); _smref.Type = ECallType.EMissed; MediaProxy.playTone(ETones.EToneRing); } // if CFNR active start timer if (_smref.Config.CFNRFlag) { _smref.startTimer(ETimerType.ENOREPLY); } }
/// <summary> /// Enter release state. If release timer not implemented release call imediately /// </summary> internal override void OnEntry() { MediaProxy.playTone(ETones.EToneCongestion); bool success = _smref.StartTimer(ETimerType.ERELEASED); if (!success) { _smref.Destroy(); } }
/// <summary> /// Enter release state. If release timer not implemented release call imediately /// </summary> public override void onEntry() { MediaProxy.playTone(ETones.EToneCongestion); bool success = _smref.startTimer(ETimerType.ERELEASED); if (!success) { _smref.destroy(); } }
internal override void OnEntry() { _smref.Counting = true; foreach (var callItem in CCallManager.Instance[EStateId.INCOMING]) { var call = callItem; if (call != null) { Task.Factory.StartNew(() => call.MediaProxy.stopTone(), TaskCreationOptions.PreferFairness); } } Task.Factory.StartNew(() => MediaProxy.stopTone(), TaskCreationOptions.PreferFairness); }
internal override void OnEntry() { // set incoming call flags _smref.Incoming = true; int sessionId = SessionId; // drop call if pause flag if (_smref.Config.PauseFlag) { this.endCall(); return; } // Start no response timer _smref.StartTimer(ETimerType.ENORESPONSE); CallProxy.alerted(); _smref.Type = ECallType.EMissed; // Don't play any sounds while active calls persist if (_smref.Config.AudioPlayOnIncoming && (this._smref.NumberOfCalls == 1 || _smref.Config.AudioPlayOnIncomingAndActive)) { Task.Factory.StartNew(() => MediaProxy.playTone(ETones.EToneRing), TaskCreationOptions.PreferFairness); } // if CFNR active start timer if (_smref.Config.CFNRFlag) { _smref.StartTimer(ETimerType.ENOREPLY); } // auto answer call (if single call) if ((_smref.Config.AAFlag == true) && (_smref.NumberOfCalls == 1)) { this.acceptCall(); } }
public void Apply() { _convertOperation.Trim = _trim; _convertOperation.LoudnessCheck = _loudnessCheck; _convertOperation.AudioVolume = _audioVolume; _convertOperation.StartTC = _startTC; _convertOperation.Duration = _duration; _convertOperation.SourceFieldOrderEnforceConversion = _sourceFieldOrderEnforceConversion; _convertOperation.AudioChannelMappingConversion = _audioChannelMappingConversion; _convertOperation.AspectConversion = _aspectConversion; _convertOperation.SourceFieldOrderEnforceConversion = _sourceFieldOrderEnforceConversion; IMediaProperties newMediaProperties; if (_convertOperation.DestMediaProperties is IPersistentMediaProperties) { newMediaProperties = PersistentMediaProxy.FromMedia(_convertOperation.DestMediaProperties as IPersistentMediaProperties); } else { newMediaProperties = MediaProxy.FromMedia(_convertOperation.DestMediaProperties); } newMediaProperties.MediaName = _destMediaName; if (newMediaProperties is IPersistentMediaProperties) { ((IPersistentMediaProperties)newMediaProperties).IdAux = _idAux; ((IPersistentMediaProperties)newMediaProperties).MediaEmphasis = _destMediaEmphasis; } newMediaProperties.VideoFormat = _destMediaVideoFormat; newMediaProperties.FileName = _destFileName; newMediaProperties.TcStart = _startTC; newMediaProperties.TcPlay = _startTC; newMediaProperties.Duration = _duration; newMediaProperties.DurationPlay = _duration; newMediaProperties.MediaCategory = _destCategory; newMediaProperties.Parental = _destParental; _convertOperation.DestMediaProperties = newMediaProperties; //required to pass this parameter from client to server application }
/// <summary> /// Destroy call. Calculate call duration time, edit call log, destroy session. /// </summary> public override void Destroy() { // stop tones & timers StopAllTimers(); Task.Factory.StartNew(() => MediaProxy.stopTone(), TaskCreationOptions.PreferFairness); // Calculate timing if (true == Counting) { Duration = DateTime.Now.Subtract(Time); } Counting = false; // reset data CallingNumber = ""; Incoming = false; ChangeState(EStateId.IDLE); if (null != _manager) { _manager.DestroySession(Session); } }
public override void onExit() { MediaProxy.stopTone(); }
internal override void OnEntry() { _smref.Counting = true; MediaProxy.stopTone(); }
internal override void OnExit() { Task.Factory.StartNew(() => MediaProxy.stopTone(), TaskCreationOptions.PreferFairness); _smref.StopAllTimers(); }
internal override void OnExit() { MediaProxy.stopTone(); _smref.StopAllTimers(); }
public override void onEntry() { MediaProxy.playTone(ETones.EToneRingback); }
public override void onEntry() { MediaProxy.playTone(ETones.EToneCongestion); _smref.startTimer(ETimerType.ERELEASED); }
public override void onExit() { MediaProxy.stopTone(); _smref.stopAllTimers(); }
internal override void OnEntry() { MediaProxy.playTone(ETones.EToneRingback); }
internal override void OnExit() { MediaProxy.stopTone(); }
public override void onEntry() { _smref.Counting = true; MediaProxy.stopTone(); }