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)
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 withVoiceGrant allowing both incoming and outgoing browser audio.
Response (200 OK)
6. Initiate Outbound Call
Creates an initialCallRecord 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, updatesCallRecord.endedAt, and resets User.isOnCall = false.