You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This guide walks you through setting up both outbound and inbound SIP trunking between Amazon Chime SDK and Vapi using a Voice Connector.
8
8
9
+
This is a **Voice Connector-only** integration — inbound and outbound calls work with no Lambda functions or custom logic required. Vapi handles the AI assistant entirely. This approach is best for straightforward AI assistants on a phone number where no additional integration is needed.
10
+
11
+
<Note>
12
+
This integration does not support passing custom SIP headers, metadata, or enriched escalation data (e.g., human transfer with SIP header context). For those use cases, use a **SIP Media Application** with **CallAndBridge** instead.
13
+
</Note>
14
+
9
15
## Prerequisites
10
16
11
17
- An AWS account with access to the [Amazon Chime SDK console](https://console.aws.amazon.com/chime-sdk/)
@@ -180,20 +186,16 @@ curl -X POST https://api.vapi.ai/call/phone \
180
186
181
187
</Steps>
182
188
183
-
## Inbound calls (Vapi to Chime SDK)
189
+
## Inbound calls (Chime SDK to Vapi)
184
190
185
-
For inbound calls, a caller dials your Chime SDK phone number. The call flows through a SIP Rule, SIP Media Application, and Lambda function that bridges the call to Vapi via the Voice Connector:
191
+
For inbound calls, a caller dials your Chime SDK phone number. The Voice Connector routes the call to Vapi through its origination settings — no Lambda or SIP Media Application required:
186
192
187
193
```mermaid
188
194
graph LR
189
195
A[Caller] --> B[Chime Phone Number]
190
-
B --> C[SIP Rule]
191
-
C --> D[SIP Media Application]
192
-
D --> E[Lambda]
193
-
E --> F[CallAndBridge]
194
-
F --> G[Voice Connector]
195
-
G --> H[sip.vapi.ai]
196
-
H --> I[Vapi AI Assistant]
196
+
B --> C[Voice Connector]
197
+
C --> D[sip.vapi.ai]
198
+
D --> E[Vapi AI Assistant]
197
199
```
198
200
199
201
### Vapi configuration
@@ -240,7 +242,7 @@ Save the returned `id` — this is your **Credential ID** used in the following
240
242
241
243
<Steptitle="Register a phone number and assign your assistant">
242
244
243
-
Register a SIP phone number in Vapi, linking it to the credential and your assistant.
245
+
Register your Chime SDK phone number in Vapi, linking it to the credential and your assistant:
244
246
245
247
```bash
246
248
curl -X POST https://api.vapi.ai/phone-number \
@@ -249,17 +251,16 @@ curl -X POST https://api.vapi.ai/phone-number \
249
251
-d '{
250
252
"provider": "byo-phone-number",
251
253
"name": "Chime SDK Number",
252
-
"number": "YOUR_SIP_USERNAME",
253
-
"numberE164CheckEnabled": false,
254
+
"number": "YOUR_CHIME_PHONE_NUMBER",
255
+
"numberE164CheckEnabled": true,
254
256
"credentialId": "YOUR_CREDENTIAL_ID",
255
257
"assistantId": "YOUR_ASSISTANT_ID"
256
258
}'
257
259
```
258
260
259
-
<Note>
260
-
The SIP username can be any string — it does not need to be a phone number. This value becomes the user portion of the SIP URI that the Voice Connector sends calls to.
261
-
</Note>
262
-
261
+
<Warning>
262
+
The `number` field must exactly match the E.164 phone number assigned to your Voice Connector (e.g., `+18312168445`). Inbound calls will fail to route if the numbers don't match.
263
+
</Warning>
263
264
264
265
</Step>
265
266
@@ -269,27 +270,13 @@ The SIP username can be any string — it does not need to be a phone number. Th
269
270
270
271
<Steps>
271
272
272
-
<Steptitle="Provision a phone number">
273
-
274
-
In the AWS Chime SDK console, go to **Phone Number Management** and either provision a new phone number or update an existing one.
275
-
276
-
Set the **Product type** to **SIP Media Application Dial-In**.
- `YOUR_VOICE_CONNECTOR_ID` — your Voice Connector ID
373
-
- `YOUR_UNIQUE_USERNAME` — the SIP username you configured in the Vapi phone number step
374
-
375
-
The `Uri` field is the user portion of the SIP request. The Voice Connector sends the INVITE to the origination host (`sip.vapi.ai`) with this value as the user, resulting in `sip:YOUR_UNIQUE_USERNAME@YOUR_CREDENTIAL_ID.sip.vapi.ai`.
376
-
377
-
<Note>
378
-
The Lambda needs no special Chime SDK permissions — the SMA invokes it directly. Ensure the execution role has **AWSLambdaBasicExecutionRole** for CloudWatch logging.
379
-
</Note>
380
-
381
-
</Step>
382
-
383
-
<Step title="Create the SIP Media Application">
384
-
385
-
In the Chime SDK console, go to **SIP media applications** and create a new one. Enter a name and the **Lambda function ARN** from the previous step.
386
-
387
-

388
-
389
-
Note the returned **SIP Media Application ID**.
390
-
391
-
</Step>
392
-
393
-
<Step title="Create the SIP Rule">
394
-
395
-
The SIP rule connects your provisioned phone number to the SIP Media Application. When a call arrives at your phone number, Chime invokes the SMA, which triggers the Lambda, which bridges the call to Vapi.
396
-
397
-
In the Chime SDK console, go to **SIP rules** and create a new one:
398
-
399
-
- **Trigger type:** To phone number
400
-
- **Phone number:** Select your provisioned number
401
-
- **SIP media application:** Select the SMA you created
Call your Chime SDK phone number from any phone. The call routes through the Voice Connector's origination settings to `sip.vapi.ai`, where your Vapi assistant answers.
410
292
411
-
To debug issues:
412
-
- Check **CloudWatch Logs** for the Lambda function to see event payloads and errors.
413
-
- Enable **SIP logging** on the Voice Connector (under the **Logging** tab) for detailed SIP message traces.
293
+
To debug issues, enable **SIP logging** on the Voice Connector (under the **Logging** tab) for detailed SIP message traces.
0 commit comments