text stringlengths 0 152 |
|---|
We’ll need a small change to the configuration of Asterisk’s HTTP server to allow it to |
serve static content. |
$ sudo vim /etc/asterisk/http.conf |
[general] |
enabled=yes |
bindaddr=0.0.0.0 |
bindport=8088 |
tlsenable=yes |
tlsbindaddr=0.0.0.0:8089 |
tlscertfile=/home/asterisk/certs/asterisk.crt |
tlsprivatekey=/home/asterisk/certs/asterisk.key |
enablestatic=yes |
redirect=/cmp2k /static/cyber_mega_phone_2k/index.html |
Save and reload the http module from your Asterisk console: |
*CLI> module reload http |
Now, using your browser, you can navigate over to your new WebRTC client app: |
https://your asterisk server:8089/cmp2k |
If all went as planned, you should see something like Figure 20-1. |
Figure 20-1. Cyber Mega Phone 2K |
Press the Account button, and input the credentials for your WebRTC user (see |
Figure 20-2). |
Figure 20-2. WebRTC account credentials |
Once you’ve input the details relevant to your system, press X to save and close. |
Now, you can press the Connect button, and if all went well your WebRTC client |
should register to Asterisk (this would be a good time to monitor the Asterisk console |
to see what’s happening and whether there are any errors). |
348 |
| |
Chapter 20: WebRTC |
If you press the Call button now, you should end up connected via WebRTC, and |
you’ll see two windows (Figure 20-3). One of them is your local video, and the other |
is reflected back from the far end (i.e., it is simulating another user by echoing back |
what you sent). If all your audio is working too, you might even get some feedback |
noise! |
Figure 20-3. Echo application with video |
You see that there is a Remote Video window alongside the Local Video window. We |
haven’t achieved much to brag about, perhaps, but your Asterisk system is handling |
WebRTC, so smile and take a break. You’ve earned it. |
More About WebRTC |
The WebRTC ecosystem is rapidly evolving, and what is true as of this writing may |
not be true in the near future. We have found the following resources to be very |
helpful: |
• Tsahi Levant-Levi is involved in many different WebRTC initiatives, and he gen‐ |
erously shares knowledge relating to how to learn WebRTC. Check out his blog‐ |
geek.me website. Follow him. |
• A group of folks under the Kranky Geek handle produced some WebRTC confer‐ |
ences, and shared many useful videos on YouTube. The YouTube channel Kranky |
Geek is where you’ll find them. |
• Get familiar with the various signaling protocols that are popular with WebRTC: |
SIP, VIRTO (from the FreeSwitch project), XMPP, and even JSON. |
• Look up various WebRTC signaling libraries. Currently, the popular ones |
include: sipML5 (arguably the very first WebRTC library) and JsSIP (plus a fork |
of JsSIP named SIP.js). |
More About WebRTC |
| |
349 |
• webrtc.org is the official home of WebRTC, and certainly deserves some of your |
time. Check out the Getting Started page. |
• O’Reilly’s online learning platform has a few videos that are worth a watch. For |
any books and videos, keep an eye on the publish date, since anything older than |
a year or two is likely to be out of date—WebRTC is still under rapid develop‐ |
ment. |
There is so much more to learn, but we’re out of pages here. |
Conclusion |
WebRTC is exciting and important, and it’s very likely that VoIP developers and inte‐ |
grators are going to need to be familiar with this technology if they are to keep their |
skill sets relevant. As of this writing, WebRTC is still very much a work in progress. |
As with any exploration of new frontiers, those who blaze a trail must be creative, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.