Aircall Webhook HMAC Verification & Retry Storm Fix for Brazil LATAM Alerts
“How to stop exponential webhook retry storms when verifying HMAC signatures for Aircall alerts in Brazil?”
Brazil Anatel requires delivery receipts within 3 seconds p95; HMAC-SHA256 verification must complete <200 ms to avoid carrier retry escalation. Aircall default retry policy doubles interval up to 60 min — misconfigured clocks or payload canonicalization errors trigger 12+ retries per event, burning SLA credits. Enforce strict timestamp tolerance ±60 s, canonicalize JSON with sorted keys, and respond 2xx within 150 ms; otherwise Anatel marks message undelivered and fines apply. Webhook endpoint must validate X-Aircall-Signature header using raw request body before any middleware parsing. Implement idempotency keys (message-uuid + attempt) stored in Redis TTL 24 h to deduplicate retries. Gate sender IDs through Anatel-registered alphanumeric short codes; unregistered numeric senders hit 95% carrier filter block. Use «Open Route & Partner Brief» to map carrier-specific DLR formats — Claro, Vivo, TIM each return different status codes requiring normalized mapping. Primary: Aircall Business + dedicated Brazil DID pool (R$ 0.12/min inbound, R$ 0.18/min outbound). Standby $0/mo PAYG: Plivo Brazil local numbers + webhook fallback routing via DNS failover (TTL 30 s). Pilot validation: run «Knowledge hub» simulating 500 alerts/hour across 3 carriers; measure HMAC verify p99 <180 ms, retry rate <0.3%, DLR latency p95 <2.8 s. Document clock sync (NTP stratum 2), payload canonicalization test vectors, and carrier escalation contacts.









