[root@opuscodec asterisk]# ldd /usr/sbin/asterisk | egrep ‘ssl|srtp’
libasteriskssl.so.1 => /usr/lib/libasteriskssl.so.1 (0x002c2000)
libssl.so.10 => /usr/lib/libssl.so.10 (0x00608000)
[root@opuscodec asterisk]# ls -l /usr/lib/asterisk/modules/res_srtp.so
-rwxr-xr-x. 1 root root 211832 May 14 21:48 /usr/lib/asterisk/modules/res_srtp.so
./ast_tls_cert -C “192.168.1.105” -O “opuscodec” -d /etc/asterisk/keys
sip.conf
[general]
context=public
allowoverlap=no
domainsasrealm=yes
udpbindaddr=0.0.0.0:5060
tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0
srvlookup=yes
maxcallbitrate=384
domain=192.168.1.105
allowexternaldomains=yes
realm=192.168.1.105
udpbindaddr=192.168.1.105
[authentication]
[1007] ; This will be WebRTC client
type=friend
defaultuser=1007
host=dynamic ; Allows any host to register
secret=1007; The SIP Password for SIP.js
avpf=yes ; Tell Asterisk to use AVPF for this peer
icesupport=yes ; Tell Asterisk to use ICE for this peer
context=from-agents ; Tell Asterisk which context to use when this peer is dialing
directmedia=no ; Asterisk will relay media for this peer
transport=udp,ws ; Asterisk will allow this peer to register on UDP or WebSockets
force_avp=yes ; Force Asterisk to use avp. Introduced in Asterisk 11.11
videosupport=yes
encryption=yes
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/keys/asterisk.pem
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass
disallow=all
allow=opus
srtpcapable=yes ; optional aja
[1006] ; This will be WebRTC client
type=friend
defaultuser=1006
host=dynamic ; Allows any host to register
secret=1006; The SIP Password for SIP.js
avpf=yes ; Tell Asterisk to use AVPF for this peer
icesupport=yes ; Tell Asterisk to use ICE for this peer
context=from-agents ; Tell Asterisk which context to use when this peer is dialing
directmedia=no ; Asterisk will relay media for this peer
transport=udp,ws ; Asterisk will allow this peer to register on UDP or WebSockets
force_avp=yes ; Force Asterisk to use avp. Introduced in Asterisk 11.11
videosupport=yes
encryption=yes
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/keys/asterisk.pem
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass
disallow=all
allow=opus
srtpcapable=yes ; optional aja
extensions.conf
[general]
static = yes
writeprotect = no
autofallthrough = yes
clearglobalvars = no
[globals]
[from-agents]
exten => _X.,1,Set(_SIP_SRTP_SDES=1)
exten => _X.,n,Set(_SIPSRTP=1)
exten => _X.,n,Set(_SIPSRTP_CRYPTO=enable)
exten => _X.,n,Dial(SIP/${EXTEN},,tT)
exten => _X.,n,Hangup()
manager.conf
[general]
enabled = no
webenabled = yes
port = 5038
bindaddr = 0.0.0.0
http.conf ( for websocket) –> test via wscat
[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
Leave a comment