Skip to main content
Outbound voice agents start with plivo voice calls make --from <your number> --to <destination> --answer-url …; the answer URL returns the same <Stream> XML as an inbound call. Human handoff is plivo voice calls transfer <uuid> --legs aleg --aleg-url … where the new URL returns a <Dial>. Calls cost money, so make needs --yes (use --dry-run to preview).

Calls

Make outbound calls, list and inspect call records, and control live calls. voice calls make spends money and requires --yes; live-call controls (play, speak, record, dtmf, transfer, stop-*) act on an established call and do not. Make and inspect voice calls
Command:
Flags
  • --digits <string>: DTMF digits to send, e.g. 1234# (required)
  • --leg <string>: aleg|bleg (default “aleg”)
Command:
Command:
Command:
Flags
  • --direction <string>: inbound|outbound
  • --from <string>: filter by from_number
  • --limit <int>: results per page (default 20)
  • --offset <int>: pagination offset
  • --to <string>: filter by to_number
Command:
Flags
  • --answer-method <string>: GET|POST (default “GET”)
  • --answer-url <string>: URL returning PlivoXML to play on answer (default: Plivo’s hello demo) (default “https://s3.amazonaws.com/static.plivo.com/answer.xml”)
  • --from <string>: source number (E.164); must be on your account (required)
  • --hangup-url <string>: URL hit when call ends
  • --machine-detection <string>: none|true|hangup
  • --ring-url <string>: URL hit when call starts ringing
  • --to <string>: destination number (E.164) (required)
Command:
Flags
  • --legs <string>: aleg|bleg|both (default “aleg”)
  • --length <int>: stop after N seconds (0 = full file)
  • --loop: loop the playback
  • --mix: mix with the call audio (else replace) (default true)
  • --urls <string>: comma-separated list of audio file URLs to play (required)
Command:
Flags
  • --both-legs: record both legs (default: just A-leg)
  • --callback-method <string>: GET|POST (default “POST”)
  • --callback-url <string>: URL hit when recording finishes
  • --file-format <string>: mp3|wav (default “mp3”)
  • --time-limit <int>: max recording length in seconds (default 60)
  • --transcribe: request transcription
Command:
Flags
  • --language <string>: language code, e.g. en-US, en-GB, hi-IN (default “en-US”)
  • --legs <string>: aleg|bleg|both (default “aleg”)
  • --mix: mix with the call audio (else replace) (default true)
  • --text <string>: text to speak via TTS (required)
  • --voice <string>: voice: MAN|WOMAN (default “WOMAN”)
Command:
Command:
Command:
Command:
Flags
  • --aleg-method <string>: GET|POST (default “POST”)
  • --aleg-url <string>: new URL for A-leg (caller side)
  • --bleg-method <string>: GET|POST (default “POST”)
  • --bleg-url <string>: new URL for B-leg (callee side)
  • --legs <string>: which leg(s) to act on: aleg|bleg|both (default “aleg”)

Streams on a live call (REST)

Start an audio stream on an already-answered call (instead of via <Stream> XML), list the streams on a call, or stop them.
Command:
Command:
Command:
Command:
Flags
  • --audio-track <string>: inbound|outbound|both (default “inbound”)
  • --bidirectional: let the WebSocket send audio back into the call
  • --callback-url <string>: alias for —stream-status-callback
  • --content-type <string>: audio codec content-type (default “audio/x-l16;rate=16000”)
  • --extra-headers <string>: comma-separated extra WebSocket headers (k1=v1,k2=v2)
  • --service-type <string>: Plivo service type override
  • --stream-status-callback <string>: URL hit when stream starts/ends
  • --url <string>: WebSocket URL to receive audio (wss://…) (required)
Command: