Verbara.Sdk.Push.Webhooks
2.2.1
dotnet add package Verbara.Sdk.Push.Webhooks --version 2.2.1
NuGet\Install-Package Verbara.Sdk.Push.Webhooks -Version 2.2.1
<PackageReference Include="Verbara.Sdk.Push.Webhooks" Version="2.2.1" />
<PackageVersion Include="Verbara.Sdk.Push.Webhooks" Version="2.2.1" />
<PackageReference Include="Verbara.Sdk.Push.Webhooks" />
paket add Verbara.Sdk.Push.Webhooks --version 2.2.1
#r "nuget: Verbara.Sdk.Push.Webhooks, 2.2.1"
#:package Verbara.Sdk.Push.Webhooks@2.2.1
#addin nuget:?package=Verbara.Sdk.Push.Webhooks&version=2.2.1
#tool nuget:?package=Verbara.Sdk.Push.Webhooks&version=2.2.1
Verbara.Sdk.Push.Webhooks
Outbound HTTP webhook delivery for Verbara.Sdk.Push. Consumes events from the in-process Push bus, matches them against WebhookSubscription topic patterns, and POSTs to configured URLs with HMAC-SHA256 signing and exponential retry/backoff.
Usage
using Verbara.Sdk.Push.Topics;
using Verbara.Sdk.Push.Webhooks;
builder.Services.AddAsteriskPush()
.AddAsteriskPushWebhooks(opts =>
{
opts.MaxRetries = 5;
opts.InitialDelay = TimeSpan.FromSeconds(1);
opts.MaxDelay = TimeSpan.FromSeconds(60);
opts.TimeoutPerAttempt = TimeSpan.FromSeconds(10);
});
// Runtime registration:
var store = app.Services.GetRequiredService<IWebhookSubscriptionStore>();
await store.AddAsync(new WebhookSubscription
{
Id = "crm-prod",
TopicPattern = TopicPattern.Parse("calls.**"),
TargetUrl = new("https://crm.example.com/hooks/calls"),
Secret = "<shared secret>"
});
Delivery headers
| Header | Value |
|---|---|
Content-Type |
application/json |
X-Signature |
sha256=<hex> (absent if subscription has no secret) |
X-Event-Type |
PushEvent.EventType |
User-Agent |
WebhookDeliveryOptions.UserAgent (default Verbara.Sdk.Push.Webhooks/1.0) |
traceparent |
PushEventMetadata.TraceContext (absent if null) |
Extra per-subscription headers are appended from WebhookSubscription.Headers.
Extension points
- Custom payload shape: implement
IWebhookPayloadSerializerand register as singleton beforeAddAsteriskPushWebhooks. - Custom signature: implement
IWebhookSigner(e.g., JWT, asymmetric signatures) and register as singleton. - Durable subscriptions: implement
IWebhookSubscriptionStore(SQL/Redis/Postgres) and register as singleton. The defaultInMemoryWebhookSubscriptionStoreis process-local.
Observability
Counters on Verbara.Sdk.Push.Webhooks meter:
asterisk.push.webhooks.deliveries.succeededasterisk.push.webhooks.deliveries.failedasterisk.push.webhooks.deliveries.retriedasterisk.push.webhooks.deliveries.dead_letter
Enroll via Verbara.Sdk.OpenTelemetry — WithAllSources() includes this meter automatically once the meter name is added to AsteriskTelemetry.MeterNames.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Http (>= 10.0.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Options (>= 10.0.8)
- Verbara.Sdk.Push (>= 2.2.1)
- Verbara.Sdk.Resilience (>= 2.2.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.