Skip to main content

Overview

An inbound voice agent answers incoming phone calls. To test one, Coval calls your agent, plays the role of the user, and runs the conversation against your test set and persona. Connect Agent Demo

Choose how to connect

Most inbound voice agents just use a phone number. Use a SIP address or SIP trunk if your agent needs to receive extra context with each call — see Passing context to your agent. Start with a phone number unless you specifically need to pass per-call context to your agent — that’s the main reason to choose a SIP address or trunk.

Configure

1

Select Inbound Voice

Choose “Inbound Voice” as the connection type.
2

Enter your phone number or SIP address

Set the phone_number field to either an E.164 number (+12345678901) or a SIP URI (sip:agent@example.com). It must be a valid phone number or SIP URI.
3

Save and test

Save the configuration and run a test call.

Passing context to your agent (SIP)

The main reason to use a SIP connection is that Coval can include custom SIP headers on each call, carrying values your agent needs to set up the right context — for example a pre-configured user_id, account ID, routing target, or agent and test-case attributes. Your agent reads these headers when the call arrives and resolves the correct account, customer, or configuration for that simulated call. This isn’t possible over a plain PSTN phone number, where carriers strip custom headers. Configure custom headers on the agent. Header values can be static or use these customer-facing template variables: Run metadata is useful when every launch needs fresh connection context, such as a temporary routing destination or a job ID. Configure the header template once on the agent:
Then provide the values in metadata.customer when you launch the run:
Coval resolves the headers separately for each run before placing the call. Run-metadata templates support nested paths and array indexes, but the resolved value must be a string, number, or boolean. If a referenced key is missing or resolves to an object, array, or null, the simulation fails before dialing instead of sending an unresolved header. Coval also rejects any resolved header value that contains a carriage return or line feed.
Run metadata is visible through the Runs API. Do not put passwords, API keys, or other secrets in run metadata or SIP headers.
When a Twilio Programmable Voice SIP Domain receives the call, Twilio exposes custom headers whose names start with X- as incoming webhook parameters prefixed with SipHeader_. For example, X-Preflight-Job-Id arrives as SipHeader_X-Preflight-Job-Id. See Twilio’s SIP custom-header documentation.
SIP connections also expose a Wideband Audio (16kHz) toggle. When enabled, Coval asks its telephony provider to prefer wideband codecs such as G.722 and AMR-WB on the SIP leg, while retaining G.711 and G.729 as fallbacks. Your SIP endpoint must support at least one of the offered wideband codecs to negotiate wideband audio.L16 PCM is used for the internal 16kHz media stream between Coval and its telephony provider; it is not the codec offered to your SIP endpoint. An intermediary SBC or carrier may still transcode the call, so confirm the codec selected in the SIP answer if audio remains narrowband.

How simulations work

When you launch an evaluation with an inbound voice agent (with your agent’s phone number or SIP address set in a Coval template):
  1. Coval’s simulated user calls your agent’s phone number or SIP address.
  2. The conversation follows the test set scenarios you’ve defined.
  3. The simulated user behaves according to the persona you’ve configured.
  4. Metrics are automatically evaluated after the call completes.

Identifying simulation calls

Coval includes a custom SIP header in every outgoing call so you can correlate incoming calls with their simulation runs:
Whether your agent can read this header depends on which connection method you use.

SIP connection — read the header

If your agent receives calls at a SIP endpoint (for example, a Twilio Programmable Voice SIP Domain, a Telnyx SIP connection, or your own SBC), the SIP path can preserve the header end to end. Read it from the incoming SIP request or a provider webhook, depending on the provider:
  • Twilio Programmable Voice SIP Domains — expose X- custom SIP headers as parameters prefixed with SipHeader_ on incoming call webhooks, so the value arrives as SipHeader_X-Coval-Simulation-Id. See Twilio’s SIP custom-header documentation.
  • Telnyx — carries custom_headers on the outbound SIP INVITE; read X-Coval-Simulation-Id from the request at your SIP endpoint. See Telnyx’s Dial API documentation.

Phone number (PSTN) — the header is stripped

If your agent receives calls on a standard phone number, the call routes through the public telephone network, which strips non-standard SIP headers — X-Coval-Simulation-Id will not reach your application. Identify simulation calls instead by the calling phone number or by matching timestamps in the Coval dashboard.
Using Twilio Programmable Voice over a regular phone number (PSTN)? Use the pre_call_webhook_url approach instead: Coval notifies your agent of the simulation ID before each call. See the Twilio ConversationRelay guide for setup instructions.

Presenting a specific caller ID (ANI)

If your agent identifies or authenticates callers by their phone number (ANI), you can make each simulated caller present a specific number instead of a Coval pool number — for example, the phone number attached to a test account, so the agent resolves the caller automatically. Set the ani_phone_number metadata field on the agent to either a static E.164 number or a test-case attribute template:
With the template form, each test case carries its own number in an ani attribute, so every simulation presents the caller ID that matches its test data. Requirements and behavior:
  • The resolved number must be in E.164 format (e.g. +12345678901). Your organization’s Coval-provisioned pool numbers are allowed by default, so you can present them without any setup. To present any other number (for example a customer test-account number), add it to your organization’s ANI allowlist in Settings → Caller ID (ANI) — no support ticket needed to manage the list. The number must also be verified for use on Coval’s telephony connection (a one-time carrier-authorization step) before it will present. Simulations fail before dialing when the number is unauthorized, rather than placing a call the carrier would reject.
  • Coval dials with the number as the caller ID on the outbound call, so the receiving telephony presents it (for example, Amazon Connect stores it as the contact’s customer phone number). The number must be authorized for use on Coval’s telephony connection — contact Coval support to arrange verification of your numbers.
  • When a pre_call_webhook_url is configured, its from_number reports the presented caller ID, not Coval’s pool number, so your correlation logic can match on what your telephony actually sees.
  • Calls presenting numbers Coval doesn’t own receive lower STIR/SHAKEN attestation. This is normally fine for calls terminating into your own contact center, but confirm call delivery and presentation on your actual route before relying on it.

Firewall & IP allowlist (SIP infrastructure only)

This applies only if you receive calls on your own SIP infrastructure (SBC, IP-PBX, or SIP trunk endpoint) and restrict inbound traffic by IP. If your agent receives calls on a regular phone number through a cloud provider like Twilio or Telnyx, calls arrive through your provider’s normal flow and no allowlisting is needed.
When Coval places a simulation call to your SIP infrastructure, the call arrives from specific IPs. If your firewall, ACLs, or security groups restrict which IPs can send SIP traffic, you must allowlist the IPs below — otherwise simulation calls are silently dropped before they reach your agent. Two types of traffic need to be allowed.

Signaling IPs (SIP)

SIP signaling initiates calls (the SIP INVITE plus responses). Allow these IPs on ports UDP/TCP 5060 and TLS 5061.

Media IP subnets (RTP)

RTP carries the audio once the call connects. Allow these subnets on UDP ports 16384–32768.
If simulation calls are failing with no audio or immediate hangups, a missing IP allowlist entry is a common cause. Verify that both the signaling IPs and media subnets are allowed in your firewall.

Troubleshooting