Bitzsoft.Integrations.OutboundCall.Tencent
1.0.0-alpha.6
See the version list below for details.
dotnet add package Bitzsoft.Integrations.OutboundCall.Tencent --version 1.0.0-alpha.6
NuGet\Install-Package Bitzsoft.Integrations.OutboundCall.Tencent -Version 1.0.0-alpha.6
<PackageReference Include="Bitzsoft.Integrations.OutboundCall.Tencent" Version="1.0.0-alpha.6" />
<PackageVersion Include="Bitzsoft.Integrations.OutboundCall.Tencent" Version="1.0.0-alpha.6" />
<PackageReference Include="Bitzsoft.Integrations.OutboundCall.Tencent" />
paket add Bitzsoft.Integrations.OutboundCall.Tencent --version 1.0.0-alpha.6
#r "nuget: Bitzsoft.Integrations.OutboundCall.Tencent, 1.0.0-alpha.6"
#:package Bitzsoft.Integrations.OutboundCall.Tencent@1.0.0-alpha.6
#addin nuget:?package=Bitzsoft.Integrations.OutboundCall.Tencent&version=1.0.0-alpha.6&prerelease
#tool nuget:?package=Bitzsoft.Integrations.OutboundCall.Tencent&version=1.0.0-alpha.6&prerelease
Bitzsoft.Integrations.OutboundCall.Tencent
腾讯云外呼实现 — 基于 CCC SDK,实现 IOutboundCallService 统一接口。
功能
- 实现
IOutboundCallService统一接口(创建/暂停/恢复/停止/查询活动 + 话单查询) - 自动境内外主叫分离(基于
CreateCampaignRequest.Region选择 Callers/OverseaCallers + SdkAppId + IvrId) - 白名单/黑名单过滤(开发/测试环境防误呼)
- 底层直接引用官方
TencentCloudSDK.Common,内联仅外呼场景的瘦客户端(自动外呼任务 / 预测式外呼 Campaign / 话单查询),无独立 TencentCcc 包依赖
安装
dotnet add package Bitzsoft.Integrations.OutboundCall.Tencent
配置
{
"OutboundCall": {
"AccessKeyId": "your-secret-id",
"AccessKeySecret": "your-secret-key",
"Region": "ap-guangzhou",
"SdkAppId": "1400818883",
"OverseaSdkAppId": "1400818885",
"CnIvrId": 21232,
"EnIvrId": 21408,
"Callers": ["008602160662606"],
"OverseaCallers": ["0085230087235"]
}
}
注册
services.AddTencentOutboundCall(options =>
{
options.AccessKeyId = "your-secret-id";
options.AccessKeySecret = "your-secret-key";
options.Region = "ap-guangzhou";
options.SdkAppId = "1400818883";
options.Callers = new() { "008602160662606" };
options.OverseaCallers = new() { "0085230087235" };
});
第三方请求日志
⚠️ 机制说明:本连接器基于
TencentCloudSDK.Common(AbstractClient),HTTP 管道封装在 SDK 内部,无法用DelegatingHandler拦截(与阿里云/华为云/火山引擎/容联云的 HttpClient 实现不同)。因此请求日志改由IRequestLogRecorder回调钩子实现——在TencentCccOutboundClient.ExecuteAsync包装层记录每次 API 调用,汇入与 HttpClient 拦截同一个日志管道(IRequestLogStore),由宿主统一持久化。
记录内容(每次外呼 API 调用产生一条):
| 字段 | 取值 |
|---|---|
Provider |
Tencent |
Endpoint |
ccc.tencentcloudapi.com |
Method |
SDK(非标准 HTTP 方法,标识为 SDK 管道调用) |
ApiName |
腾讯动作名,如 CreateAutoCalloutTask / DescribePredictiveDialingCampaigns / DescribeTelCdr |
RequestBody / ResponseBody |
请求/响应 DTO 序列化(经 SensitiveFields 脱敏) |
StatusCode |
尽力而为(成功 200;SDK 抛异常时为空——见下方局限) |
Exception |
SDK 异常信息(含 ErrorCode) |
DurationMs |
本次调用耗时 |
局限(诚实声明):
- SDK 不暴露原始 HTTP 状态码与响应头,故无法像 HttpClient 拦截那样记录真实 HTTP
StatusCode/RequestHeaders,StatusCode仅为尽力而为(成功记200、异常时留空)。 - 仅本连接器实现的 7 个外呼相关动作会被记录;腾讯 CCC 的其他能力(坐席/技能组/分机/会话/IM 等)本连接器未实现,不在记录范围。
// ① 默认:启用回调但不持久化(日志丢弃)
services.AddTencentOutboundCall(options => { /* ... */ });
// ② 持久化:宿主注册 IRequestLogStore 实现后,腾讯外呼调用自动落库
// AddTencentOutboundCall 内部已注入 IRequestLogRecorder,宿主无需再额外挂载 handler
services.AddRequestLogging<MyRequestLogStore>(opts =>
{
opts.MaxBodyLength = 0; // 腾讯响应(如话单列表)可能很长,0=不截断完整保留
opts.SensitiveFields.Add("SdkAppId"); // 额外脱敏字段
});
services.AddTencentOutboundCall(options => { /* ... */ });
自定义
IRequestLogStore实现(SqlSugar / Dapper / MongoDB)详见Bitzsoft.Integrations.RequestLogging。
使用
// 号码清洗 + 分类
var (mainland, oversea) = PhoneNumberClassifier.Classify(rawPhones);
// 境内外呼
await outboundCall.CreateCampaignAsync(new CreateCampaignRequest
{
Name = "催办-境内",
Region = PhoneRegion.Mainland,
Callees = mainland
});
// 境外外呼
await outboundCall.CreateCampaignAsync(new CreateCampaignRequest
{
Name = "催办-境外",
Region = PhoneRegion.Overseas,
Callees = oversea
});
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Bitzsoft.Integrations.OutboundCall (>= 1.0.0-alpha.6)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.0-alpha.6)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- TencentCloudSDK.Common (>= 3.0.974)
-
net5.0
- Bitzsoft.Integrations.OutboundCall (>= 1.0.0-alpha.6)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.0-alpha.6)
- Microsoft.Extensions.Logging.Abstractions (>= 5.0.0)
- Microsoft.Extensions.Options (>= 5.0.0)
- TencentCloudSDK.Common (>= 3.0.974)
-
net8.0
- Bitzsoft.Integrations.OutboundCall (>= 1.0.0-alpha.6)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.0-alpha.6)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- TencentCloudSDK.Common (>= 3.0.974)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Bitzsoft.Integrations.OutboundCall.Tencent:
| Package | Downloads |
|---|---|
|
Bitzsoft.Integrations.OutboundCall.All
外呼服务聚合包 — 包含全部供应商实现(腾讯云/阿里云/火山引擎/容联云/华为云/国际 Twilio/Vonage) |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 130 | 8/3/2026 |
| 1.0.0 | 128 | 8/2/2026 |
| 1.0.0-alpha.10 | 54 | 7/26/2026 |
| 1.0.0-alpha.9 | 63 | 7/12/2026 |
| 1.0.0-alpha.8 | 176 | 7/1/2026 |
| 1.0.0-alpha.7 | 82 | 6/16/2026 |
| 1.0.0-alpha.6 | 71 | 6/16/2026 |