Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
c7ba2f4
Update langfuse.mdx (#98)
humford Dec 10, 2024
5010f6a
Add changelog for 2024-12-10 (#101)
quantstruct[bot] Dec 10, 2024
49d4d19
:herb: :sparkles: [Scheduled] Update API Spec (#103)
fern-api[bot] Dec 11, 2024
fdd321e
update fern docs (#104)
teejas Dec 11, 2024
0c2207f
[Docs] Reorg the Enterprise section to include HIPAA and SOC-2 docs
Dec 12, 2024
fec70e2
Revert "update fern docs (#104)" (#108)
nikhilro Dec 12, 2024
2a9c7a3
[VAP-1826] Create new SIP Advanced section with Telynx guide (#109)
ram-sharma Dec 12, 2024
024b7f1
add Silent Transfer instructions to Prompting Guide (#111)
ram-sharma Dec 12, 2024
40a0c8d
Add changelog for December 13, 2024 (#112)
quantstruct[bot] Dec 14, 2024
7c8c6d0
Add changelog for December 11, 2024 (#106)
quantstruct[bot] Dec 14, 2024
628f764
Add changelog for December 14, 2024 (#113)
quantstruct[bot] Dec 14, 2024
94752ca
Update billing-limits and Speech Configuration file (#118)
akankshadev99 Dec 18, 2024
71e50f1
Update assistant-setup-inbound.mdx (#105)
ram-sharma Dec 18, 2024
efd0c92
Add changelog for December 19, 2024 (#119)
quantstruct[bot] Dec 20, 2024
b69bb5f
advanced functionality such as idle messages now supported with realt…
bryantanderson Dec 22, 2024
31b822e
upgrade version (#124)
fern-support Dec 26, 2024
14cd70a
(suggestion) update changelog location (#125)
fern-support Dec 30, 2024
69563de
Add changelog for December 30, 2024 (#128)
quantstruct[bot] Dec 31, 2024
e64ef6c
(chore): upgrade versions to latest (#127)
fern-api[bot] Dec 31, 2024
64fb5bc
(chore): upgrade versions to latest (#115)
fern-api[bot] Dec 31, 2024
fac1ee2
(chore): upgrade versions to latest (#116)
fern-api[bot] Dec 31, 2024
09ce430
(chore): upgrade versions to latest (#117)
fern-api[bot] Dec 31, 2024
01f11f3
:herb: :sparkles: [Scheduled] Update API Spec (#126)
fern-api[bot] Jan 1, 2025
c7057f7
Add changelog for December 21, 2024 (#122)
quantstruct[bot] Jan 1, 2025
f94bdda
Update openapi-overrides.yml
sahilsuman933 Jan 2, 2025
e9e80c0
Update openapi-overrides.yml
sahilsuman933 Jan 2, 2025
6fa4764
Revert to commit ce85abc
sahilsuman933 Jan 2, 2025
9b6c242
docs: trieve byok (#130)
rumbleFTW Jan 4, 2025
df5dae6
fix typo (#131)
hackthehackerman Jan 4, 2025
12dd3b3
remove the enterprise endpoint from api-reference page.
sahilsuman933 Jan 5, 2025
91c6f0b
Add changelog for January 05, 2025 (#132)
quantstruct[bot] Jan 5, 2025
26c0b61
Add changelog for January 07, 2025 (#137)
quantstruct[bot] Jan 7, 2025
6500de5
:herb: :sparkles: [Scheduled] Update API Spec (#133)
fern-api[bot] Jan 7, 2025
1cef89c
Adding posthog integration for analytics (#141)
sagar-vapi Jan 8, 2025
568f9cd
(chore): upgrade versions to latest (#135)
fern-api[bot] Jan 11, 2025
4f7acf2
(chore): upgrade versions to latest (#134)
fern-api[bot] Jan 11, 2025
d2feb18
:herb: :sparkles: [Scheduled] Update API Spec (#139)
fern-api[bot] Jan 11, 2025
2c60705
chore: downgrade to `0.46.16` (#149)
fern-support Jan 14, 2025
cabf0d3
Add changelog for January 11, 2025 (#144)
quantstruct[bot] Jan 15, 2025
41fd00b
Add changelog for January 14, 2025 (#151)
quantstruct[bot] Jan 15, 2025
fcbdbda
:herb: :sparkles: [Scheduled] Update API Spec (#150)
fern-api[bot] Jan 15, 2025
dedd1a5
(chore): upgrade versions to latest (#148)
fern-api[bot] Jan 15, 2025
6047956
(chore): upgrade versions to latest (#147)
fern-api[bot] Jan 15, 2025
ac8968e
:herb: :sparkles: [Scheduled] Update API Spec (#152)
fern-api[bot] Jan 17, 2025
099d37a
Add changelog for January 16, 2025 (#154)
quantstruct-bot Jan 17, 2025
c7bd6cc
Update expert-directory.mdx
sahilsuman933 Jan 20, 2025
9897ee4
(chore): upgrade versions to latest (#158)
fern-api[bot] Jan 21, 2025
f1e49a8
:herb: :sparkles: [Scheduled] Update API Spec (#155)
fern-api[bot] Jan 21, 2025
38ae3b5
(chore): upgrade versions to latest (#157)
fern-api[bot] Jan 21, 2025
2118256
Add changelog for January 20, 2025 (#159)
quantstruct-bot Jan 21, 2025
9cb0fd6
VAP-2295 [DOCS] Update KB & Bring your own trieve docs for new schema…
rumbleFTW Jan 21, 2025
b76e64f
:herb: :sparkles: [Scheduled] Upgrade Fern CLI (#156)
fern-api[bot] Jan 21, 2025
7792004
Revert ":herb: :sparkles: [Scheduled] Upgrade Fern CLI (#156)" (#160)
fern-support Jan 21, 2025
be85726
Add changelog for January 21, 2025 (#161)
quantstruct-bot Jan 21, 2025
85c4be5
fix: update fern cli (#163)
fern-support Jan 21, 2025
cb1cae3
feat: add voice formatting and transfer docs (#162)
bajajcodes Jan 21, 2025
a9c1909
:herb: :sparkles: [Scheduled] Update API Spec (#164)
fern-api[bot] Jan 22, 2025
d37a443
Update generators.yml
fern-support Jan 22, 2025
4ab68ef
Add changelog for January 22, 2025 (#168)
quantstruct-bot Jan 23, 2025
f6ede63
feat: add silent transfer and voice mail detection docs (#167)
bajajcodes Jan 23, 2025
f98b21b
:herb: :sparkles: [Scheduled] Update API Spec (#165)
fern-api[bot] Jan 23, 2025
e6f7bd6
:herb: :sparkles: [Scheduled] Update API Spec (#169)
fern-api[bot] Jan 25, 2025
b236984
Detailed info on trieve-dashboard and BYOK (#170)
rumbleFTW Jan 28, 2025
84a7545
(chore): upgrade versions to latest (#171)
fern-api[bot] Jan 28, 2025
ff4f1a7
Add changelog for January 29, 2025 (#177)
quantstruct-bot Jan 31, 2025
a5602dd
Add subscription form (#181)
quantstruct-bot Feb 3, 2025
faa630d
Add changelog for February 2, 2025 (#180)
quantstruct-bot Feb 3, 2025
e0d14db
Update dark mode text (#182)
quantstruct-bot Feb 3, 2025
c359288
Add staging values for customer.io (so we don't lose subscriptions) (…
quantstruct-bot Feb 3, 2025
6a4353e
added docs for Custom LLM Tool Calling Integration (#184)
bajajcodes Feb 3, 2025
db1b892
:herb: :sparkles: [Scheduled] Update API Spec (#176)
fern-api[bot] Feb 3, 2025
9d63899
docs: update headline of Langfuse integration (#178)
jannikmaierhoefer Feb 3, 2025
10c24e3
More docs on Trieve configs (#175)
rumbleFTW Feb 3, 2025
36cc587
(chore): upgrade versions to latest (#179)
fern-api[bot] Feb 3, 2025
6a6a439
:herb: :sparkles: [Scheduled] Update API Spec (#185)
fern-api[bot] Feb 5, 2025
d25f9f5
Add changelog for February 4, 2025 (#186)
quantstruct-bot Feb 5, 2025
c2de33b
Update knowledgebase.mdx
sahilsuman933 Feb 5, 2025
5d5ac5d
fix: kb files path (#189)
bryantanderson Feb 6, 2025
3d49eb8
added: calls on hold specialist transfer (#193)
bajajcodes Feb 10, 2025
36b8454
docs: free telephony (#190)
bryantanderson Feb 10, 2025
9167a28
fix(changelog): update form action URL with new site and form IDs for…
quantstruct-bot Feb 11, 2025
66607f7
Add changelog for February 10, 2025 (#194)
quantstruct-bot Feb 11, 2025
1d9930a
Checking in
jordancde Feb 11, 2025
8c13159
Update knowledgebase.mdx (#192)
danielkalen Feb 12, 2025
c22ee4c
VAP-2744 Adding PCI compliance changes (#187)
sahil-vapi Feb 12, 2025
b10fa9b
:herb: :sparkles: [Scheduled] Update API Spec (#188)
fern-api[bot] Feb 12, 2025
ade95d2
(chore): upgrade versions to latest (#191)
fern-api[bot] Feb 12, 2025
b9697c8
(chore): upgrade versions to latest (#172)
fern-api[bot] Feb 12, 2025
303a506
(chore): upgrade versions to latest (#173)
fern-api[bot] Feb 12, 2025
a5ea290
(chore): upgrade versions to latest (#174)
fern-api[bot] Feb 12, 2025
75f0169
VAP-2041 [Docs] Update endCall documentation to reflect changes in to…
humford Feb 13, 2025
c045ff1
Update function-calling.mdx
humford Feb 13, 2025
665e9c1
moving knowledge base pages (#198)
humford Feb 13, 2025
8cc98d4
Support and billing page fixes (#200)
humford Feb 14, 2025
e501567
VAP-3003: [Docs] Restructure top-level sidebar categories to align wi…
humford Feb 14, 2025
fe056ee
quickstart refactor
humford Feb 14, 2025
61bf9b1
build / deploy refactor
humford Feb 14, 2025
506b2ff
info hierarchy
humford Feb 15, 2025
00dc89c
:herb: :sparkles: [Scheduled] Update API Spec (#199)
fern-api[bot] Feb 15, 2025
d5e9789
added custom transcriber (#203)
bajajcodes Feb 15, 2025
cfbd66f
VAP-3082: Add public docs section and introduction page for Workflows…
humford Feb 16, 2025
9cba8e4
Add changelog for February 17, 2025 (#210)
quantstruct-bot Feb 17, 2025
cc28be1
Add changelog for February 17, 2025 (#211)
quantstruct-bot Feb 18, 2025
e541f5b
verbs -> tasks rename
humford Feb 18, 2025
aa298f8
unhide voice testing
humford Feb 19, 2025
5419e9e
:herb: :sparkles: [Scheduled] Update API Spec (#204)
fern-api[bot] Feb 19, 2025
7994e99
Checking in
jordancde Feb 20, 2025
531aafe
(chore): upgrade versions to latest (#205)
fern-api[bot] Feb 20, 2025
03acde4
:herb: :sparkles: [Scheduled] Update API Spec (#217)
fern-api[bot] Feb 20, 2025
886865d
(chore): upgrade versions to latest (#206)
fern-api[bot] Feb 20, 2025
fcbc936
(chore): upgrade versions to latest (#207)
fern-api[bot] Feb 20, 2025
ccb2074
(chore): upgrade versions to latest (#208)
fern-api[bot] Feb 20, 2025
fad2eb0
chore: upgrade python generator (#209)
fern-support Feb 20, 2025
44b493b
Update workflows.mdx (#212)
SidneyAllen Feb 20, 2025
e088adf
fix test suite doc (#218)
abizzaar Feb 20, 2025
99ca597
fix voice testing oc (#219)
abizzaar Feb 20, 2025
2a840b8
feat(openapi): add chatgpt-4o-latest model and Cartesia voice control…
fern-api[bot] Feb 21, 2025
86120b6
Update docs on voice fallback plans (#216)
bryantanderson Feb 21, 2025
a0370a0
Add changelog updates for 2025-02-20 (#221)
quantstruct-bot Feb 21, 2025
8fb1816
:herb: :sparkles: [Scheduled] Update API Spec (#222)
fern-api[bot] Feb 22, 2025
fd092d2
docs in build section for free numbers (#223)
bryantanderson Feb 23, 2025
c85e5fa
feat(openapi): add test suite and run endpoints and voice options (#224)
fern-api[bot] Feb 23, 2025
d161bea
(chore): upgrade versions to latest (#225)
fern-api[bot] Feb 24, 2025
524bcfe
(chore): upgrade versions to latest (#226)
fern-api[bot] Feb 24, 2025
4850fca
(chore): upgrade versions to latest (#227)
fern-api[bot] Feb 24, 2025
600e769
(chore): upgrade versions to latest (#228)
fern-api[bot] Feb 24, 2025
e52c6fa
(chore): upgrade versions to latest (#229)
fern-api[bot] Feb 24, 2025
92e65fe
feat: update colors (#230)
sushanyadav Feb 25, 2025
2c914fb
Update voice-testing.mdx
yoshita53 Feb 25, 2025
0481762
fix favicon
humford Feb 25, 2025
7b6a90b
Removed support create option in trieve integration (#231)
ramsrib Feb 25, 2025
79086a6
Cleanup `transcriptType=\"final\"` to `transcriptType='final'`.
eyw520 Feb 25, 2025
ea2c3e3
Move updates to `openapi-overrides.yml`.
eyw520 Feb 25, 2025
faa12a7
Added Supabase Cloud Provider Docs (#233)
Ash110 Feb 25, 2025
2c2977e
Add changelog for February 25, 2025 (#235)
quantstruct-bot Feb 26, 2025
094dcd6
Added docs for warm-transfer-with-twiml (#234)
ramsrib Feb 26, 2025
a266ac1
added TCPA consent guide
humford Feb 28, 2025
f65305d
legal section
humford Feb 28, 2025
2370555
Add changelog updates for 2025-02-27 (#237)
quantstruct-bot Mar 1, 2025
1b7f63f
Add changelog updates for 2025-03-02 (#238)
quantstruct-bot Mar 3, 2025
9665487
Add Zadarma Documentation.
sahilsuman933 Mar 4, 2025
57484e7
Added SIP Trunking Guide
sahilsuman933 Mar 4, 2025
30d7a38
fix: removeed unused css (#239)
fern-support Mar 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
id: generate-docs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
POSTHOG_PROJECT_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
run: |
OUTPUT=$(fern generate --docs --preview --log-level debug 2>&1) || true
echo "$OUTPUT"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ jobs:
- name: Publish Docs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
POSTHOG_PROJECT_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
run: fern generate --docs --log-level debug
2 changes: 1 addition & 1 deletion fern/GHL.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: How to Connect Vapi with Make & GHL
slug: GHL
slug: tools/GHL
---


Expand Down
167 changes: 167 additions & 0 deletions fern/advanced/sip/sip-telnyx.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
---
title: Telnyx SIP Integration
subtitle: How to integrate SIP Telnyx to Vapi
slug: advanced/sip/telnyx
---
## Inbound
### On Vapi
<Steps>
<Step title="Personalized origination SIP URI creation">

First we will create a personalized origination SIP URI via the Vapi API

```json
curl --location 'https://api.vapi.ai/phone-number' \
--header 'Authorization: Bearer your-vapi-private-api-key' \
--header 'Content-Type: application/json' \
--data-raw '{
"provider": "vapi",
"sipUri": "sip:username@sip.vapi.ai",
"assistantId": "your-assistant-id"
}'
```
- ```provider```: This is set to "vapi".
- ```sipUri```: Replace ` username ` with your desired SIP username.
- ```assistantId```: Provide your specific `assistant ID` associated with your Vapi AI account.
</Step>

<Step title="[Optional] Send call request to a webhook instead of assistant">

Send a PATCH to /phone-number/your_phone_id

```json
curl --location --request PATCH 'https://api.vapi.ai/phone-number/your_phone_id' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your-vapi-private-api-key' \
--data '{
"assistantId": null,
"serverUrl": "https://your_server_url"
}'
```
- `your_server_url` is the webhook link that will receive the assistant request.
- `your_phone_id` is the id of your just created origination sip URI

Now every time you make a call to this number (i.e. assigned numbers on SIP trunking to this origination URI), you'll get a webhook event requesting an assistant.
</Step>
</Steps>

### On Telnyx
<Steps>
<Step title="Setup inbound authentication">
1. Go to Voice / SIP Trunking / Create
2. Select FQDN
3. Select add FQDN
4. Select A
5. Add created SIP URI
6. FQDN: sip.vapi.ai
7. Port should be 5060 by default
</Step>
<Step title="Go to Inbound tab">
Set as follows:
<Frame>
<img src="../../static/images/sip/telynx-inbound.png" />
</Frame>
</Step>
<Step title="Assign your acquired phone number to SIP trunking">
Go to numbers tab, assign number
</Step>
<Step title="Modify SIP invite">
Modify SIP invite so your VAPI and Telnyx accounts will be matched correctly
1. Go to numbers, edit the one your will be using
2. Navigate do voice
3. Scroll down till the end to find Translated Number

*This setting will modify the SIP Invite to the vapi platform so invites are sent to your vapi sip URI. It will be whatever value you set when you created it.*

4. If your chosen sipURI from previous step is username@sip.vapi.ai , this should be username
5. Done! You should now be receiving calls!
</Step>
</Steps>

## Outbound
### On Telnyx
<Steps>
<Step title="Set outbound authentication method">
1. Go to Voice / Sip Trunking / Authentication and routing
2. Scroll down to outbound calls authentication and:
- Add the two fixed IPs from VAPI, select Tech Prefix and create a unique 4-digits Tech Prefix (example 1234 - don't use 1234, must be unique to your account)
<Frame>
<img src="../../static/images/sip/telynx-outbound-auth.png" />
</Frame>
</Step>
<Step title="Create outbound voice profiles">
1. Go to voice / outbound voice profiles
2. Create profile
3. Name it as you will (1. details)
4. Allow as desired destination (2. destinations)
5. Leave the next screen as is (3. configuration)
6. Assign the desired sip trunk (4. …)
7. Complete

Or you an just go to sip trunk / you sip trunk / outbound / and select your just created outbound voice profile.
</Step>
<Step title="Go to Outbound tab to select the country you'll be calling the most">
Set as follows, choosing the country that you will be making most calls to (example Brazil)

*We recommend creating a separate SIP Trunk for each country you aim to be making most calls to.*
<Frame>
<img src="../../static/images/sip/telynx-outbound-settings.png" />
</Frame>
</Step>
</Steps>
### On Vapi
<Steps>
<Step title="Create a SIP Trunk Credential through Vapi API">
```json
curl -X POST https://api.vapi.ai/credential \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-vapi-private-api-key" \
-d '{
"provider": "byo-sip-trunk",
"name": "Telnyx Trunk",
"gateways": [
{
"ip": "sip.telnyx.com"
}
]
}'
```
</Step>
<Step title="Create a Phone Number Associated with the SIP Trunk">
```json
curl -X POST https://api.vapi.ai/phone-number \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-vapi-private-api-key" \
-d '{
"provider": "byo-phone-number",
"name": "Telnyx SIP Number",
"number": "your-sip-phone-number",
"numberE164CheckEnabled": false,
"credentialId": "your-new-trunk-credential-id-which-you-got-from-previous-step"
}'
```
</Step>
<Step title="Start making outbound calls">
Use this cURL to trigger calls with tech prefix
```json
curl --location 'https://api.vapi.ai/call/phone' \
--header 'Authorization: Bearer your-vapi-private-api-key' \
--header 'Content-Type: application/json' \
--data '{
"assistantId": "your-assistant-id",
"customer": {
"number": "tech-prefix-with-phone-number-without-plus-signal",
"numberE164CheckEnabled": false
},
"phoneNumberId": "your-phone-id"
}'
```
Example of tech-prefix-with-phone-number-without-plus-signal
- Phone number: +6699999999
- Tech Prefix: 1234
- Should look like this: 12346699999999
- No + as you can see

Done! Outbound should now be working!
</Step>
</Steps>
94 changes: 94 additions & 0 deletions fern/advanced/sip/sip-trunk.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: SIP Trunking Guide for Vapi
subtitle: How to integrate your SIP provider with Vapi
slug: advanced/sip/sip-trunk
---

SIP trunking replaces traditional phone lines with a virtual connection over the internet, allowing your business to make and receive calls via a broadband connection. It connects your internal PBX or VoIP system to a SIP provider, which then routes calls to the Public Switched Telephone Network (PSTN). This setup simplifies your communications infrastructure and often reduces costs.

## 1. Vapi SIP Trunking Options

Vapi supports multiple SIP trunk configurations, including:

- **Telnyx**: Uses SIP gateway domain (e.g., sip.telnyx.com) with IP-based authentication. May require a tech prefix for outbound calls.
- **Zadarma**: Uses SIP credentials (username/password) with its SIP server (e.g., sip.zadarma.com).
- **Custom "BYO" SIP Trunk**: Allows integration with any SIP provider. You simply provide the SIP gateway address and the necessary authentication details.

## 2. Setup Process Overview

To set up a SIP trunk in Vapi, follow these steps:

### Obtain Provider Details

Gather the SIP server address, authentication credentials (username/password or IP-based), and at least one phone number (DID) from your provider.

### Create a SIP Trunk Credential in Vapi

Use the Vapi API to create a new credential (type: byo-sip-trunk) with your provider's details. This informs Vapi how to connect to your SIP network.

**Example (using Zadarma):**

```bash
curl -X POST "https://api.vapi.ai/credential" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
-d '{
"provider": "byo-sip-trunk",
"name": "Zadarma Trunk",
"gateways": [{
"ip": "sip.zadarma.com"
}],
"outboundLeadingPlusEnabled": true,
"outboundAuthenticationPlan": {
"authUsername": "YOUR_SIP_NUMBER",
"authPassword": "YOUR_SIP_PASSWORD"
}
}'
```

Save the returned Credential ID for later use.

### Associate a Phone Number with the SIP Trunk

Link your external phone number (DID) to the SIP trunk credential in Vapi by creating a Phone Number resource.

**Example:**

```bash
curl -X POST "https://api.vapi.ai/phone-number" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
-d '{
"provider": "byo-phone-number",
"name": "Zadarma Number",
"number": "15551234567",
"numberE164CheckEnabled": false,
"credentialId": "YOUR_CREDENTIAL_ID"
}'
```

Note the returned Phone Number ID for use in test calls.

### Test Your SIP Trunk

#### Outbound Call Test

Initiate a call through the Vapi dashboard or API to ensure outbound calls are properly routed.

**API Example:**

```json
POST https://api.vapi.ai/call/phone
{
"assistantId": "YOUR_ASSISTANT_ID",
"customer": {
"number": "15557654321",
"numberE164CheckEnabled": false
},
"phoneNumberId": "YOUR_PHONE_NUMBER_ID"
}
```

#### Inbound Call Test

If inbound routing is configured, call your phone number from an external line. Ensure your provider forwards calls to the correct SIP URI (e.g., `{phoneNumber}@sip.vapi.ai` for Zadarma).
94 changes: 94 additions & 0 deletions fern/advanced/sip/sip-zadarma.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: Zadarma SIP Integration
subtitle: How to integrate SIP Zadarma to Vapi
slug: advanced/sip/zadarma
---


Integrate your Zadarma SIP trunk with Vapi.ai to enable your AI voice assistants to handle calls efficiently. Follow the steps below to set up this integration:

## 1. Retrieve Your Vapi.ai Private Key

- Log in to your Vapi.ai account.
- Navigate to **Organization Settings**.
- In the **API Keys** section, copy your **Private Key**.

## 2. Add Your Zadarma SIP Credentials to Vapi.ai

You'll need to send a `curl` request to Vapi.ai's API to add your SIP credentials:

- **Private Key**: Your Vapi.ai private key.
- **Trunk Name**: A name for your SIP trunk (e.g., "Zadarma Trunk").
- **Server Address**: The server address provided by Zadarma (e.g., "sip.zadarma.com").
- **SIP Number**: Your Zadarma SIP number.
- **SIP Password**: The password for your Zadarma SIP number.

Here's the `curl` command to execute:

```bash
curl -L 'https://api.vapi.ai/credential' \\
-H 'Content-Type: application/json' \\
-H 'Authorization: Bearer YOUR_PRIVATE_KEY' \\
-d '{
"provider": "byo-sip-trunk",
"name": "Zadarma Trunk",
"gateways": [
{ "ip": "sip.zadarma.com" }
],
"outboundLeadingPlusEnabled": true,
"outboundAuthenticationPlan": {
"authUsername": "YOUR_SIP_NUMBER",
"authPassword": "YOUR_SIP_PASSWORD"
}
}'
```
Replace `YOUR_PRIVATE_KEY`, `YOUR_SIP_NUMBER`, and `YOUR_SIP_PASSWORD` with your actual credentials.

If successful, the response will include an `id` for the created credential, which you'll use in the next step.

## 3. Add Your Virtual Number to Vapi.ai

Next, associate your virtual number with the SIP trunk in Vapi.ai:

- **Private Key**: Your Vapi.ai private key.
- **Number Name**: A name for your virtual number (e.g., "Zadarma Number").
- **Virtual Number**: Your Zadarma virtual number in international format (e.g., "15551111111").
- **Credential ID**: The `id` from the previous step.

Use the following `curl` command:

```bash
curl -L 'https://api.vapi.ai/phone-number' \\
-H 'Content-Type: application/json' \\
-H 'Authorization: Bearer YOUR_PRIVATE_KEY' \\
-d '{
"provider": "byo-phone-number",
"name": "Zadarma Number",
"number": "YOUR_VIRTUAL_NUMBER",
"numberE164CheckEnabled": false,
"credentialId": "YOUR_CREDENTIAL_ID"
}'
```

Replace `YOUR_PRIVATE_KEY`, `YOUR_VIRTUAL_NUMBER`, and `YOUR_CREDENTIAL_ID` with your actual details.

## 4. Assign Your Voice Assistant to Handle Calls

- In your Vapi.ai dashboard, go to the **Build** section and select **Phone Numbers**.
- Click on your **Zadarma Number**.
- In the **Inbound Settings** section, assign your voice assistant to handle incoming calls.
- In the **Outbound Form** section, assign your voice assistant to handle outgoing calls.

## 5. Configure Incoming Call Reception in Zadarma

To forward incoming calls from your Zadarma virtual number to Vapi.ai:

- Log in to your Zadarma account.
- Navigate to **Settings** → **Virtual phone numbers**.
- Click the âš™ (gear) icon next to your number.
- Open the **External server** tab.
- Enable **External server (SIP URI)**.
- Enter the address: `YOUR_VIRTUAL_NUMBER@sip.vapi.ai` (replace `YOUR_VIRTUAL_NUMBER` with your number in international format).
- Click **Save**.

By following these steps, your Zadarma SIP trunk will be integrated with Vapi.ai, allowing your AI voice assistants to manage calls effectively.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: SIP
title: SIP Introduction
subtitle: You can make SIP calls to Vapi Assistants.
slug: advanced/calls/sip
slug: advanced/sip
---

<Steps>
Expand Down
Loading
Loading