Skip to content

Commit ba14b1d

Browse files
Merge pull request #126 from s074/public_ip_info
add info about how to get public ip for voice webrtc
2 parents 5704570 + 99f0c03 commit ba14b1d

1 file changed

Lines changed: 19 additions & 11 deletions

File tree

docs/setup/server/voice.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ WRTC_WS_PORT=3004
3131
You also have to configure the Voice Gateway endpoint in your database. In table `config` you can set the default region endpoint to your Voice Gateway domain. It is set to `localhost:3004` by default:
3232

3333
```
34-
"regions_available_0_endpoint": "voice.example.com:3004"
34+
"regions_available_0_endpoint": "voice.example.com"
3535
```
3636

3737
### Nginx reverse proxy for Voice Gateway
@@ -73,19 +73,20 @@ You can install one of the provided sample implementations or you can choose to
7373

7474
1. First install the package in your {{ project.name }} server:
7575

76-
```
76+
```bash
7777
npm install {{ npm_packages.voice_pion }} --no-save
7878
```
7979

8080
2. Configure the package name in your {{ project.name }} server `.env`:
8181

82-
```
82+
```.env
8383
WRTC_LIBRARY={{ npm_packages.voice_pion }}
8484
```
8585

8686
3. Download the Golang SFU from [Pion Repository]({{ repositories.base_url }}/{{repositories.voice_pion }})
87+
8788
4. Make sure you have Golang installed, then start your SFU:
88-
```
89+
```bash
8990
cd pion-sfu
9091
go run . -port <udp port> -ip <your server public ip>
9192
```
@@ -95,38 +96,45 @@ The ip should be a public IP that can be accessed from the internet if this is a
9596

9697
1. First install the package in your {{ project.name }} server:
9798

98-
```
99+
```bash
99100
npm install {{ npm_packages.voice_medooze }} --no-save
100101
```
101102

102103
2. Configure the package name in your {{ project.name }} server `.env`:
103104

104-
```
105+
```.env
105106
WRTC_LIBRARY={{ npm_packages.voice_medooze }}
106107
```
107108

108109
3. Configure the public IP for your WebRTC server in your {{ project.name }} server `.env`. This should be a public IP that can be accessed from the internet if this is a production instance. It will be the address that will get sent to the client during the WebRTC connection negotiation:
109110

110-
```
111+
```.env
111112
WRTC_PUBLIC_IP=127.0.0.1
112113
```
113114

114115
### Mediasoup implementation installation
115116

116117
1. First install the package in your {{ project.name }} server:
117118

118-
```
119+
```bash
119120
npm install {{ npm_packages.voice_mediasoup }} --no-save
120121
```
121122

122123
2. Configure the package name in your {{ project.name }} server `.env`:
123124

124-
```
125+
```.env
125126
WRTC_LIBRARY={{ npm_packages.voice_mediasoup }}
126127
```
127128

128129
3. Configure the public IP for your WebRTC server in your {{ project.name }} server `.env`. This should be a public IP that can be accessed from the internet if this is a production instance. It will be the address that will get sent to the client during the WebRTC connection negotiation:
129130

130-
```
131+
```.env
131132
WRTC_PUBLIC_IP=127.0.0.1
132-
```
133+
```
134+
135+
## How to get your public ip
136+
137+
You can get your server's public ip by executing the following command in your server's command line:
138+
```bash
139+
curl https://checkip.amazonaws.com
140+
```

0 commit comments

Comments
 (0)