OK, here is one example of what’s happening on my system and how I got to the current state.
-
Created self signed Certificate Authority and self signed certificate for my PBX
-
Using chan_sip configured 2 SIP extensions 111 and 112 through FreePBX (no extra settings for them)
-
Then I enabled WebRTC phone for the new created extensions: Admin/User Management. By this step PBX already had 4 extensions: 111 and 112 and their WebRTC counterparts 99111 and 99112. FreePBX at this point did mappings (111<–>99111, and 112<—>99112) which are utilized in step 6
-
Now I had to add ‘wss’ protocol for extensions 99111 and 99112. This is done my manually editing sip_custom_post.conf and the content was like this:
[99111](+)
transport=wss,ws,udp,tcp
secret=pass99111
[99112](+)
transport=wss,ws,udp,tcp
secret=pass99112
-
Used sipML5 on 2 different PCs residing on the same LAN with PBX and one registered and acted as 99111 and the other as 99112. Web browser is Chrome
-
Made a video enabled call from 99112 by calling ‘111’. This rang web client on another PC and call is answered. In Asterisk log I see 2 errors which could shed more light but I can’t explain what they really mean except maybe inability to properly encrypt/decrypt media. Errors as as follows:
[2016-02-24 13:28:52] WARNING[19694][C-00000007] res_srtp.c: SRTP unprotect failed with: authentication failure 10
...
[2016-02-24 13:28:53] WARNING[19692][C-00000007] res_srtp.c: SRTP unprotect failed with: authentication failure 10
Anyone knows what these really mean and how to fix the issue?
Full logs of the call along with SIP messages are uploaded here.
My Asterisk configuration files look like following:
Content of sip_general_additional.conf
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate. ;
;--------------------------------------------------------------------------------;
vmexten=*97
context=from-sip-external
callerid=Unknown
notifyringing=yes
notifyhold=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
alwaysauthreject=yes
useragent=FPBX-12.0.76.2(13.7.0)
disallow=all
allow=ulaw
allow=vp8
tlsenable=yes
tlsbindaddr=192.168.1.40:12000
tlscertfile=/etc/asterisk/keys/MyRaspbxCrt.pem
tlsclientmethod=tlsv1
tcpenable=yes
tcpbindaddr=192.168.1.40:11000
transport=ws,wss,tls
tlsprivatekey=/etc/asterisk/keys/MyRaspbxCrt.key
tlscipher=ALL
rtpend=20000
rtpstart=10000
callevents=no
bindport=5060
jbenable=no
rtpholdtimeout=300
registertimeout=20
registerattempts=0
videosupport=yes
rtpkeepalive=0
rtptimeout=30
srvlookup=no
notifyringing=yes
notifyhold=yes
checkmwi=10
allowguest=yes
canreinvite=no
defaultexpiry=120
g726nonstandard=no
maxcallbitrate=384
maxexpiry=3600
minexpiry=60
nat=yes
ALLOW_SIP_ANON=no
externip=104.251.107.96
localnet=192.168.1.1/24
localnet=192.168.1.0/24
Content of sip_general_custom.conf
:
tlsenable=yes
tlsbindaddr=192.168.1.40
tlscertfile=/etc/asterisk/keys/MyRaspbxCrt.pem
tlsdontverifyserver=yes
;tlscipher=DES-CBC3-SHA
tlsclientmethod=sslv23
tlscafile=/etc/asterisk/keys/ca.crt
rtcachefriends=yes
And content of sip_additional.conf
:
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate. ;
;--------------------------------------------------------------------------------;
[111]
deny=0.0.0.0/0.0.0.0
secret=pass111
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
mediaencryption=no
sendrpid=no
type=friend
nat=force_rport,comedia
port=5060
qualify=yes
qualifyfreq=60
transport=udp,tcp,tls
avpf=no
force_avp=no
icesupport=no
encryption=no
callgroup=
pickupgroup=
dial=SIP/111
permit=0.0.0.0/0.0.0.0
callerid=zar ko - 111 <111>
callcounter=yes
faxdetect=no
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/keys/MyRaspbxCrt.pem
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass
dtlsrekey=0
[112]
deny=0.0.0.0/0.0.0.0
secret=pass112
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
mediaencryption=no
sendrpid=no
type=friend
nat=force_rport,comedia
port=5060
qualify=yes
qualifyfreq=60
transport=udp,tcp,tls
avpf=no
force_avp=no
icesupport=no
encryption=no
callgroup=
pickupgroup=
dial=SIP/112
permit=0.0.0.0/0.0.0.0
callerid=tim - 112 <112>
callcounter=yes
faxdetect=no
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/keys/MyRaspbxCrt.pem
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass
dtlsrekey=0
[99111]
deny=0.0.0.0/0.0.0.0
dtmfmode=rfc2833
canreinvite=no
host=dynamic
trustpid=yes
sendpid=no
type=friend
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=ws
avpf=yes
force_avp=yes
icesupport=yes
encryption=yes
callgroup=
pickupgroup=
permit=0.0.0.0/0.0.0.0
dial=SIP/99111
secret=6f290ad09c19441c44bb1e9e6305b43b
context=from-internal
mailbox=99111@device
callerid=zar ko - 111 <99111>
callcounter=yes
faxdetect=no
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/keys/MyRaspbxCrt.pem
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass
dtlsrekey=0
[99112]
deny=0.0.0.0/0.0.0.0
dtmfmode=rfc2833
canreinvite=no
host=dynamic
trustpid=yes
sendpid=no
type=friend
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=ws
avpf=yes
force_avp=yes
icesupport=yes
encryption=yes
callgroup=
pickupgroup=
permit=0.0.0.0/0.0.0.0
dial=SIP/99112
secret=431cad4fcda97a5e578b6be5a6a41db2
context=from-internal
mailbox=99112@device
callerid=tim - 112 <99112>
callcounter=yes
faxdetect=no
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/keys/MyRaspbxCrt.pem
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass
dtlsrekey=0
And finally sip_custom_post.conf
:
[99111](+)
transport=wss,ws,udp,tcp
secret=pass99111
[99112](+)
transport=wss,ws,udp,tcp
secret=pass99112