Skip to content

Commit 64cdaea

Browse files
author
Dragos Oancea
committed
update docs to show how WSBridge endpoint is called from the dialplan.
1 parent c578859 commit 64cdaea

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010

1111
### libwebsockets
1212

13-
[libwebsockets](https://libwebsockets.org/) 2.0
13+
[libwebsockets](https://libwebsockets.org/) 2.4
1414

1515
To install libwebsockets:
1616
```
1717
git clone [email protected]:warmcat/libwebsockets.git
1818
cd libwebsockets
19-
git checkout -v v2.0-stable remotes/origin/v2.0-stable
19+
git checkout -v v2.4-stable remotes/origin/v2.4-stable
2020
mkdir build ; cd build ; cmake .. -DCMAKE_BUILD_TYPE=DEBUG ; make ; make install ; ldconfig ;
2121
```
2222

@@ -42,8 +42,22 @@ To place an outbound WebSocket connection, the following SIP headers need to be
4242
<action application="set" data="P-wsbridge-websocket-headers={\"text\":\"hello there. how's it going?\"}"/>
4343
```
4444

45+
## Calling the WSBridge endpoint from the dialplan .
46+
47+
```
48+
<extension name="freeswitch_wsbridge">
49+
<condition field="destination_number" expression="^wsbridge$">
50+
<!-- optionally force values that otherwise would be read from the SIP headers here. this will make WSBridge only conenct to this WS URI: -->
51+
<!-- <action application="set" data="P-wsbridge-websocket-uri=ws://soundboard.nexmodev.com/" /> -->
52+
<action application="bridge" data="wsbridge"/>
53+
</condition>
54+
</extension>
55+
56+
```
57+
4558
## WebSocket Protocol
4659

60+
4761
Upon WebSocket connection establishment, **WSBridge** sends an Initial content JSON message over the socket, with the selected content-type and the optional headers, e.g.:
4862

4963
```

0 commit comments

Comments
 (0)