Send Call Commands

View as Markdown
Unified JSON-RPC style endpoint for executing call methods through command-based dispatch. Send a request with the appropriate `command` field to invoke the desired call operation. All async-safe RELAY methods can be sent through this endpoint without a WebSocket connection. **Call Lifecycle:** - **`dial`** - Create and initiate a new outbound call to a destination. - **`update`** - Modify an active call's dialplan in real-time. - **`calling.end`** - Terminate an active call immediately. - **`calling.transfer`** - Transfer an active call to a new destination (SIP URI, phone number, or inline SWML). - **`calling.disconnect`** - Disconnect bridged calls without hanging up either leg. **Play:** - **`calling.play`** - Play audio, TTS, silence, or ringtone to a call. - **`calling.play.pause`** / **`calling.play.resume`** / **`calling.play.stop`** - Control active play. - **`calling.play.volume`** - Adjust play volume. **Record:** - **`calling.record`** - Start recording a call. Supports parallel recordings via multiple control_ids. - **`calling.record.pause`** / **`calling.record.resume`** / **`calling.record.stop`** - Control active recording. **Collect (Input):** - **`calling.collect`** - Collect DTMF or speech input. - **`calling.collect.stop`** - Stop active collection. - **`calling.collect.start_input_timers`** - Start input timers on active collect. **Detect:** - **`calling.detect`** - Start a detector (answering machine, fax, or digit). - **`calling.detect.stop`** - Stop active detector. **Tap:** - **`calling.tap`** - Tap call audio to RTP or WebSocket endpoint. - **`calling.tap.stop`** - Stop active tap. **Stream:** - **`calling.stream`** - Stream call audio to a WebSocket endpoint. - **`calling.stream.stop`** - Stop active stream. **Denoise:** - **`calling.denoise`** - Start noise reduction on a call. - **`calling.denoise.stop`** - Stop noise reduction. **Transcribe:** - **`calling.transcribe`** - Start call transcription (creates a shadow recording). - **`calling.transcribe.stop`** - Stop active transcription. **AI:** - **`calling.ai_hold`** - Place an AI call on hold. - **`calling.ai_unhold`** - Resume an AI call from hold. - **`calling.ai_message`** - Inject a message into an active AI conversation. - **`calling.ai.stop`** - Stop an active AI session. **Live Transcribe / Translate:** - **`calling.live_transcribe`** - Start/stop/summarize real-time transcription. - **`calling.live_translate`** - Start/stop/summarize/inject real-time translation. **Fax:** - **`calling.send_fax.stop`** - Stop active fax send. - **`calling.receive_fax.stop`** - Stop active fax receive. **SIP:** - **`calling.refer`** - Transfer a SIP call via SIP REFER. **Custom Events:** - **`calling.user_event`** - Fire a custom user event on the call. #### Permissions The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Voice_. [Learn more about API scopes](/docs/platform/your-signalwire-api-space).

Authentication

AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ```

Request

This endpoint expects an object.
dialobjectRequired
OR
updateobjectRequired
OR
calling.endobjectRequired
OR
calling.disconnectobjectRequired
OR
calling.ai_holdobjectRequired
OR
calling.ai_unholdobjectRequired
OR
calling.ai_messageobjectRequired
OR
calling.ai.stopobjectRequired
OR
calling.playobjectRequired
OR
calling.play.pauseobjectRequired
OR
calling.play.resumeobjectRequired
OR
calling.play.stopobjectRequired
OR
calling.play.volumeobjectRequired
OR
calling.recordobjectRequired
OR
calling.record.pauseobjectRequired
OR
calling.record.resumeobjectRequired
OR
calling.record.stopobjectRequired
OR
calling.collectobjectRequired
OR
calling.collect.stopobjectRequired
OR
calling.collect.start_input_timersobjectRequired
OR
calling.detectobjectRequired
OR
calling.detect.stopobjectRequired
OR
calling.tapobjectRequired
OR
calling.tap.stopobjectRequired
OR
calling.streamobjectRequired
OR
calling.stream.stopobjectRequired
OR
calling.denoiseobjectRequired
OR
calling.denoise.stopobjectRequired
OR
calling.transcribeobjectRequired
OR
calling.transcribe.stopobjectRequired
OR
calling.live_transcribeobjectRequired
OR
calling.live_translateobjectRequired
OR
calling.transferobjectRequired
OR
calling.send_fax.stopobjectRequired
OR
calling.receive_fax.stopobjectRequired
OR
calling.referobjectRequired
OR
calling.user_eventobjectRequired

Response

The request has succeeded.
object
OR
object

Errors