Skip to main content

Call Notifications

Call Notifications dispatch HTTP POST payloads to a configured URL when call events occur. Each organization has its own settings, event filters, and retry configuration.

Purpose​

Use this module to:

  • Send call events to external systems
  • Filter which statuses trigger notifications
  • Configure authentication (none, bearer token, or basic auth)
  • Review delivery logs and rate-limit status

Event Types​

The following normalized statuses can trigger notifications:

Raw StatusNormalized Event
new, initiated, creatednew
ringing, ring, progressringing
connected, connectconnected
answer, answered, activeanswered
busybusy
cancel, cancelled, canceledcancel
failed, fail, errorfailed
congestion, congestedcongestion

Default enabled events: new, ringing, connected, answered, busy, cancel, failed, congestion.

Authentication Methods​

MethodDescription
NoneNo authentication header
Bearer TokenSends Authorization: Bearer {secret}
Basic AuthSends Authorization: Basic {base64(username:secret)}

SSRF Protection​

All webhook URLs are validated to prevent Server-Side Request Forgery:

  • Blocks RFC1918 private IPs
  • Blocks loopback and link-local addresses
  • Blocks Docker service names
  • Allows only http and https schemes

Permissions​

ActionOwnerPBX AdminPBX UserReporter
View notification settingsYesYesNoNo
Update notification settingsYesYesNoNo
Test notificationsYesYesNoNo
View logsYesYesNoNo

UI Workflow​

Configure Notifications​

  1. Navigate to Settings > Call Notifications
  2. Enter the webhook URL
  3. Select the authentication method and credentials
  4. Choose enabled events
  5. Set retry attempts, backoff, timeout, and rate limit
  6. Save

Send a Test Notification​

  1. Open the Call Notifications settings
  2. Click Test
  3. The system sends a sample payload to the configured URL
  4. Review the delivery log for the result

Review Delivery Logs​

  1. Open the Logs tab
  2. View request payload, response status, response time, and attempt number
  3. Filter by session token or event type

Key Data Fields​

call_notifications_settings Table​

ColumnTypeDefaultNotes
organization_idFK—Singleton per org
webhook_urlstringnullMust pass SSRF validation
auth_methodstringnonenone, bearer_token, basic_auth
auth_secretstringnullEncrypted
auth_usernamestringnullFor basic auth
retry_attemptsinteger3Max retries
retry_backoff_secondsinteger60Base backoff
request_timeout_secondsinteger30HTTP timeout
enabled_eventsJSONSee defaultsArray of event types
rate_limit_per_minuteinteger500Redis-based
is_activebooleantrueMaster switch

call_notification_logs Table​

ColumnTypeNotes
organization_idFKTenant scope
call_session_tokenstringSession identifier
event_idstringUnique per event
event_typestringcall.status_update
statusstringCall status
webhook_urlstringDestination URL
request_payloadJSONPayload sent
request_headersJSONSanitized headers
response_bodytextResponse from endpoint
response_status_codeinteger
response_time_msinteger
is_successboolean
attempt_numberinteger
MethodEndpointPurpose
GET/v1/call-notifications/settingsGet settings
POST/v1/call-notifications/settingsCreate settings
PUT/v1/call-notifications/settingsUpdate settings
DELETE/v1/call-notifications/settingsDelete settings
POST/v1/call-notifications/settings/testSend test webhook
GET/v1/call-notifications/logsDelivery logs
GET/v1/call-notifications/logs/{token}Session-specific logs
GET/v1/call-notifications/rate-limitRate limit status

See the OPBX REST API reference for full schemas.