[SOLVED]No Sound over Web-sockets

Hi everyone,
I’m currently trying to make a call between 2 users that are connected over web-sockets, I’m able to connect to the accounts from sipml5 and the call seems to connect ok but there’s no audio, I even tried an extension that just played back “hello world” and while the server says it’s playing I can’t hear anything. I’m pretty new to asterisk so it’s fairly likely I’ve just missed something necessary in my configuration so any advise on how to fix this would be greatly appreciated. Here are my configs:

sip.conf:

[code][general]
udpbindaddr=0.0.0.0:5060
tcpenable=0
realm=serverIPAddress
transport=udp,ws,wss
;codecs
disallow=all
allow=ulaw
allow=alaw
allow=gsm

webRTCcnct
type=friend
context=from-internal
host=dynamic
icesupport=yes
secret=1234
encryption=yes
directmedia=no
dtmfmode=auto
nat=force_rport
avpf=yes

1060
defaultuser=1060
dial=SIP/1060

1061
defaultuser=1061
dial=SIP/1061
[/code]

Extensions.conf

[code][globals]
FIRST=SIP/1060
SECOND=SIP/1061

[from-internal]
exten => 1060,1,Dial(${FIRST},20)

exten => 1061,1,Dial(${SECOND},20)

exten => 200,1,Answer()
same => n,Playback(hello-world)
same => n,Hangup()
[/code]

http.conf:

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

edit: I’m using asterisk 12 by the way

Hard to tell you since you are masquerading the IPs in the pastebin, but you may want to check few things:

  1. If you are in the local lan to lan check in the SDP that asterisk and the sipml5 client set the IPs to LOCAL IPS and make sure the rtp debug show those IPs.

  2. Check in the RTP debug that the VIA ICE is showed otherwise install uuid, uuid-devel, libuuid, libuuid-devel

  3. If the IPS in the SDP are wrong check the ICE settings in the sipml5 api.

I’m not local to the server, it’s on an amazon ec2 cloud server if that makes any difference. I checked RTP debug as well and it didn’t seem to say VIA ICE anywhere but when I tried to install the packages it said I already had them installed, here’s the out put when I try and make a call between the 2 users with RTP debug on:

[quote]== Using SIP RTP CoS mark 5
– Executing [1060@from-internal:1] Dial(“SIP/1061-00000003”, “SIP/1060,20”) in new stack
== Using SIP RTP CoS mark 5
[Jan 17 05:55:40] ERROR[1426][C-00000002]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo(“df7jal23ls0d.invalid”, “(null)”, …): Name or service not known
[Jan 17 05:55:40] WARNING[1426][C-00000002]: chan_sip.c:16123 __set_address_from_contact: Invalid host name in Contact: (can’t resolve in DNS) : ‘df7jal23ls0d.invalid’
[Jan 17 05:55:40] ERROR[1426][C-00000002]: netsock2.c:98 ast_sockaddr_stringify_fmt: getnameinfo(): ai_family not supported
– Called SIP/1060
– SIP/1060-00000004 is ringing
– SIP/1060-00000004 answered SIP/1061-00000003
– Channel SIP/1061-00000003 joined ‘simple_bridge’ basic-bridge <7339c35e-4aad-4ac7-a937-cfaed0c1af2c>
– Channel SIP/1060-00000004 joined ‘simple_bridge’ basic-bridge <7339c35e-4aad-4ac7-a937-cfaed0c1af2c>
[/quote]

Something I also noticed is that when I call the “hello world” playback function the RTP packest are sent to a different port than the one it registers from, I’m not sure if this matters or not but I though it might be worth noting

You need to provide the complete logs from:

  1. SIPML5 from Chrome
  2. SIP DEBUG from Asterisk
  3. RTP DEBUG from Asterisk.

Do not masquerade IPs since that is important. I saw the “from-internal” context so my next Question is: Do you use Elastix or FreePBX?

Its important to be sure that ICE is really supported by asterisk because without that it never will work.

Got it sorted, turns out Asterisk hadn’t seen the pjproject installation correctly (should have paid more attention to the second half of this :stuck_out_tongue:). Thanks for your help anyway navaismo it was greatly appreciated :smile: