@@ -4,25 +4,21 @@ subtitle: You can make SIP calls to Vapi Assistants.
4
4
slug : advanced/calls/sip
5
5
---
6
6
7
- <Accordion title = " 1. Create an Assistant." >
8
-
9
- ## 1. Create an Assistant
7
+ <Steps >
8
+ <Step title = " Create an Assistant" >
10
9
11
10
We'll create an assistant with ` POST /assistant ` endpoint. This is no different than creating an assistant for other transports.
12
11
13
12
``` json
14
13
{
15
14
"name" : " My SIP Assistant" ,
16
- "firstMessage" : " Hello {{first_name}}, you've reached me over SIP. How can I help you today? "
15
+ "firstMessage" : " Hello {{first_name}}, you've reached me over SIP."
17
16
}
18
17
19
18
```
19
+ </Step >
20
20
21
- </Accordion >
22
-
23
- <Accordion title = " 2. Create a SIP Phone Number." >
24
-
25
- ## 2. Create A SIP Phone Number
21
+ <Step title = " Create a SIP Phone Number" >
26
22
27
23
We'll create a SIP phone number with ` POST /phone-number ` endpoint.
28
24
@@ -37,37 +33,33 @@ We'll create a SIP phone number with `POST /phone-number` endpoint.
37
33
38
34
` sipUri ` is the SIP URI of the phone number. It must be in the format ` sip:username@sip.vapi.ai ` . You are free to choose any username you like.
39
35
40
- </Accordion >
41
-
36
+ </Step >
42
37
43
38
44
- <Accordion title = " 3. Start a SIP call." >
45
39
46
- ## 3. Start a SIP call.
40
+ < Step title = " Start a SIP call" >
47
41
48
42
You can use any SIP softphone to test the Assistant. Examples include [ Zoiper] ( https://www.zoiper.com/ ) or [ Linphone] ( https://www.linphone.org/ ) .
49
43
50
44
You just need to dial ` sip:your_unique_user_name@sip.vapi.ai ` and the Assistant will answer your call.
51
45
52
46
There is no authentication or SIP registration required.
53
47
54
- </Accordion >
48
+ </Step >
55
49
56
- <Accordion title = " 4. Send SIP Headers to Fill Template Variables. " >
50
+ <Step title = " Send SIP Headers to Fill Template Variables" >
57
51
58
- ## 4. Send SIP Headers to Fill Template Variables.
59
52
60
53
To fill your template variables, you can send custom SIP headers.
61
54
62
55
For example, to fill the ` first_name ` variable, you can send a SIP header ` x-first_name: John ` .
63
56
64
57
The header name is case insensitive. So, ` X-First_Name ` , ` x-first_name ` , and ` X-FIRST_NAME ` are all the same.
65
58
66
- </Accordion >
59
+ </Step >
67
60
68
- <Accordion title = " 5. Use a Custom Assistant For Each Call. " >
61
+ <Step title = " Use a Custom Assistant For Each Call" >
69
62
70
- ## 5. Use a Custom Assistant For Each Call.
71
63
72
64
You can use a custom assistant for SIP calls same as phone calls.
73
65
@@ -83,5 +75,6 @@ Set the `assistantId` to `null` and the `serverUrl` to the URL of your server wh
83
75
84
76
Now, every time you make a call to this phone number, the server will receive a ` assistant-request ` event.
85
77
86
- </Accordion >
78
+ </Step >
87
79
80
+ </Steps >
0 commit comments