Skip to main content
connic

Telnyx Voice

By connic
Sync

Put a voice agent on your Telnyx number. connic creates the Call Control application and streams the call both ways, and the agent answers with your knowledge and tools.

Publisher
By connic
Modes
Sync
Set up in
Dashboard or connectors/*.yaml
Documentation
Telnyx Voice docs

Connect a Telnyx number without SIP setup

Save your Telnyx Connection, pick an active number and link one voice agent. connic creates a dedicated Call Control application and assigns the number to it.

One Connection for calls and messages
Save the Telnyx API key and the account's Ed25519 public key once. Telnyx Messaging connectors can use the same Connection.
What connic sets up
connic assigns the number to its own Call Control application and clears the number's technical prefix and destination rewrite. The previous assignment and values go to the connector logs. Turn off call forwarding in Telnyx first.
When you switch or remove
connic clears only the routing it still owns, keeps changes you made in Telnyx and deletes its application once no number uses it. An earlier assignment isn't restored.
  1. The caller dials your number

    Telnyx sends the call event to the Call Control application that connic created for the number.

  2. connic verifies and answers

    The account's Ed25519 public key checks the event signature. connic answers the call and opens a media stream in both directions.

  3. The agent talks

    The run starts with the call details. The agent greets the caller, listens and uses its tools, and a caller who interrupts can stop queued playback.

  4. The call ends or moves on

    The agent hangs up after its farewell or transfers the caller. If the run fails or the media stream can't start, Telnyx transfers the call to your fallback number.

Set the voice, the greeting and the turn-taking

Configure the conversation in voice_config, next to the prompt and tools the agent already has.

Realtime models
Use connic/gemini-3.8-live without provider credentials, billed from Project credit. With your provider credentials in the project, use a Gemini native audio model through Google Gemini or Vertex AI, or an OpenAI or Azure OpenAI realtime model.
Transcripts
Gemini and Vertex AI transcribe the caller natively. For OpenAI and Azure OpenAI, set transcription_model to see the caller's speech as text in the run.
Waiting on tools
A quiet tone plays while a tool runs and pauses whenever someone speaks. Set thinking_sound to false to turn it off.
What voice agents leave out
Guardrails, human approvals, structured output, fallback_model and context_compression are rejected for voice agents. A call is one run, so the agent's timeout caps its length.
agents/service-line.yaml
version: "1.0"
name: service-line
type: llm
model: gemini/gemini-3.8-live
description: Answers calls on the service line
system_prompt: |
  Keep replies short and natural.
  Before you use a tool, say what you are checking.
  Say goodbye before you end the call.
tools:
  - retrieval_query
  - tickets.create_ticket
voice_config:
  language: en
  greeting: "Hello, this is the service line. How can I help?"
  thinking_sound: true
  turn_detection:
    silence_ms: 600
  interruptions:
    enabled: true
  idle_timeout_seconds: 90

See who is calling and route them onward

Each run starts with the Telnyx call details, and transfers go through Telnyx to numbers you allow on the connector.

Call details
call_id is the Telnyx call control ID, caller_name comes from caller_id_name, and raw holds the call.initiated payload with custom_headers and sip_headers. Forwarding arrives as a Diversion SIP header, so forwarded_from stays empty.
Transfers
A tool raises TransferCall with one of up to 20 transfer numbers on the connector, and Telnyx transfers the caller. Any other number returns an error to the agent.
Keypad
Map keys to tools in voice_config. A key press runs its tool without a model turn, so pressing 1 reaches sales even during the greeting.
Fallback number
Answered calls that can't continue go to this number. Without one, or if Telnyx rejects the transfer, the call is hung up. Calls that connic doesn't answer, for example while the connector is paused, aren't forwarded.
context["payload"]
{
  "call_id": "<call-control-id>",
  "from": "+4915112345678",
  "to": "+4930123456789",
  "provider": "telnyx",
  "caller_name": "Alex Example",
  "raw": {
    "call_control_id": "<call-control-id>",
    "caller_id_name": "Alex Example",
    "from": "+4915112345678",
    "to": "+4930123456789",
    "sip_headers": [
      {
        "name": "Diversion",
        "value": "<sip:+4940123456789@carrier>"
      }
    ]
  }
}
tools/phone.py
from connic import TransferCall


def transfer_to_sales(context: dict) -> str:
    """Transfer the caller to the sales team."""
    raise TransferCall("+4930123456780")


def transfer_to_operator(context: dict) -> str:
    """Transfer the caller to an operator."""
    raise TransferCall("+4930123456781")
agents/service-line.yaml
tools:
  - phone.transfer_to_sales
  - phone.transfer_to_operator
voice_config:
  keypad:
    "1": phone.transfer_to_sales
    "0": phone.transfer_to_operator

Declare the line next to the agent

Add a file to connectors/ with the number in E.164 format. The deploy finds the number in the named Connection, links exactly one voice agent and keeps the API key out of the file.

connectors/service-line.yaml
type: telnyx
name: Service line
connection: support-telnyx
config:
  phone_number: "+4930123456789"
  transfer_numbers:
    - "+4930123456780"
    - "+4930123456781"
  fallback_number: "+4930123456782"
agents:
  - service-line
create: connectors/service-line.yaml (telnyx)

What a voice agent on Telnyx handles

Pick a setup to see the call path and the agent YAML behind it.

Callers name their device, and the agent walks them through the steps from your manuals.

Caller
Telnyx Voice
setup-helper
Steps from your manuals
agents/setup-helper.yaml
version: "1.0"
name: setup-helper
type: llm
model: gemini/gemini-3.8-live
description: Walks callers through device setup
system_prompt: |
  Ask which model the caller has.
  Read one step at a time from the manual you retrieve.
tools:
  - retrieval_query
voice_config:
  greeting: "Hi! Which device are you setting up?"
  interruptions:
    enabled: true

The agent asks for the order number and postcode, then reads out the latest shipping status.

Customer
Telnyx Voice
delivery-status
Status read back
agents/delivery-status.yaml
version: "1.0"
name: delivery-status
type: llm
model: gemini/gemini-3.8-live
description: Tells callers where their delivery is
system_prompt: |
  Ask for the order number and the postcode.
  Say that you are checking, then track the order.
tools:
  - shipments.track_order
voice_config:
  greeting: "Hi! Do you have your order number handy?"
  idle_timeout_seconds: 60

The agent asks about the error and what the caller already tried, then opens a ticket with the details.

Caller
Telnyx Voice
ticket-intake
Ticket in your helpdesk
agents/ticket-intake.yaml
version: "1.0"
name: ticket-intake
type: llm
model: gemini/gemini-3.8-live
description: Opens support tickets from phone calls
system_prompt: |
  Ask for the device, the error and what the caller
  already tried. Read the summary back, then open
  the ticket and give the caller its number.
tools:
  - tickets.create_ticket
voice_config:
  greeting: "Hi! What seems to be the problem?"

Telnyx Voice FAQ

No. When you save the connector, connic creates a Call Control application, assigns your number to it and streams the call through Telnyx media streaming.

No. You pick an existing active number from your own Telnyx account. Buying numbers and managing the account stay in Telnyx.

Yes. Both use the same saved Connection with your API key and public key. Create one connector for calls and another for messages, each with its own number or sender. See Telnyx Messaging for SMS, WhatsApp and RCS.

No. Telnyx Voice handles incoming calls only. The agent can transfer a caller to one of the transfer numbers on the connector.

Saving assigns the number to connic's Call Control application and writes the previous assignment to the connector logs. Removing the connector clears only connic's own routing and doesn't restore the earlier assignment.