Asterisk + WebRTC: No audio on any direction

Hello everyone. I’d appreciate a lot your help with this issue. I’m running a very basic script of JS for subscribing my jsSIP User Agent to my local Asterisk server and making a voice call. I don’t get any warnings or errors from the Asterisk CLI, but when I make a call to a legacy SIP phone or SIP trunk well configured, there is no audio on any side although there is ringing, calls can be answered and they never drop.

The IP address of the SIP messages is correct both in the header of the message and in the RTP description, and it succeeds with sending ICE candidates. My Asterisk 12 was compiled with SRTP and pjproject. I don’t get any error or warning messages on Asterisk, and I suppose that the SIP messages are ok.

I read at the Asterisk WebRTC Wiki (wiki.asterisk.org/wiki/display/ … TC+Support) this: "Starting with Asterisk 12 you need to have pjproject libraries installed, otherwise you most likely won’t have audio in your WebRTC calls and no warning whatsoever!"
I properly installed it and selected it for the Asterisk compilation, but I wonder wether I did it wrong, and how can I check it …

These are my files:

http.conf
[general]
enabled=yes;
bindaddr=0.0.0.0;
bindport=8088;
prefix=asterisk;
tlsenable=yes;
tlsbindaddr=0.0.0.0:8089;
tlscertfile=/etc/asterisk/keys/asterisk.pem;
tlsprivatekey=/etc/asterisk/keys/asterisk.pem;

rtp.conf
[general]
rtpstart=10000;
rtpend=20000;
icesupport=true;
stunaddr:19302=stun.l.google.com;

sip.conf
[general]
context=toSipTrunk
allow=ulaw
allow=alaw
allow=gsm

[1000] ;legacy softphone (zoiper)
secret=******
type=friend
host=dynamic
dtmfmode=rfc2833
disallow=all
allow=ulaw
allow=alaw
context=myContext

[1001] ;jsSIP User Agent
type=friend
username=1001
host=dynamic
secret=******
encryption=yes
avpf=yes
icesupport=yes
directmedia=no
transport=udp,ws
force_avp=yes
dtlsenable=yes
dtlsverify=no
disallow=all
allow=ilbc
allow=g729
allow=gsm
allow=g723
allow=ulaw
dtlscertfile=/etc/asterisk/keys/asterisk.pem
dtlsprivatekey=/etc/asterisk/keys/asterisk.pem
dtlssetup=actpass
context=myContext

… Thanks in advance

Hello

Somehow your clients are behind a NAT?
If yes, please add these lines to your extensions and try again:

nat=yes
qualify=yes

Best regards,
Mohammad

nat=yes is deprecated. You should really work out which of the hacks that it used to apply you need, if any.