- npm install
- npm start
- open this url in a WebRTC compatible browser: https://localhost:8443/
To learn more about this work visit our post blog: Kurento and Asterisk: a powerful couple
original source code is at (https://github.com/Sfinx/k2s)
git clone https://github.com/chealwoo/kurento-asterisk.git
OS: Ubuntu 16
Requires g++ to run npm install
sudo apt-get install g++
*** Ubuntu Tip
https://tecadmin.net/install-latest-nodejs-npm-on-ubuntu/
$ sudo apt-get install python-software-properties
$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
$ sudo apt-get install nodejs
upgrade nodejs (http://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-version)
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node
To upgrade to latest version (and not current stable) version, you can use
sudo n latest
To undo:
sudo apt-get install --reinstall nodejs-legacy # fix /usr/bin/node
sudo n rm 6.0.0 # replace number with version of Node that was installed
sudo npm uninstall -g n
Based on document https://webrtc.ventures/2017/02/kurento-asterisk-powerful-couple/
$ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-14-current.tar.gz
$ tar zxfv asterisk-14-current.tar.gz
$ sudo apt-get install build-essential wget libssl-dev libncurses5-dev libnewt-dev libxml2-dev linux-headers-$(uname -r) libsqlite3-dev libjansson-dev uuid-dev
Note the document has error; remove get at the end. (uuid-dev not uuid-devget)
Note
- After 13 version is necessary to install pjproject to add ICE support to Asterisk. You could add a note about this. A comment int the following document says Asterisk needs pjproject to support ICE, without it an error prevents sipml5 receives media from Asterisk. https://wiki.asterisk.org/wiki/display/AST/Interactive+Connectivity+Establishment+(ICE)+in+Asterisk
$ ./configure --with-pjproject-bundled
Follow the instructions to install pjproject at https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+pjproject
pjsip home page http://www.pjsip.org/
Without pjproject, Asterisk has the following errors Called with a SDP without ice-ufrag and ice-pwd (http://forums.asterisk.org/viewtopic.php?f=1&t=90178) [WEBRTC]Asterisk12:Called with SDP without ice-ufrag ice-pwd (http://forums.asterisk.org/viewtopic.php?f=1&t=91686) Called with a SDP without ice-ufrag and ice-pwd (https://community.asterisk.org/t/called-with-a-sdp-without-ice-ufrag-and-ice-pwd/46021) SetRemoteDescription failed: Called with an SDP without ice-
requires
sudo apt-get install xmlstarlet
Try: https://pbxinaflash.com/community/threads/opus-codec-installation.20121/
- Result: once this is done, run ./configure and make menuselect > opus option is enabled now. Found the codec is below including previous step.
wget http://downloads.digium.com/pub/telephony/codec_opus/asterisk-14.0/x86-64/codec_opus-14.0_current-x86_64.tar.gz
README (http://downloads.digium.com/pub/telephony/codec_opus/asterisk-14.0/x86-64/README)
Other links opus codec (https://community.asterisk.org/t/asterisk14-opus-transcoding/68601/5) https://wiki.asterisk.org/wiki/display/AST/Codec+Opus
$ sudo apt-get install build-essential libncurses5-dev libxml2-dev libsqlite3-dev libssl-dev libsrtp0-dev uuid-dev
$ sudo apt-get install xmlstarlet
$ wget http://downloads.xiph.org/releases/opus/opus-1.1.3.tar.gz
$ tar xvzf opus-1.1.3.tar.gz
$ cd opus-1.1.3/
$ ./configure
$ make
$ sudo make install
$ ldconfig
$ /sbin/ldconfig -v | grep opus
- You should get something like libopus.so.0 -> libopus.so.0.5.3
$ cd ~/asteriak-14.3.0
$ cd asterisk/contrib/scripts
$ sudo ./install_prereq install
$ sudo ./install_prereq install-unpackaged
$ cd ~/asteriak-14.3.0
$ ./configure --with-pjproject-bundled
$ make menuselect
$ make
$ sudo make install
$ sudo make samples
Reference Pages
- WebRTC tutorial using SIPML5 (https://wiki.asterisk.org/wiki/display/AST/WebRTC+tutorial+using+SIPML5)
SIPML5 connection to Asterisk 13 over wss (http://serverfault.com/questions/748428/sipml5-connection-to-asterisk-13-over-wss)
mkdir /etc/asterisk/keys
openssl req -new -x509 -days 365 -nodes -out /etc/asterisk/keys/foo.pem -keyout /etc/asterisk/keys/foo.pem
cd ~/asterisk-14.3.0/contrib/scripts
./ast_tls_cert -C pbx.mycompany.com -O "My Super Company" -d /etc/asterisk/keys
./ast_tls_cert -m client -c /etc/asterisk/keys/ca.crt -k /etc/asterisk/keys/ca.key -C phone1.mycompany.com -O "My Super Company" -d /etc/asterisk/keys -o malcolm
stun.l.google.com:19302 stun1.l.google.com:19302 stun2.l.google.com:19302
sip set debug on rtp set debug on http show status
http://www.asteriskguru.com/tutorials/cli_cmd_14.html
Chrome Press CTRL+SHIFT+J -- show log
Links
Troubleshooting WebRTC Issues http://forums.asterisk.org/viewtopic.php?p=199275
Need in future Secure Calling Tutorial (https://wiki.asterisk.org/wiki/display/AST/Secure+Calling+Tutorial)
I have not tried this Webrtc calling using sipml5 and Asterisk (http://techvoiper.blogspot.com/2016/01/webrtc-calling-using-sipml5-and-asterisk.html) (http://sipjs.com/guides/server-configuration/asterisk/)