|
@@ -1,6 +1,7 @@
|
|
|
using CallCenter.Api.Realtimes;
|
|
|
using CallCenter.BlackLists;
|
|
|
using CallCenter.Caches;
|
|
|
+using CallCenter.Calls;
|
|
|
using CallCenter.Devices;
|
|
|
using CallCenter.Ivrs;
|
|
|
using CallCenter.Realtimes;
|
|
@@ -27,6 +28,7 @@ namespace CallCenter.Api.Controllers
|
|
|
private readonly IBlacklistDomainService _blacklistDomainService;
|
|
|
private readonly IIvrDomainService _ivrDomainService;
|
|
|
private readonly ICallCacheManager _callCacheManager;
|
|
|
+ private readonly ICallRepository _callRepository;
|
|
|
//private readonly ITypedCache<List<User>> _cache;
|
|
|
//private readonly ICacheManager<User> _cache;
|
|
|
|
|
@@ -43,7 +45,8 @@ namespace CallCenter.Api.Controllers
|
|
|
IRealtimeService realtimeService,
|
|
|
IBlacklistDomainService blacklistDomainService,
|
|
|
IIvrDomainService ivrDomainService,
|
|
|
- ICallCacheManager callCacheManager
|
|
|
+ ICallCacheManager callCacheManager,
|
|
|
+ ICallRepository callRepository
|
|
|
)
|
|
|
{
|
|
|
_logger = logger;
|
|
@@ -56,6 +59,7 @@ namespace CallCenter.Api.Controllers
|
|
|
_blacklistDomainService = blacklistDomainService;
|
|
|
_ivrDomainService = ivrDomainService;
|
|
|
_callCacheManager = callCacheManager;
|
|
|
+ _callRepository = callRepository;
|
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
@@ -140,7 +144,10 @@ namespace CallCenter.Api.Controllers
|
|
|
[HttpGet("callqueue")]
|
|
|
public async Task CallQueueTest()
|
|
|
{
|
|
|
+ var call = await _callRepository.GetAsync("08db40b1-c96a-4b2b-8b9d-ea0e3fdabdb0", HttpContext.RequestAborted);
|
|
|
+ _callCacheManager.AddCallCache(call);
|
|
|
await _realtimeService.CallQueueAsync(_callCacheManager.GetCallQueueList(),HttpContext.RequestAborted);
|
|
|
+ _callCacheManager.RemoveCallCache(call.Id);
|
|
|
}
|
|
|
|
|
|
|