Skip to main content

CallNotificationsSettings Model

The CallNotificationsSettings model stores per-organization webhook notification configuration for call events.

Table: call_notifications_settings
Model: App\Models\CallNotificationsSettings

Database Schema

ColumnTypeNullableDefaultDescription
idbigint unsignedNoautoPrimary key
organization_idbigint unsignedNo-Singleton per org
webhook_urlstringYesnullTarget URL
auth_methodstringNononenone, bearer_token, basic_auth
auth_secretstringYesnullEncrypted secret
auth_usernamestringYesnullFor basic auth
retry_attemptsintNo3Max retries
retry_backoff_secondsintNo60Base backoff
request_timeout_secondsintNo30HTTP timeout
enabled_eventsJSONNo["new","ringing","connected","answered","busy","cancel","failed","congestion"]Event types
rate_limit_per_minuteintNo500Redis-based rate limit
is_activebooleanNotrueMaster switch
created_atdatetimeYes-
updated_atdatetimeYes-

Relationships

$settings->organization() → Organization

Scopes

CallNotificationsSettings::forOrganization($orgId)
CallNotificationsSettings::active()

Methods

$settings->isEventEnabled(string $event): bool
$settings->isConfigured(): bool
$settings->getAuthHeaders(array $payload): array

Usage Notes

  • Webhook URLs are validated against SSRF rules before storage.
  • The model is scoped by OrganizationScope; webhook handlers use OrganizationScope::bypass() to read it.
  • Authentication secrets are encrypted at rest.