> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coval.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Outbound Voice

> Configure agents that initiate phone calls to users

## Overview

Outbound Voice connections simulate your agent making calls to users.

<img src="https://mintcdn.com/coval-2e18a559/U0wUcPJCoQATTC61/images/agents/outbound_voice.gif?s=de7f6a9a376cf7007ab7d22c5703095a" alt="Outbound Voice Demo" height="400" className="rounded-lg" noZoom data-path="images/agents/outbound_voice.gif" />

## Configuration Requirements

### Trigger Call Endpoint

* **Field**: `trigger_call_endpoint`
* **Type**: String (required)
* **Format**: Valid HTTPS URL
* **Purpose**: The webhook endpoint where outbound calls are initiated
* **Example**: `https://your-endpoint.com/webhook`

### Trigger Call Headers

* **Field**: `trigger_call_headers`
* **Type**: String (optional)
* **Format**: Valid JSON string
* **Purpose**: HTTP headers to include in trigger requests
* **Example**: `{"Content-Type": "application/json", "Authorization": "Bearer token123"}`

### Phone Number Key

* **Field**: `phone_number_key`
* **Type**: String (optional)
* **Default**: `"phone_number"`
* **Purpose**: Key used to identify the phone number in the trigger payload
* **Example**: `"phone_number"`, `"recipient_phone"`, `"target_number"`

### Trigger Call Payload

* **Field**: `trigger_call_payload`
* **Type**: String (optional)
* **Format**: Valid JSON string
* **Purpose**: Additional data to send with the trigger request
* **Example**: `{"sequence_code": "ABC123", "campaign_id": "summer2024"}`

## Setup Instructions

1. Configure webhook endpoint URL that can receive HTTP POST requests
2. Set authentication headers as JSON string
3. Define phone number key and payload structure
4. Test webhook response and call initiation

## Technical Details

**Call Initiation Flow**

1. Coval sends HTTP POST request to trigger endpoint
2. Your system receives webhook and initiates call
3. Agent connects to specified phone number
4. Conversation proceeds with real-time monitoring

**Webhook Payload Structure**

```json theme={null}
{
  "phone_number": "+12345678901",
  "sequence_code": "ABC123",
  "campaign_id": "summer2024"
}
```

## Troubleshooting

**Common Issues:**

* **Webhook Not Triggering**: Verify endpoint URL and accessibility
* **Invalid JSON Format**: Validate headers and payload syntax
* **Authentication Failures**: Check authorization headers and tokens
* **Call Connection Issues**: Verify phone number format and availability

***

## Outbound Voice Simulations

Coval's Outbound Voice Simulation feature enables you to test your voice agents by having Coval simulate realistic customer interactions. Instead of your agent calling a test phone number, Coval triggers your system to initiate an outbound call to our simulated customer, creating a more realistic testing environment that mirrors your production call flows.

### **How It Works**

1. **You configure** an endpoint that Coval can call to trigger outbound calls
2. **Coval starts** a simulation and sends a request to your trigger endpoint
3. **Your system** receives the request and initiates an outbound call to our simulated customer
4. **The simulation runs** with realistic customer responses based on your test scenarios
5. **Coval provides** detailed transcripts, recordings, and analysis of the interaction

***

## **Getting Started**

### **Prerequisites**

Before setting up outbound voice simulations, ensure you have:

* An endpoint that can receive HTTP POST requests
* The ability to initiate outbound calls from your phone system
* API authentication mechanism (recommended)
* Phone system capable of dialing phone numbers

### **Quick Setup**

1. **Prepare Your Trigger Endpoint**
   * Create an endpoint that accepts POST requests
   * Implement authentication (API key, bearer token, etc.)
   * Add logic to extract phone number and initiate calls
2. **Configure in Coval**
   * Navigate to your simulation settings
   * Select "Outbound Voice" as the simulation type
   * Enter your trigger endpoint URL
   * Configure headers and payload format
   * Test the configuration
3. **Run Your First Simulation**
   * Create a test scenario
   * Start the simulation
   * Monitor the call initiation and interaction

## **Configuration Details**

### **Trigger Call Endpoint**

**Purpose**: The URL where Coval will send requests to trigger outbound calls from your system. This is a required field.

**Requirements**:

* Must be a valid HTTP/HTTPS URL
* Should be publicly accessible or whitelisted for Coval's IP ranges
* Must respond within 30 seconds
* Should return 2xx status codes for successful requests

**Example Configuration**:

```
https://api.yourcompany.com/triggers/voice-simulation
```

### **Trigger Call Headers**

Configure HTTP headers that Coval will include with every trigger request. This typically includes authentication and content type headers. This is an optional field.

**Format**: Valid JSON object

```json theme={null}
{
  "Content-Type": "application/json",
  "Authorization": "Bearer your-api-key-here",
  "X-Source": "coval-simulation"
}
```

**Common Headers**:

* `Authorization`: API keys, bearer tokens, or basic auth
* `Content-Type`: Usually `application/json`
* `X-API-Key`: Alternative authentication method
* Custom headers for routing or identification

### **Trigger Call Payload**

The base JSON payload that Coval will send to your endpoint. Coval automatically adds the phone number field to this payload. This is an optional field.

**Format**: Valid JSON object

```json theme={null}
{
  "campaign_id": "test-campaign-001",
  "priority": "high"
}
```

**Note**: The `phone_number` field will be automatically added by Coval.

### **Phone Number Key**

Customize the field name used for the phone number in the payload. This allows integration with systems that expect different field names.

**Default**: phone\_number

**Common Alternatives**:

* `phoneNumber`
* `phone`
* `number`
* `phoneNumberToCall`
* `destination`

**Example**: If your system expects `destination`, configure this field as `destination`, and the payload will include:

```json theme={null}
{
  "campaign_id": "test-campaign-001",
  "destination": "+1-555-123-4567"
}
```
