A media stream connection lets a partner’s contact-centre platform (SparkTG, Twilio, Plivo, Exotel or Vonage) keep its own numbers and stream each call’s audio to one of your voice agents over one WebSocket per call. The partner keeps the number, IVR, queue and CRM; Talqing runs the agent. Create one with POST /v1/streams and hand the partner the url it returns. Use it when the other side will not move a number onto a SIP trunk. Compared with a Talqing phone number, a stream agent cannot transfer to a human, and on every platform but SparkTG it cannot hang up.

Create a connection

The agent must be a published voice agent. In the dashboard: Telephony → Media Streams → New connection.
The response (201) carries the full url on this and every later read. The dashboard’s setup panel has the partner-side steps and, for Twilio, Plivo and Vonage, a snippet to paste.

Platforms

dialect decides what the agent can do on the call.
On every platform but SparkTG, the agent finishing does not hang up. The stream closes and the caller returns to the partner’s flow. On Twilio and Vonage, if nothing follows the stream, the caller hears silence. Put the next step there: the TwiML verb after </Connect>, the next applet, or the next NCCO action. That is also where escalation to a person belongs.

The URL

  • region is us (default) or in. Pick the one nearest the partner’s media. Changing region changes the URL; the old host stops answering for the connection, so the partner must switch. URLs on streams.talqing.com are us.
  • Everything is in the path because Twilio’s <Stream url> allows no query string.
  • One connection per agent per dialect. Two partners on the same platform would share one URL, so give each its own agent.
The URL is not a credential and cannot be rotated. It is derived from the dialect, workspace and agent, so deleting and recreating the connection returns the same URL. Anyone holding it can place calls against your credit balance and question the agent. To stop it answering, set status: "disabled" with PATCH /v1/streams/{connection_id} or point the connection at another agent. Disabling refuses new calls at once; calls in progress continue.

Per-call metadata becomes vars

The platform’s per-call bag (Twilio <Parameter>, SparkTG SIP-header attributes, Plivo extraHeaders, Exotel query parameters, Vonage NCCO headers) is passed through verbatim: a key svcId reaches the agent as {{vars.svcId}}. A key that is not a valid variable name (a hyphen, a leading digit) is skipped and noted on the call’s timeline. See variables. Three keys also set call facts: The person is from, or to when direction is outbound. Their number fills {{system_vars.human_phone_number}} and groups the call into their conversation; the other fills {{system_vars.agent_phone_number}}. A value that is not a phone number (anonymous, an unfilled placeholder) is ignored and the caller is treated as unidentified. Plivo and Vonage may send digits without +.
Twilio, Plivo and Vonage put no numbers on the stream. Without from in the metadata every call is anonymous: no caller number for the agent, no history across calls. The dashboard’s Twilio snippet passes {{From}}, {{To}} and {{Direction}} from a TwiML Bin; a partner serving TwiML from its own webhook must substitute them itself.

How a stream call differs from a phone call

A stream call is a voice call with type STREAM in Calls: transcribed, analysed and recorded per the agent’s settings, billed at the voice platform fee plus your provider spend, capped at three hours. Differences:
  • No transfer. A transfer operation fails on a stream; route escalation through the partner’s flow.
  • Background audio is off (ambient and thinking sounds). The agent’s voice is unaffected.
  • Keypad is out of band only; tones inside the audio are not detected. See keypad input.
  • A Talqing release ends calls in progress with close reason “The call was ended by a Talqing deployment”. Those calls carry no platform fee.
  • No per-connection concurrency cap. Only an empty credit balance refuses calls.

Audio formats

The platform announces the format per call; nothing to configure. Unidirectional (listen-only) streams are not supported.

Connection reference

GET /v1/streams lists connections; DELETE /v1/streams/{connection_id} removes one and keeps the calls it carried.

Debugging

Next

Keypad input

Digits the caller types and digits the agent presses.

Telephony overview

Answering calls on your own carrier numbers instead.