Unable to hear audio from Asterisk server

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Unable to hear audio from Asterisk server

Postby senthilganesh » Tue Dec 15, 2015 5:28 am

I am running an Asterisk server in Public IP. SIP registration is working fine. When I connect SIP softphones to the server, I am able to make call and conversation is possible between the softphones. However, anything that is played on the asterisk server is not heard in the softphone. In asterisk server log, I could see the message like " Playing 'hello-world.gsm' " but I could not hear any message.

Ports open for sending and receiving UDP packets in the server are 5060, 10000 to 20000, 4569, 5036 and 2727

When I setup the server inside the LAN, everything was working perfectly. So I suspect it could be related to some firewall configuration. Please help me.

Note : SIP softphones were running in a machine connected to internet using wifi dongle with Cone NAT
senthilganesh
Newsterisk
 
Posts: 2
Joined: Tue Dec 15, 2015 5:22 am

Re: Unable to hear audio from Asterisk server

Postby navaismo » Tue Dec 15, 2015 11:13 am

Check the SIP & the RTP debug and take a look to the IPs used to send the RTP.
navaismo
Salt of the Asterisk
 
Posts: 1610
Joined: Mon Dec 07, 2009 1:30 pm
Location: Mexico City, Mexico

Re: Unable to hear audio from Asterisk server

Postby rootmedia » Fri Dec 18, 2015 6:44 am

Make Sure you have

qualify=yes
nat=force_rport,comedia

as well make sure you have

externip=1.2.3.4 <- your Public IP ADDRESS or
extenhost=yours.fqdn.com

I know when I didn't have my externip or externhost set I would not hear audio from outside my local network
Brent HIggs
CEO & Founder at
Image
https://root.media
rootmedia
Newsterisk
 
Posts: 9
Joined: Thu Dec 17, 2015 12:57 am
Location: Vancouver, BC

Re: Unable to hear audio from Asterisk server

Postby david55 » Sat Dec 19, 2015 4:13 am

rootmedia wrote:Make Sure you have

qualify=yes
nat=force_rport,comedia



I would say try, rather than definitely use. There is a tendency for these particular settings, particularly nat, to become cook book settings, rather than rational choices. nat= is mainly intended for the unusual case where Asterisk is outside NAT and the terminal is inside.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: Unable to hear audio from Asterisk server

Postby senthilganesh » Sun Dec 20, 2015 11:29 pm

I am still unable to here audio. Now I am trying to connect using sipml5 for sip account 6003. Registration is happening, call is getting established, but unable to here audio from server. Please help

My sip.conf file


Code: Select all
[general]
udpbindaddr=my_external_ip_goes_here:5060
bindaddr=my_external_ip_goes_here
realm=my_external_ip_goes_here
transport=udp,ws
externaddr=my_external_ip_goes_here
localnet=my_external_ip_goes_here
qualify=yes
nat=force_rport,comedia
externip=my_external_ip_goes_here

[6001]
type=friend
context=from-internal
host=dynamic
secret=my_password_goes_here
disallow=all
allow=ulaw

[6002]
type=friend
context=from-internal
host=dynamic
secret=my_password_goes_here
disallow=all
allow=ulaw

[6003]
host=dynamic
nat=yes
secret=my_password_goes here
context=from-internal
type=friend
encryption=yes
avpf=yes
force_avp=yes
icesupport=yes
transport=ws,udp
directmedia=no
disallow=all
allow=ulaw
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/keys/asterisk.pem
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass



My extensions.conf
Code: Select all
[others]
[from-internal]
exten => 9999,1,Answer()
same => n,Wait(1)
same => n,Playback(hello-world)
same => n,Hangup()

exten => 8888,1,Answer()
exten => 8888,n,Wait(5)
exten => 8888,n,ConfBridge(8888)

exten => 6001,1,Dial(SIP/6001,10)
exten => 6001,n,Voicemail(6001,u)

exten => 6002,1,Dial(SIP/6002)
exten => 6002,2,Voicemail(6002,u)

exten => 6003,1,Dial(SIP/6003)
exten => 6003,2,Voicemail(6003,u)

exten => 5000,1,VoicemailMain({CALLERID(num)},s)
senthilganesh
Newsterisk
 
Posts: 2
Joined: Tue Dec 15, 2015 5:22 am

Re: Unable to hear audio from Asterisk server

Postby rootmedia » Mon Dec 21, 2015 8:27 am

First off are you or are you not NAT?

if your Asterisk system is behind a firewall and on a local network with a address base of 192.168.*.*

in my General Section of SIP.CONF I have the follow
bindport=5060 <- JUST THE PORT
bindaddr=0.0.0.0 <- Binds to all interfaces and addresses on system my eth0=192.168.78.3 <- Static
externip=69.50.163.136 <- Real world IP ADDRESS Public IP of Router!
externrefresh=15
localnet=192.168.78.0/255.255.255.0 <- Privet Network 192.168.78.0/24

I have devices that connect from my local network as well from outside my network

Now if the extensions are inside your network you should be able to have them register to the IP address of the asterisk system

If your extensions are accessing your asterisk system from outside your local privet network then you may need to add Qualify=YES for the extensions as well nat=force_rport,comedia
Brent HIggs
CEO & Founder at
Image
https://root.media
rootmedia
Newsterisk
 
Posts: 9
Joined: Thu Dec 17, 2015 12:57 am
Location: Vancouver, BC

Re: Unable to hear audio from Asterisk server

Postby navaismo » Mon Dec 21, 2015 1:46 pm

Trying to troubleshoot simple sip by using a webrtc setup will be a chaos. WebRTC use ICE and if your server is not prepared to use ICE or your client can't use the correct IP address because it chooses the wrong interface will mess all.

Get back to the normal sip devices and enable sip debug and rtp debug to see what is exaclty happenning in your server.
navaismo
Salt of the Asterisk
 
Posts: 1610
Joined: Mon Dec 07, 2009 1:30 pm
Location: Mexico City, Mexico


Return to Asterisk Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest