Skip to content

Commit 06dbc1d

Browse files
Update README tunneling instructions
1 parent 660f294 commit 06dbc1d

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

voice-ivr/README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,13 @@ Check the developer console and terminal for any errors, and make sure you've se
5858

5959
### Exposing your local server
6060

61-
To test with a real Twilio phone number, you need to expose your local server to the internet. You can use [ngrok](ngrok_url) or the Twilio CLI's built-in tunneling:
61+
To test with a real Twilio phone number, you need to expose your local server to the internet. You can use [ngrok](ngrok_url):
6262

63-
**Option 1: Using ngrok**
6463
```bash
6564
ngrok http 3000
6665
```
6766
Copy the HTTPS URL (e.g., `https://abc123.ngrok.io`)
6867

69-
**Option 2: Using Twilio CLI**
70-
```bash
71-
twilio phone-numbers:update YOUR_TWILIO_NUMBER --voice-url="http://localhost:3000/voice-ivr"
72-
```
73-
The Twilio CLI will automatically create a tunnel for you.
74-
7568
### Configuring your Twilio phone number
7669

7770
1. Go to your [Twilio Console Phone Numbers](https://console.twilio.com/us1/develop/phone-numbers/manage/incoming)
@@ -82,6 +75,21 @@ The Twilio CLI will automatically create a tunnel for you.
8275
- Set HTTP method to **POST**
8376
4. Click **Save**
8477

78+
79+
You can also use the Twilio CLI to configure your phone number's Voice URL.
80+
81+
First, retrieve the phone number's SID (starts with `PN`):
82+
83+
```bash
84+
twilio phone-numbers:list
85+
```
86+
87+
Using the phone number SID and ngrok URL that you copied above:
88+
89+
```bash
90+
twilio phone-numbers:update YOUR_PHONE_NUMBER_SID --voice-url="https://abc123.ngrok.io"
91+
```
92+
8593
Now when you call your Twilio number, it will trigger the `/voice-ivr` function.
8694

8795
## Deploying

0 commit comments

Comments
 (0)