Asterisk + WebRTC: No audio on any direction

General discussions about Asterisk.

Moderators: Moderator, Support

Asterisk + WebRTC: No audio on any direction

Postby powerponch » Wed Sep 02, 2015 7:08 am

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 (https://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=stun.l.google.com:19302;

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
powerponch
Newsterisk
 
Posts: 4
Joined: Wed Sep 02, 2015 6:47 am

Re: Asterisk + WebRTC: No audio on any direction

Postby mohammadghazaev » Fri Oct 16, 2015 1:51 pm

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
mohammadghazaev
Newsterisk
 
Posts: 2
Joined: Mon Oct 05, 2015 10:35 am

Re: Asterisk + WebRTC: No audio on any direction

Postby david55 » Sat Oct 17, 2015 2:32 pm

nat=yes is deprecated. You should really work out which of the hacks that it used to apply you need, if any.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am


Return to Asterisk General

Who is online

Users browsing this forum: No registered users and 1 guest