Skip to main content

CallTrackingNotificationSettings Model

The CallTrackingNotificationSettings model stores per-campaign webhook notification configuration. When a call tracking event occurs, OPBX can dispatch a JSON payload to the configured URL.

Table: call_tracking_notification_settings
Model: App\Models\CallTrackingNotificationSettings
Resource: App\Http\Resources\CallTrackingNotificationSettingsResource

Database Schema

ColumnTypeNullableDefaultDescription
idbigint unsignedNoautoPrimary key
organization_idbigint unsignedNo-Foreign key to organizations
call_tracking_campaign_idbigint unsignedNo-Parent campaign
webhook_urlvarchar(2048)No-Destination URL
auth_methodvarchar(50)Nononenone, bearer_token, basic_auth
auth_secrettextYesnullEncrypted token/password
auth_usernamevarchar(255)YesnullBasic auth username
enabled_eventsjsonNo-Array of event types
is_activebooleanNotrueWhether notifications are enabled
created_attimestampYesnullCreation timestamp
updated_attimestampYesnullLast update timestamp

Events

EventValue
Call Receivedcall.received
Call Answeredcall.answered
Call Missedcall.missed
Call Convertedcall.converted
Call Failedcall.failed

Security

  • Outbound URLs are validated with SsrfUrlValidator to prevent SSRF.
  • Authorization headers are redacted before being persisted in delivery logs.

Relationships

Belongs To

$settings->organization() → Organization
$settings->campaign() → CallTrackingCampaign

Has Many

$settings->logs() → CallTrackingNotificationLog[]