2014-08-03

Malcolmd please if you can merge this with the another thread that would be great. Or lock the thread too as you prefer.

This is for the latest Asterisk(today: Asterisk-11.11.0) without any patches or funny configurations and for the latest SIPML5 API(today: 1.4.217) from Doubango without any patches too on a CENTOS 6.

1.- Download Asterisk:

Code:
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11.11.0.tar.gz

2.- Use the install_prereq script for install almost all dependencies:

Code:
cd ${ASTERISKSOURCE_PATH}/contrib/scripts/
http://forums.digium.com/install_prereq install

3.- Just to be sure install uuid support

Code:
yum install libuuid libuuid-devel uuid uuid-devel

4.- Run the configure script and then confirm that almost all modules are enable including the res_http_websocket, the res_rtp_multicast and res_rtp_asterisk.

Code:
cd .http://forums.digium.com/.http://forums.digium.com/
http://forums.digium.com/configure && make menuselect

5.- When finish install Asterisk:

Code:
make -j `getconf _NPROCESSORS_ONLN` && make install && make samples && make config

6.- Create the Certificates(change10.0.1.108 with your IP or your DNS):

Code:
mkdir /etc/asterisk/keys
cd ${ASTERISKSOURCE_PATH}/contrib/scripts/
http://forums.digium.com/ast_tls_cert -C 10.0.1.108 -O "My Super Company" -d /etc/asterisk/keys

7.- Configure your sip.conf and create some peers for your WebRTC I'm using these settings:

Code:
[general]

context=guest
transport=udp,ws
rtcachefriends=yes
allowguest=yes
limitonpeers=yes
callcounter=yes
allowoverlap=no                 ; Disable overlap dialing support. (Default is yes)
udpbindaddr=0.0.0.0             ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
;externhost=set_your_externhost_here
externrefresh=150
localnet=set_your_localnet_here   ;i.e. 10.0.1.0/255.255.255.0
disallow=all
;allow=g729                   ; First disallow all codecs
allow=gsm
allow=ulaw                     ; Allow codecs in order of preference
allow=alaw                     ; Allow codecs in order of preference
language=en                    ; Default language setting for all users/peers
callcounter=yes
limitonpeers=yes
callevents=yes
useragent=Digital-Merge_UA
realm=asterisk
nat=force_rport,comedia

[5005]
type=friend
secret=MySuperSecr3t4dm5005$!
host=dynamic
context=wrtc
disallow=all
allow=ulaw
allow=alaw
;allow=g729
;allow=gsm
;allow=h263p
;allow=h264
dtmf=auto
;videosupport=yes
transport=ws,udp
avpf=yes
nat=force_rport,comedia
callerid="WebRTC"<5005>
encryption=yes
qualify=yes
icesupport=yes
dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer
dtlsverify=no ; Tell Asterisk to not verify your DTLS certs
dtlscertfile=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS cert file is
dtlsprivatekey=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS private key is
dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when setting up DTLS

Every peer need the DTLS PART! This is not a global setting.

8.- Configure the http.conf as described in the asterisk wiki, i have only:

Code:
[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088

9.- Configure the rtp.conf as described in the asterisk wiki, I have only:

Code:
[general]
rtpstart=19000
rtpend=21000
icesupport=true
stunaddr=stun.l.google.com:19302

10.- Start Asterisk.

11.- Create your SuperKiller App using SIPML5 pointing to your asterisk server like ws://yourip:8080/ws, you can take a look to the code I'm using(based on the doubango Help) at: https://github.com/navaismo/Elastix-Age ... /js/ml5.js

12.- Test and enjoy! If you have a supermachine this can be done in almost 40mins YAY!

Here http://pastebin.com/hJhnniBD you can take a look on a complete SIP DEBUG for a successfull call between a SIPML5 Client and a PSTN Number including the RTP DEBUG with the "VIA ICE" text and the DTLS support.

If you are using the Doubango's WebRTC2SIP media gateway use the same certs configure as described in this topic: https://groups.google.com/forum/#!msg/d ... bMIh5rGdYJ You can use the same certs generated by asterisk. Don't enable the encryption setting in the peer.

This my last attempt to help the community about WebRTC and Asterisk. Please avoid send me private messages, tweets or emails READ carefully the firts part in this thread: viewtopic.php?f=1&t=90167

Almost all scenarios are described there, Why I know that? Because I have experienced those issues too.

I don't use JsSIP because the devs are kind annoying so if you want support for JsSIP ask them and hope they don't kick you out as me and others.

Stop complaining about the month or the week you have spent on this matter, we already have like a year or more dealing with it and your complians.

If you want ASAP response or help HIRE SOMEONE. WebRTC and Asterisk aren't for N00bs, yes you have used linux and you can make web pages but you need more than that.

If you are wondering if I provide custom installation for you, the answer is YES this is my fee for a complete setup: $2000USD paypal in front.

And again STOP send me emails, privates and tweets this is annoying.

Finally be gratefull with the people involved in this, the people in the JIRA PAGE(https://issues.asterisk.org/jira/browse/ASTERISK-22961) whom make this possible and of course the Asterisk Devs like Joshua Colp, Mamadou from Doubango, etc they are the Real MVP :'( of this.

Good Luck! And READ READ and finally READ again this forum, google and the doubango discuss group.

Atte:
Navaismo
A retired Linux-Asterisk User.
Sorry for my english

Statistics : Posted by navaismo • on Sat Aug 02, 2014 6:08 pm • Replies 0 • Views 56

Show more