Skip to content

Commit d2e5074

Browse files
committed
added community video, updated guide
Signed-off-by: Sahil Suman <sahilsuman933@gmail.com>
1 parent 9e2467d commit d2e5074

File tree

3 files changed

+38
-5
lines changed

3 files changed

+38
-5
lines changed

assistants/dynamic-variables.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,36 @@ by passing `assistantOverrides` with `variableValues` to the API or SDK:
1919
}
2020
```
2121

22+
## Utilizing Dynamic Variables in Phone Calls
23+
24+
To leverage dynamic variables during phone calls, follow these steps:
25+
26+
1. **Prepare Your Request:** Construct a JSON payload containing the following key-value pairs:
27+
28+
* `assistantId`: Replace `"your-assistant-id"` with the actual ID of your assistant.
29+
* `assistantOverride`: This object is used to customize your assistant's behavior.
30+
* `variableValues`: An object containing the dynamic variables you want to use, in the format `{ "variableName": "variableValue" }`. For example, `{ "name": "John" }`.
31+
* `customer`: An object representing the call recipient.
32+
* `number`: Replace `"+1xxxxxxxxxx"` with the phone number you wish to call (in E.164 format).
33+
* `phoneNumberId`: Replace `"your-phone-id"` with the ID of your registered phone number. You can get it from the [Phone number](https://dashboard.vapi.ai/phone-numbers) in the dashboard.
34+
35+
2. **Send the Request:** Dispatch the JSON payload to the `/call/phone` endpoint using your preferred method (e.g., HTTP POST request).
36+
37+
```json
38+
{
39+
"assistantId": "your-assistant-id",
40+
"assistantOverride": {
41+
"variableValues": {
42+
"name": "John"
43+
}
44+
},
45+
"customer": {
46+
"number": "+1xxxxxxxxxx"
47+
},
48+
"phoneNumberId": "your-phone-id"
49+
}
50+
```
51+
2252
## Default Variables
2353

2454
By default, the following variables are automatically filled based on the current (UTC) time,

call-forwarding.mdx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ Vapi offers call forwarding functionality through its `forwardingPhoneNumbers` a
3737
```
3838

3939
**Additional Notes:**
40-
41-
<Note>
42-
Vapi currently does not support transferring calls to regular phone numbers if the call originated from SIP.
43-
</Note>
44-
4540
* Pay attention to the format of phone numbers (E.164) when using the API.
4641
* Test your call forwarding setup thoroughly to ensure it functions as expected.
4742

community/videos.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,14 @@ Here are some videos made by people in our community showcasing what Vapi can do
282282
referrerpolicy="strict-origin-when-cross-origin"
283283
allowfullscreen
284284
/>
285+
<iframe
286+
src="https://www.youtube.com/embed/lmHMAJxlD0I?si=sHfjjxJxTah21VTR"
287+
title="YouTube video player"
288+
frameborder="0"
289+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
290+
referrerpolicy="strict-origin-when-cross-origin"
291+
allowfullscreen
292+
/>
285293
</div>
286294

287295

0 commit comments

Comments
 (0)