Bitzsoft.Integrations.OutboundCall.Vonage
1.0.0-alpha.7
This is a prerelease version of Bitzsoft.Integrations.OutboundCall.Vonage.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Bitzsoft.Integrations.OutboundCall.Vonage --version 1.0.0-alpha.7
NuGet\Install-Package Bitzsoft.Integrations.OutboundCall.Vonage -Version 1.0.0-alpha.7
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bitzsoft.Integrations.OutboundCall.Vonage" Version="1.0.0-alpha.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bitzsoft.Integrations.OutboundCall.Vonage" Version="1.0.0-alpha.7" />
<PackageReference Include="Bitzsoft.Integrations.OutboundCall.Vonage" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bitzsoft.Integrations.OutboundCall.Vonage --version 1.0.0-alpha.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Bitzsoft.Integrations.OutboundCall.Vonage, 1.0.0-alpha.7"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Bitzsoft.Integrations.OutboundCall.Vonage@1.0.0-alpha.7
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bitzsoft.Integrations.OutboundCall.Vonage&version=1.0.0-alpha.7&prerelease
#tool nuget:?package=Bitzsoft.Integrations.OutboundCall.Vonage&version=1.0.0-alpha.7&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Bitzsoft.Integrations.OutboundCall.Vonage
Vonage(原 Nexmo)Voice API 外呼实现,手写 HttpClient + RS256 JWT 鉴权(Application 私钥签名)+ NCCO 呼叫控制,实现 IOutboundCallService 统一接口。
功能
- 实现
IOutboundCallService统一接口(创建/启动/暂停/恢复/停止活动 + 活动列表/详情 + 话单查询) - Vonage 为 per-call 模型(无原生 campaign):campaign 元数据与联系人维护在本库内存中,
StartCampaign经共享CampaignDialer按 CPS 节流逐个发起外呼 - 支持暂停/恢复/停止(代次守卫,防止循环重叠与重复记账)
- 内联 NCCO 或
AnswerUrl指定呼叫内容 - RS256 JWT 鉴权:用 Application 的 RSA 私钥(PEM)签
application_idclaim,作 Bearer token;RSA.ImportFromPem为主、BouncyCastlePemReader兜底 - 白名单/黑名单过滤(复用
CallListFilter) - 手写 HttpClient,不依赖 Vonage SDK(net5.0 兼容)
限制:campaign 状态存内存,进程重启后丢失;
StartCampaign可凭已导入联系人重跑,话单仍可从 Vonage 查询。
安装
dotnet add package Bitzsoft.Integrations.OutboundCall.Vonage
配置
{
"VonageOutboundCall": {
"ApplicationId": "your-application-id",
"PrivateKeyPem": "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----",
"From": "12025550123",
"Ncco": "[{\"action\":\"talk\",\"text\":\"您好\",\"language\":\"cmn-CN\"}]",
"Cps": 1
}
}
PrivateKeyPem为 Vonage Application 的私钥(控制台创建 Application 时生成,PKCS#1/PKCS#8 PEM 均可)。生产环境建议从密文配置/密钥库读取,勿明文入库。
注册
services.AddVonageOutboundCall(options =>
{
options.ApplicationId = "your-application-id";
options.PrivateKeyPem = privateKeyPem; // PEM 文本
options.From = "12025550123";
options.Ncco = "[{\"action\":\"talk\",\"text\":\"您好\",\"language\":\"cmn-CN\"}]";
options.Cps = 1;
});
第三方请求日志
内置 Bitzsoft.Integrations.RequestLogging 出站请求记录管道,默认 NullRequestLogStore 不持久化。
// ① 默认:启用记录管道但不持久化(日志丢弃)
services.AddVonageOutboundCall(options => { /* ... */ });
// ② 持久化:宿主注册 IRequestLogStore 实现后,所有出站请求自动落库
services.AddRequestLogging<MyRequestLogStore>(opts =>
{
opts.MaxBodyLength = 8192; // 单条正文截断上限
opts.SensitiveFields.Add("PrivateKeyPem"); // 额外脱敏字段
});
services.AddVonageOutboundCall(options => { /* ... */ });
使用
// 创建活动并导入联系人(campaign 状态存内存)
var resp = await outboundCall.CreateCampaignAsync(new CreateCampaignRequest
{
Name = "通知外呼",
Region = PhoneRegion.Overseas,
Callees = new() { "12025550123", "12025550124" }
});
// 启动:后台按 CPS 节流逐个拨号
await outboundCall.StartCampaignAsync(new StartCampaignRequest { CampaignId = resp.CampaignId });
// 查询话单(从 Vonage 账号级 call 列表拉取)
var records = await outboundCall.QueryCallRecordsAsync(new QueryCallRecordsRequest { PageSize = 50 });
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Bitzsoft.Integrations.OutboundCall (>= 1.0.0-alpha.7)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.0-alpha.7)
- BouncyCastle.Cryptography (>= 2.5.1)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
-
net5.0
- Bitzsoft.Integrations.OutboundCall (>= 1.0.0-alpha.7)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.0-alpha.7)
- BouncyCastle.Cryptography (>= 2.5.1)
- Microsoft.Extensions.Logging.Abstractions (>= 5.0.0)
- Microsoft.Extensions.Options (>= 5.0.0)
-
net8.0
- Bitzsoft.Integrations.OutboundCall (>= 1.0.0-alpha.7)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.0-alpha.7)
- BouncyCastle.Cryptography (>= 2.5.1)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Bitzsoft.Integrations.OutboundCall.Vonage:
| 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 | 135 | 8/3/2026 |
| 1.0.0 | 129 | 8/2/2026 |
| 1.0.0-alpha.10 | 58 | 7/26/2026 |
| 1.0.0-alpha.9 | 68 | 7/12/2026 |
| 1.0.0-alpha.8 | 70 | 7/1/2026 |
| 1.0.0-alpha.7 | 82 | 6/16/2026 |