public override bool retrieveCall() { _smref.RetrieveRequested = true; CallProxy.retrieveCall(); _smref.ChangeState(EStateId.ACTIVE); return(true); }
public override bool retrieveCall(int sessionId) { _smref.RetrieveRequested = true; CallProxy.retrieveCall(sessionId); _smref.changeState(EStateId.ACTIVE); return(true); }
public async Task <WrappedResponse <ProjectDefinition> > InsertAsync([FromBody] ProjectDefinition projectDefinition) { using (CallProxy) { return(await CallProxy.CallAsync(async() => await projectDefinitionWriter.InsertAsync(projectDefinition))); } }
public async Task <WrappedResponse <bool> > RunByIdAsync([FromQuery] Guid projectId) { using (CallProxy) { return(await CallProxy.CallAsync(async() => await runner.RunAsync(projectId))); } }
/// <summary> /// Handle incoming call requests. Check for supplementary services flags. /// </summary> /// <param name="callingNo"></param> /// <param name="display"></param> public override void incomingCall(string callingNo, string display, IEnumerable <KeyValuePair <string, string> > headers) { // check supplementary services flags if ((_smref.Config.CFUFlag == true) && (_smref.Config.CFUNumber.Length > 0)) { // do NOT notify about state changes _smref.DisableStateNotifications = true; CallProxy.serviceRequest((int)EServiceCodes.SC_CFU, _smref.Config.CFUNumber); this.endCall(); return; } else if (_smref.Config.DNDFlag == true) { // do NOT notify about state changes _smref.DisableStateNotifications = true; CallProxy.serviceRequest((int)EServiceCodes.SC_DND, ""); this.endCall(); return; } _smref.CallingNumber = callingNo; _smref.CallingName = display; _smref.Headers = headers; _smref.ChangeState(EStateId.INCOMING); }
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); } }
public override bool connectCallMedia(int targetCallId) { retrieveCall(); _smref.IsConference = CallProxy.connectCallMedia(targetCallId); return(_smref.IsConference); }
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(); } }
public async Task <WrappedResponse <ImmutableList <ProjectDefinition> > > GetAllAsync() { using (CallProxy) { return(await CallProxy.CallAsync(async() => await projectDefinitionsReader.GetAllProjectDefinitionsAsync())); } }
public override bool endCall() { // try once more (might not be needed)! CallProxy.endCall(); // destroy it! _smref.Destroy(); return(true); }
public override bool endCall(int sesionnId) { _smref.Duration = System.DateTime.Now.Subtract(_smref.Time); CallProxy.endCall(sesionnId); _smref.destroy(); return(base.endCall(sesionnId)); }
/// <summary> /// Make call to a given number and accountId. Assign sessionId to call state machine got from VoIP part. /// </summary> /// <param name="dialedNo"></param> /// <param name="accountId"></param> /// <returns></returns> public override int makeCall(string dialedNo, Sipek.Sip.SipHeader[] headers) { _smref.CallingNumber = dialedNo; // make call and save sessionId _smref.ChangeState(EStateId.CONNECTING); _smref.Session = CallProxy.makeCall(dialedNo, headers); return(_smref.Session); }
public override bool endCall() { _smref.Duration = System.DateTime.Now.Subtract(_smref.Time); _smref.changeState(EStateId.TERMINATED); CallProxy.endCall(); return(base.endCall()); }
/// <summary> /// Make call to a given number and accountId. Assign sessionId to call state machine got from VoIP part. /// </summary> /// <param name="dialedNo"></param> /// <param name="accountId"></param> /// <returns></returns> public override int makeCall(string dialedNo, int accountId) { _smref.CallingNumber = dialedNo; // make call and save sessionId _smref.ChangeState(EStateId.CONNECTING); _smref.Session = CallProxy.makeCall(dialedNo, accountId); return(_smref.Session); }
public override bool acceptCall() { _smref.Type = ECallType.EReceived; _smref.Time = System.DateTime.Now; CallProxy.acceptCall(); _smref.ChangeState(EStateId.ACTIVE); return(true); }
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 override void onAlerting() { CallProxy.endCall(); }
public override bool conferenceCall() { return(CallProxy.conferenceCall()); }
public override bool xferCallSession(int partnersession) { return(CallProxy.xferCallSession(partnersession)); }
public override bool xferCall(string number) { return(CallProxy.xferCall(number)); }
public override bool holdCall() { _smref.HoldRequested = true; return(CallProxy.holdCall()); }
public override void onConnect() { CallProxy.endCall(); }
/// <summary> /// Response timer expired. Releasing the call... /// </summary> /// <param name="sessionId"></param> /// <returns></returns> public override bool noResponseTimerExpired(int sessionId) { _smref.ChangeState(EStateId.TERMINATED); CallProxy.endCall(); return(true); }
public override bool endCall() { _smref.Destroy(); CallProxy.endCall(); return(base.endCall()); }
public override bool sendCallMessage(string message) { return(CallProxy.sendCallMessage(message)); }
public override bool serviceRequest(int code, string dest) { CallProxy.serviceRequest(code, dest); return(true); }
public override bool dialDtmf(string digits, EDtmfMode mode) { CallProxy.dialDtmf(digits, mode); return(true); }
public override bool xferCall(string number) { // In fact this is not Tranfser. It's Deflect => redirect... return(CallProxy.serviceRequest((int)EServiceCodes.SC_CD, number)); }
public override bool endCall() { _smref.ChangeState(EStateId.TERMINATED); CallProxy.endCall(); return(base.endCall()); }
/// <summary> /// No reply timer expired. Send service code to call proxy. /// </summary> /// <param name="sessionId"></param> /// <returns></returns> public override bool noReplyTimerExpired(int sessionId) { CallProxy.serviceRequest((int)EServiceCodes.SC_CFNR, _smref.Config.CFUNumber); return(true); }