Skip to main content
The CRM Telephony API provides endpoints for configuring the company-wide telephony carrier in Admin Settings, minting ephemeral WebRTC tokens for authenticated agents, initiating outbound softphone calls to leads or brokers, and terminating active call sessions. Controller: CrmTelephonyController (/api/crm/telephony and /telephony).

1. Get Active Telephony Configuration

Returns the currently active organization-wide telephony configuration. Sensitive secrets (Auth Tokens, API Keys, Application SIDs) are masked for UI display safety.

Response (200 OK)

If no provider has been activated, returns null.

2. Connect / Update Telephony Carrier

Validates carrier credentials against the third-party telecom API, auto-provisions required application resources if needed, deactivates any previously active carrier, and sets the new carrier active.

Request Parameters

Request Example

Response (201 Created)

Returns the activated configuration with masked credentials.

3. Disconnect Carrier

Deactivates the current active carrier configuration.

Response (200 OK)


4. Verify Carrier (Outbound Test Call)

Places an outbound verification call to the specified administrator phone number to verify trunk authorization and dial tone.

Request Parameters

Response (200 OK)


5. Generate Agent WebRTC Access Token

Mints an ephemeral token for the authenticated user session. For Twilio, generates a JWT Access Token with VoiceGrant allowing both incoming and outgoing browser audio.

Response (200 OK)


6. Initiate Outbound Call

Creates an initial CallRecord in PostgreSQL, marks the calling agent as isOnCall = true, and initiates the outbound call session.

Request Parameters

Request Example

Response (201 Created)


7. Hangup Call

Terminates an active softphone call session, calculates total elapsed duration in seconds, updates CallRecord.endedAt, and resets User.isOnCall = false.

Request Parameters

Response (200 OK)


8. Carrier Webhooks Directory

The following webhook endpoints receive events from carriers during and after softphone calls: