|
@@ -15,10 +15,11 @@ using NewRock.Sdk.Control.Response;
|
|
|
using System.Text.RegularExpressions;
|
|
|
using XF.Domain.Dependency;
|
|
|
using XF.Domain.Exceptions;
|
|
|
-using Group = NewRock.Sdk.Control.Request.Group;
|
|
|
using Hotline.Share.Dtos.CallCenter;
|
|
|
using Hotline.Share.Enums.CallCenter;
|
|
|
using Hotline.Caching.Interfaces;
|
|
|
+using Hotline.CallCenter.Configs;
|
|
|
+using Group = NewRock.Sdk.Control.Request.Group;
|
|
|
|
|
|
namespace Hotline.NewRock
|
|
|
{
|
|
@@ -26,17 +27,25 @@ namespace Hotline.NewRock
|
|
|
{
|
|
|
private readonly INewRockClient _newRockClient;
|
|
|
private readonly ICallRepository _callRepository;
|
|
|
- private readonly IOptionsSnapshot<CallCenterConfiguration> _options;
|
|
|
+ //private readonly IOptionsSnapshot<CallCenterConfiguration> _options;
|
|
|
private readonly IMapper _mapper;
|
|
|
private readonly ITelGroupRepository _telGroupRepository;
|
|
|
private readonly IUserCacheManager _userCacheManager;
|
|
|
private readonly ITelRestRepository _telRestRepository;
|
|
|
private readonly ITelCacheManager _telCacheManager;
|
|
|
|
|
|
- public DeviceManager(INewRockClient newRockClient, IOptionsSnapshot<CallCenterConfiguration> options, IMapper mapper, ICallRepository callRepository, ITelGroupRepository telGroupRepository,IUserCacheManager userCacheManager, ITelRestRepository telRestRepository, ITelCacheManager telCacheManager)
|
|
|
+ public DeviceManager(
|
|
|
+ INewRockClient newRockClient,
|
|
|
+ //IOptionsSnapshot<CallCenterConfiguration> options,
|
|
|
+ IMapper mapper,
|
|
|
+ ICallRepository callRepository,
|
|
|
+ ITelGroupRepository telGroupRepository,
|
|
|
+ IUserCacheManager userCacheManager,
|
|
|
+ ITelRestRepository telRestRepository,
|
|
|
+ ITelCacheManager telCacheManager)
|
|
|
{
|
|
|
_newRockClient = newRockClient;
|
|
|
- _options = options;
|
|
|
+ //_options = options;
|
|
|
_mapper = mapper;
|
|
|
_callRepository = callRepository;
|
|
|
_telGroupRepository = telGroupRepository;
|
|
@@ -47,13 +56,13 @@ namespace Hotline.NewRock
|
|
|
|
|
|
#region 查询
|
|
|
|
|
|
- public async Task<TelDto> QueryTelAsync(string TelNo, CancellationToken cancellationToken)
|
|
|
+ public async Task<TelDto> QueryTelAsync(NewRockConfiguration newRockConfiguration, string TelNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
var result = await _newRockClient.QueryExt(
|
|
|
new QueryExtRequest() { Attribute = "Query", Ext = new Ext { Id = TelNo } },
|
|
|
- _options.Value.DeviceConfigs.ReceiveKey, _options.Value.DeviceConfigs.Expired, cancellationToken);
|
|
|
+ newRockConfiguration.ReceiveKey, newRockConfiguration.Expired, cancellationToken);
|
|
|
|
|
|
if (result?.Ext.Outer != null)
|
|
|
{
|
|
@@ -123,11 +132,11 @@ namespace Hotline.NewRock
|
|
|
/// <param name="TelNo"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<ETelStatus> QueryTelState(string TelNo, CancellationToken cancellationToken)
|
|
|
+ public async Task<ETelStatus> QueryTelState(NewRockConfiguration newRockConfiguration, string TelNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
var result = await _newRockClient.QueryExt(
|
|
|
new QueryExtRequest() { Attribute = "Query", Ext = new Ext { Id = TelNo } },
|
|
|
- _options.Value.DeviceConfigs.ReceiveKey, _options.Value.DeviceConfigs.Expired, cancellationToken);
|
|
|
+ newRockConfiguration.ReceiveKey, newRockConfiguration.Expired, cancellationToken);
|
|
|
|
|
|
switch (result.Ext.State)
|
|
|
{
|
|
@@ -152,12 +161,12 @@ namespace Hotline.NewRock
|
|
|
/// </summary>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<List<Tel>> QueryTelsAsync(CancellationToken cancellationToken)
|
|
|
+ public async Task<List<Tel>> QueryTelsAsync(NewRockConfiguration newRockConfiguration, CancellationToken cancellationToken)
|
|
|
{
|
|
|
var result = await _newRockClient.QueryDeviceInfo(
|
|
|
new QueryDeviceInfoRequest { Attribute = "Query", DeviceInfo = string.Empty },
|
|
|
- _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
var exts = result.Devices.Ext;
|
|
|
return _mapper.Map<List<Tel>>(exts);
|
|
@@ -168,12 +177,12 @@ namespace Hotline.NewRock
|
|
|
/// </summary>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<List<TelGroup>> QueryTelGroupsAsync(CancellationToken cancellationToken)
|
|
|
+ public async Task<List<TelGroup>> QueryTelGroupsAsync(NewRockConfiguration newRockConfiguration, CancellationToken cancellationToken)
|
|
|
{
|
|
|
var result = await _newRockClient.QueryDeviceInfo(
|
|
|
new QueryDeviceInfoRequest { Attribute = "Query", DeviceInfo = string.Empty },
|
|
|
- _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
|
|
|
var groups = result.Devices.Group;
|
|
@@ -185,24 +194,24 @@ namespace Hotline.NewRock
|
|
|
/// </summary>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<string> VoiceQueryListAsync(CancellationToken cancellationToken)
|
|
|
+ public async Task<string> VoiceQueryListAsync(NewRockConfiguration newRockConfiguration, CancellationToken cancellationToken)
|
|
|
{
|
|
|
var result = await _newRockClient.VoiceQueryList(new VoiceQueryListRequest()
|
|
|
{
|
|
|
Attribute = "Query",
|
|
|
VoiceFile = "",
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
return result?.VoiceFile;
|
|
|
}
|
|
|
|
|
|
- public async Task QueryGroupAsync(string groupId, CancellationToken cancellationToken)
|
|
|
+ public async Task QueryGroupAsync(NewRockConfiguration newRockConfiguration, string groupId, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.QueryExtGroup(new QueryExtGroupRequest()
|
|
|
{ Attribute = "Query", Group = new QueryExtGroup() { Id = groupId } },
|
|
|
- _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken
|
|
|
);
|
|
|
}
|
|
@@ -217,14 +226,14 @@ namespace Hotline.NewRock
|
|
|
/// <param name="telNo">分机号</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task TelRestAsync(string telNo, CancellationToken cancellationToken)
|
|
|
+ public async Task TelRestAsync(NewRockConfiguration newRockConfiguration, string telNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
var telModel = await _newRockClient.QueryExt(new QueryExtRequest()
|
|
|
{
|
|
|
Attribute = "Query",
|
|
|
Ext = new Ext() { Id = telNo }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
|
|
|
if (telModel == null)
|
|
@@ -232,8 +241,8 @@ namespace Hotline.NewRock
|
|
|
|
|
|
await _newRockClient.ConfigExt(
|
|
|
new AssginConfigExtRequest() { Attribute = "Assign", Ext = new ConfigExt() { Lineid = telModel.Ext.LineId, Groups=Enumerable.Select<QueryExtGroup, string>(telModel.Ext.Group, x=>x.Id).ToList(), No_Disturb = "On" } },
|
|
|
- _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -243,14 +252,14 @@ namespace Hotline.NewRock
|
|
|
/// <param name="telNo">分机号</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task TelEndRestAsync(string telNo, CancellationToken cancellationToken)
|
|
|
+ public async Task TelEndRestAsync(NewRockConfiguration newRockConfiguration, string telNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
var telModel = await _newRockClient.QueryExt(new QueryExtRequest()
|
|
|
{
|
|
|
Attribute = "Query",
|
|
|
Ext = new Ext() { Id = telNo }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
|
|
|
if (telModel == null)
|
|
@@ -258,8 +267,8 @@ namespace Hotline.NewRock
|
|
|
|
|
|
await _newRockClient.ConfigExt(
|
|
|
new AssginConfigExtRequest() { Attribute = "Assign", Ext = new ConfigExt() { Lineid = telModel.Ext.LineId, Groups = Enumerable.Select<QueryExtGroup, string>(telModel.Ext.Group, x => x.Id).ToList(), No_Disturb = "Off" } },
|
|
|
- _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -269,14 +278,14 @@ namespace Hotline.NewRock
|
|
|
/// <param name="voiceName"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task RemoveVoiceFileAsync(string voiceName, CancellationToken cancellationToken)
|
|
|
+ public async Task RemoveVoiceFileAsync(NewRockConfiguration newRockConfiguration, string voiceName, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.RemoveVoiceFile(new RemoveVoiceFileRequest()
|
|
|
{
|
|
|
Attribute = "Remove",
|
|
|
VoiceFile = voiceName
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -290,7 +299,7 @@ namespace Hotline.NewRock
|
|
|
/// <param name="exit"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task AssginConfigMenuAsync(string menuId, string voiceFile, string repeat, string infoLength,
|
|
|
+ public async Task AssginConfigMenuAsync(NewRockConfiguration newRockConfiguration, string menuId, string voiceFile, string repeat, string infoLength,
|
|
|
string exit,
|
|
|
CancellationToken cancellationToken)
|
|
|
{
|
|
@@ -318,8 +327,8 @@ namespace Hotline.NewRock
|
|
|
Exit = exit,
|
|
|
Repeat = repeat,
|
|
|
}
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -332,7 +341,7 @@ namespace Hotline.NewRock
|
|
|
/// <param name="ext"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task AssginConfigGroupAsync(string groupId, EDistribution distribution, List<string> ext, string? voiceFile = "",CancellationToken cancellationToken=default)
|
|
|
+ public async Task AssginConfigGroupAsync(NewRockConfiguration newRockConfiguration, string groupId, EDistribution distribution, List<string> ext, string? voiceFile = "",CancellationToken cancellationToken=default)
|
|
|
{
|
|
|
if (!int.TryParse(groupId, out int mId))
|
|
|
throw new UserFriendlyException("请输入数字");
|
|
@@ -367,8 +376,8 @@ namespace Hotline.NewRock
|
|
|
{
|
|
|
Attribute = "Assign",
|
|
|
Group = groupModel
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -381,7 +390,7 @@ namespace Hotline.NewRock
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <param name="isAdd"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task ModifyGroupExtAsync(string groupId, EDistribution distribution, string voicefile = "", string extId = "", bool isAdd = true, CancellationToken cancellationToken = default)
|
|
|
+ public async Task ModifyGroupExtAsync(NewRockConfiguration newRockConfiguration, string groupId, EDistribution distribution, string voicefile = "", string extId = "", bool isAdd = true, CancellationToken cancellationToken = default)
|
|
|
{
|
|
|
if (!int.TryParse(groupId, out int mId))
|
|
|
throw new UserFriendlyException("请输入数字");
|
|
@@ -391,7 +400,7 @@ namespace Hotline.NewRock
|
|
|
|
|
|
#region 清除分机组设置
|
|
|
|
|
|
- await _newRockClient.ConfigExtGroup(new AssginConfigGroupRequest() { Attribute = "Assign", Group = new Group() { Id = groupId } }, _options.Value.DeviceConfigs.ReceiveKey, _options.Value.DeviceConfigs.Expired, cancellationToken);
|
|
|
+ await _newRockClient.ConfigExtGroup(new AssginConfigGroupRequest() { Attribute = "Assign", Group = new Group() { Id = groupId } }, newRockConfiguration.ReceiveKey, newRockConfiguration.Expired, cancellationToken);
|
|
|
|
|
|
#endregion
|
|
|
|
|
@@ -445,8 +454,8 @@ namespace Hotline.NewRock
|
|
|
groupModel.Ext = exts;
|
|
|
await _newRockClient.ConfigExtGroup(
|
|
|
new AssginConfigGroupRequest() { Attribute = "Assign", Group = groupModel, },
|
|
|
- _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken
|
|
|
);
|
|
|
}
|
|
@@ -458,14 +467,14 @@ namespace Hotline.NewRock
|
|
|
/// <param name="staffNo"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task UpdateStaffNoAsync(string telNo, string staffNo,string lineId, CancellationToken cancellationToken)
|
|
|
+ public async Task UpdateStaffNoAsync(NewRockConfiguration newRockConfiguration, string telNo, string staffNo,string lineId, CancellationToken cancellationToken)
|
|
|
{
|
|
|
var telModel = await _newRockClient.QueryExt(new QueryExtRequest()
|
|
|
{
|
|
|
Attribute = "Query",
|
|
|
Ext = new Ext() { Id = telNo }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
|
|
|
if (telModel == null)
|
|
@@ -473,8 +482,8 @@ namespace Hotline.NewRock
|
|
|
|
|
|
await _newRockClient.ConfigExt(
|
|
|
new AssginConfigExtRequest() { Attribute = "Assign", Ext = new ConfigExt() { Id = telNo,Lineid = lineId, Staffid = staffNo } },
|
|
|
- _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
#endregion
|
|
@@ -487,11 +496,11 @@ namespace Hotline.NewRock
|
|
|
/// <param name="telNo">分机号</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task HoldAsync(string telNo, CancellationToken cancellationToken)
|
|
|
+ public async Task HoldAsync(NewRockConfiguration newRockConfiguration, string telNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.HoldOrUnHold(
|
|
|
- new HoldSetRequest() { Attribute = "Hold", Ext = new Ext() { Id = telNo } }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ new HoldSetRequest() { Attribute = "Hold", Ext = new Ext() { Id = telNo } }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -501,11 +510,11 @@ namespace Hotline.NewRock
|
|
|
/// <param name="telNo">分机号</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task UnHoldAsync(string telNo, CancellationToken cancellationToken)
|
|
|
+ public async Task UnHoldAsync(NewRockConfiguration newRockConfiguration, string telNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.HoldOrUnHold(
|
|
|
- new HoldSetRequest() { Attribute = "Unhold", Ext = new Ext() { Id = telNo } }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ new HoldSetRequest() { Attribute = "Unhold", Ext = new Ext() { Id = telNo } }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -515,11 +524,11 @@ namespace Hotline.NewRock
|
|
|
/// <param name="telNo">分机号</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task MuteAsync(string telNo, CancellationToken cancellationToken)
|
|
|
+ public async Task MuteAsync(NewRockConfiguration newRockConfiguration, string telNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.MuteOrUnMute(
|
|
|
- new MuteSetRequest() { Attribute = "Mute", Ext = new Ext() { Id = telNo } }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ new MuteSetRequest() { Attribute = "Mute", Ext = new Ext() { Id = telNo } }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -529,12 +538,12 @@ namespace Hotline.NewRock
|
|
|
/// <param name="telNo">分机号</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task UnMuteAsync(string telNo, CancellationToken cancellationToken)
|
|
|
+ public async Task UnMuteAsync(NewRockConfiguration newRockConfiguration, string telNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.MuteOrUnMute(
|
|
|
new MuteSetRequest() { Attribute = "Unmute", Ext = new Ext() { Id = telNo } },
|
|
|
- _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -544,7 +553,7 @@ namespace Hotline.NewRock
|
|
|
/// <param name="extId"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task ClearExtAsync(string extId, CancellationToken cancellationToken)
|
|
|
+ public async Task ClearExtAsync(NewRockConfiguration newRockConfiguration, string extId, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.ClearCall(new ClearCallRequest()
|
|
|
{
|
|
@@ -553,8 +562,8 @@ namespace Hotline.NewRock
|
|
|
{
|
|
|
Id = extId
|
|
|
}
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -564,14 +573,14 @@ namespace Hotline.NewRock
|
|
|
/// <param name="visitorId"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task ClearVisitorAsync(string visitorId, CancellationToken cancellationToken)
|
|
|
+ public async Task ClearVisitorAsync(NewRockConfiguration newRockConfiguration, string visitorId, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.ClearCall(new ClearCallRequest()
|
|
|
{
|
|
|
Attribute = "Clear",
|
|
|
Visitor = new ClearCallVisitor() { Id = visitorId }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -581,14 +590,14 @@ namespace Hotline.NewRock
|
|
|
/// <param name="outerId"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task ClearOuterAsync(string outerId, CancellationToken cancellationToken)
|
|
|
+ public async Task ClearOuterAsync(NewRockConfiguration newRockConfiguration, string outerId, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.ClearCall(new ClearCallRequest()
|
|
|
{
|
|
|
Attribute = "Clear",
|
|
|
Outer = new ClearCallOuter() { Id = outerId }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -598,14 +607,14 @@ namespace Hotline.NewRock
|
|
|
/// <param name="visitorId"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task AcceptVisitorAsync(string visitorId, CancellationToken cancellationToken)
|
|
|
+ public async Task AcceptVisitorAsync(NewRockConfiguration newRockConfiguration, string visitorId, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.AcceptVisitor(new AcceptVisitorRequest()
|
|
|
{
|
|
|
Attribute = "Accept",
|
|
|
Visitor = new AcceptVisitorModel() { Id = visitorId }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
#endregion
|
|
@@ -619,15 +628,15 @@ namespace Hotline.NewRock
|
|
|
/// <param name="to">被叫分机号</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task ExtToExtAsync(string from, string to, CancellationToken cancellationToken)
|
|
|
+ public async Task ExtToExtAsync(NewRockConfiguration newRockConfiguration, string from, string to, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.ExtensionToExtension(
|
|
|
new ExtensionToExtensionRequest()
|
|
|
{
|
|
|
Attribute = "Connect",
|
|
|
Exts = new List<ExtToExtExt>() { new ExtToExtExt() { Id = from }, new ExtToExtExt() { Id = to } }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -639,7 +648,7 @@ namespace Hotline.NewRock
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <param name="trunkid">指定中继线路(可为空),为空时默认由OM分配</param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task ExtToOuterAsync(string from, string to, CancellationToken cancellationToken, string trunkid = "")
|
|
|
+ public async Task ExtToOuterAsync(NewRockConfiguration newRockConfiguration, string from, string to, CancellationToken cancellationToken, string trunkid = "")
|
|
|
{
|
|
|
await _newRockClient.ExtToOuter(
|
|
|
new ExtToOuterRequest()
|
|
@@ -649,8 +658,8 @@ namespace Hotline.NewRock
|
|
|
Outer = new ExtToOuterOuterRequest() { To = to },
|
|
|
Trunk = new ExtToOuterTrunkRequest() { Id = trunkid }
|
|
|
},
|
|
|
- _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -662,15 +671,15 @@ namespace Hotline.NewRock
|
|
|
/// <param name="telNo">分机号</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task VisitorToExtAsync(string visitorId, string telNo, CancellationToken cancellationToken)
|
|
|
+ public async Task VisitorToExtAsync(NewRockConfiguration newRockConfiguration, string visitorId, string telNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.VisitorToExt(new VisitorToExtRequest()
|
|
|
{
|
|
|
Attribute = "Connect",
|
|
|
Visitor = new VisitorToExtVisitor() { Id = visitorId },
|
|
|
Ext = new VisitorToExtExt() { Id = telNo }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -682,7 +691,7 @@ namespace Hotline.NewRock
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <param name="display">来电号码,用来透传主叫号码,使去电方的来电显示号码为实际来电号码。</param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task VisitorToOuterAsync(string visitorId, string outerPhoneNum, CancellationToken cancellationToken,
|
|
|
+ public async Task VisitorToOuterAsync(NewRockConfiguration newRockConfiguration, string visitorId, string outerPhoneNum, CancellationToken cancellationToken,
|
|
|
string display = "")
|
|
|
{
|
|
|
await _newRockClient.VisitorToOuter(new VisitorToOuterRequest()
|
|
@@ -691,8 +700,8 @@ namespace Hotline.NewRock
|
|
|
Visitor = new VisitorToOuterVisitor() { Id = visitorId },
|
|
|
Outer = new VisitorToOuterOuter() { To = outerPhoneNum, Display = display },
|
|
|
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -704,15 +713,15 @@ namespace Hotline.NewRock
|
|
|
/// <param name="menuId">菜单ID</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task VisitorToMenuAsync(string visitorId, string menuId, CancellationToken cancellationToken)
|
|
|
+ public async Task VisitorToMenuAsync(NewRockConfiguration newRockConfiguration, string visitorId, string menuId, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.VisitorToMenu(new VisitorToMenuRequest()
|
|
|
{
|
|
|
Attribute = "Connect",
|
|
|
Visitor = new VisitorToMenuVisitor() { Id = visitorId },
|
|
|
Menu = new VisitorToMenuMenu() { Id = menuId }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -723,15 +732,15 @@ namespace Hotline.NewRock
|
|
|
/// <param name="groupId"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task VisitorToGroupAsync(string visitorId, string groupId, CancellationToken cancellationToken)
|
|
|
+ public async Task VisitorToGroupAsync(NewRockConfiguration newRockConfiguration, string visitorId, string groupId, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.VisitorToGroupQueue(new VisitorToGroupQueueRequest()
|
|
|
{
|
|
|
Attribute = "Queue",
|
|
|
Visitor = new VisitorToGroupQueueVisitor() { Id = visitorId },
|
|
|
Group = new VisitorToGroupQueueGroup() { Id = groupId }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -742,7 +751,7 @@ namespace Hotline.NewRock
|
|
|
/// <param name="telNo">分机号</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task OuterToExtAsync(string outerId, string telNo, CancellationToken cancellationToken)
|
|
|
+ public async Task OuterToExtAsync(NewRockConfiguration newRockConfiguration, string outerId, string telNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.OuterToExt(new OuterToExtRequest()
|
|
|
{
|
|
@@ -750,8 +759,8 @@ namespace Hotline.NewRock
|
|
|
Outer = new OuterToExtOuter() { Id = outerId },
|
|
|
Ext = new OuterToExtExt() { Id = telNo }
|
|
|
},
|
|
|
- _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -762,7 +771,7 @@ namespace Hotline.NewRock
|
|
|
/// <param name="outerPhoneNum">外部电话,外地电话加拨0</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task OuterToOuterAsync(string outerId, string outerPhoneNum, CancellationToken cancellationToken)
|
|
|
+ public async Task OuterToOuterAsync(NewRockConfiguration newRockConfiguration, string outerId, string outerPhoneNum, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.OuterToOuter(new OuterToOuterRequest()
|
|
|
{
|
|
@@ -772,8 +781,8 @@ namespace Hotline.NewRock
|
|
|
new OuterToOuterOuterModel() { Id = outerId },
|
|
|
new OuterToOuterOuterModel() { To = outerPhoneNum }
|
|
|
},
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -785,15 +794,15 @@ namespace Hotline.NewRock
|
|
|
/// <param name="telNo">分机号</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task MenuToExtAsync(string menuId, string telNo, CancellationToken cancellationToken)
|
|
|
+ public async Task MenuToExtAsync(NewRockConfiguration newRockConfiguration, string menuId, string telNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.MenuToExt(new MenuToExtRequest()
|
|
|
{
|
|
|
Attribute = "Connect",
|
|
|
Menu = new MenuToExtMenu() { Id = menuId },
|
|
|
Ext = new MenuToExtExt() { Id = telNo }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -805,15 +814,15 @@ namespace Hotline.NewRock
|
|
|
/// <param name="outerPhoneNum">外部电话,外地电话加拨0</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task MenuToOuterAsync(string menuId, string outerPhoneNum, CancellationToken cancellationToken)
|
|
|
+ public async Task MenuToOuterAsync(NewRockConfiguration newRockConfiguration, string menuId, string outerPhoneNum, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.MenuToOuter(new MenuToOuterRequest()
|
|
|
{
|
|
|
Attribute = "Connect",
|
|
|
Menu = new MenuToOuterMenu() { Id = menuId },
|
|
|
Outer = new MenuToOuterOuter() { To = outerPhoneNum }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -824,7 +833,7 @@ namespace Hotline.NewRock
|
|
|
/// <param name="outerTwo">被叫外部电话,外地电话加拨0</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task TwoWayOuterAsync(string outerOne, string outerTwo, CancellationToken cancellationToken)
|
|
|
+ public async Task TwoWayOuterAsync(NewRockConfiguration newRockConfiguration, string outerOne, string outerTwo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.TwoWayOuter(new TwoWayOuterRequest()
|
|
|
{
|
|
@@ -834,8 +843,8 @@ namespace Hotline.NewRock
|
|
|
new TwoWayOuterOuter(){ To = outerOne},
|
|
|
new TwoWayOuterOuter(){ To = outerTwo}
|
|
|
}
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -846,15 +855,15 @@ namespace Hotline.NewRock
|
|
|
/// <param name="telNo">分机号</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task VoiceNewsFlashExtAsync(string voiceFileName, string telNo, CancellationToken cancellationToken)
|
|
|
+ public async Task VoiceNewsFlashExtAsync(NewRockConfiguration newRockConfiguration, string voiceFileName, string telNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.VoiceNewsFlash(new VoiceNewsFlashRequest
|
|
|
{
|
|
|
Attribute = "Connect",
|
|
|
VoiceFile = voiceFileName,
|
|
|
Ext = new VoiceNewsFlashExt() { Id = telNo }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -865,7 +874,7 @@ namespace Hotline.NewRock
|
|
|
/// <param name="visitorId">来电会话ID</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task VoiceNewsFlashVisitorAsync(string voiceFileName, string visitorId,
|
|
|
+ public async Task VoiceNewsFlashVisitorAsync(NewRockConfiguration newRockConfiguration, string voiceFileName, string visitorId,
|
|
|
CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.VoiceNewsFlash(
|
|
@@ -874,8 +883,8 @@ namespace Hotline.NewRock
|
|
|
Attribute = "Connect",
|
|
|
VoiceFile = voiceFileName,
|
|
|
Visitor = new VoiceNewsFlashVisitor() { Id = visitorId }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -886,7 +895,7 @@ namespace Hotline.NewRock
|
|
|
/// <param name="outerId">去电会话ID</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task VoiceNewsFlashOuterAsync(string voiceFileName, string outerId, CancellationToken cancellationToken)
|
|
|
+ public async Task VoiceNewsFlashOuterAsync(NewRockConfiguration newRockConfiguration, string voiceFileName, string outerId, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.VoiceNewsFlash(
|
|
|
new VoiceNewsFlashRequest
|
|
@@ -894,8 +903,8 @@ namespace Hotline.NewRock
|
|
|
Attribute = "Connect",
|
|
|
VoiceFile = voiceFileName,
|
|
|
Outer = new VoiceNewsFlashOuter() { Id = outerId }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -905,14 +914,14 @@ namespace Hotline.NewRock
|
|
|
/// <param name="telNo">发起方分机号</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task ConferenceMeetingAsync(string telNo, CancellationToken cancellationToken)
|
|
|
+ public async Task ConferenceMeetingAsync(NewRockConfiguration newRockConfiguration, string telNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.ConferenceMeeting(new ConferenceMeetingRequest()
|
|
|
{
|
|
|
Attribute = "Conference",
|
|
|
Ext = new ConferenceMeetingExt() { Id = telNo }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -923,7 +932,7 @@ namespace Hotline.NewRock
|
|
|
/// <param name="ivrAnswer"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task HandleIvrAnswerAsync(CallDetail callDetail, IvrAnswer ivrAnswer, CancellationToken cancellationToken)
|
|
|
+ public async Task HandleIvrAnswerAsync(NewRockConfiguration newRockConfiguration, CallDetail callDetail, IvrAnswer ivrAnswer, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (string.IsNullOrEmpty(ivrAnswer.Content))
|
|
|
throw new UserFriendlyException("无效IVR应答参数");
|
|
@@ -944,14 +953,14 @@ namespace Hotline.NewRock
|
|
|
/// <param name="secondTelNo">被监听方</param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task MonitorExtAsync(string firstTelNo, string secondTelNo, CancellationToken cancellationToken)
|
|
|
+ public async Task MonitorExtAsync(NewRockConfiguration newRockConfiguration, string firstTelNo, string secondTelNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.MonitorExt(new MonitorExtRequest()
|
|
|
{
|
|
|
Attribute = "Monitor",
|
|
|
Exts = new List<Ext>() { new Ext() { Id=firstTelNo },new Ext() { Id=secondTelNo } }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken) ;
|
|
|
}
|
|
|
|
|
@@ -964,14 +973,14 @@ namespace Hotline.NewRock
|
|
|
/// <param name="telNo"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task MonitorExtToTalkAsync(string telNo, CancellationToken cancellationToken)
|
|
|
+ public async Task MonitorExtToTalkAsync(NewRockConfiguration newRockConfiguration, string telNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.MonitorExtToTalk(new MonitorExtToTalkRequest()
|
|
|
{
|
|
|
Attribute = "Talk",
|
|
|
Ext = new Ext() { Id = telNo }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken) ;
|
|
|
}
|
|
|
|
|
@@ -985,14 +994,14 @@ namespace Hotline.NewRock
|
|
|
/// <param name="telNo"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task MonitorExtToListenAsync(string telNo, CancellationToken cancellationToken)
|
|
|
+ public async Task MonitorExtToListenAsync(NewRockConfiguration newRockConfiguration, string telNo, CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.MonitorExtToListen(new MonitorExtToListenRequest
|
|
|
{
|
|
|
Attribute = "Listen",
|
|
|
Ext = new Ext() { Id = telNo }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|
|
@@ -1011,14 +1020,14 @@ namespace Hotline.NewRock
|
|
|
/// <param name="secondTelNo"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task BargeinExtAsync(string firstTelNo,string secondTelNo,CancellationToken cancellationToken)
|
|
|
+ public async Task BargeinExtAsync(NewRockConfiguration newRockConfiguration, string firstTelNo,string secondTelNo,CancellationToken cancellationToken)
|
|
|
{
|
|
|
await _newRockClient.BargeinExt(new BargeinExtRequest()
|
|
|
{
|
|
|
Attribute = "Bargein",
|
|
|
Exts = new List<Ext>() { new Ext() { Id = firstTelNo },new Ext() { Id=secondTelNo } }
|
|
|
- }, _options.Value.DeviceConfigs.ReceiveKey,
|
|
|
- _options.Value.DeviceConfigs.Expired,
|
|
|
+ }, newRockConfiguration.ReceiveKey,
|
|
|
+ newRockConfiguration.Expired,
|
|
|
cancellationToken);
|
|
|
}
|
|
|
|