Asterisk is working but there is no sound

I have successfully installed and configured asterisk but I haven’t been hearing anything yet with the softphones. I have installed ekiga as softphones on some PCs and I have zoiper running on my android tablet. Zoiper works and I am sure of it since there seems to be no problems with the mic and speakers. I created the sip.conf file as followed

context default
bindport = 5060
bindaddr =
tcpbindaddr =
tcpenable = yes

type = friend
callerid = Brad <1001>
secret = ****
disallow = all
allow =ilbc
host = dynamic
careinvite = no
dtmfmode = rfc2833
mailbox = 1001@default
allow = alaw
allow = ulaw
nat = yes
qualify = yes

type = friend
callerid = Josh <1002>
secret = ****
disallow = all
allow = ilbc
host = dynamic
careinvite = no
dtmfmode = rfc2833
mailbox = 1002@default
qualify = yes

This is the sip.conf file and here is the extensions.conf file


exten => 1001,1,Answer()
exten => 1001,n,Dial(SIP/1001,20,t)
exten => 1001,n,Hangup()

exten => 1002,1,Answer()
exten => 1002,n,Dial(SIP/1002,20,t)
exten => 1002,n,Hangup()

exten => 1,1,Answer()
exten => 1,n,Playback(demo-echotest)
exten => 1,n,Echo()
exten => 1,n,Playback(demo-echodone)
exten => 1,n,Hangup()

As you can see I have setup an echo test extension to see if I can hear anything but I am not hearing anything over the lines. I have it running on a Dell Dimension 3000 and the soundcard has some ageing as far as drivers go (I have had some problems getting the sound card working but I didn’t think that that was a problem as far as asterisk has gone) It is running debian squeeze and has been updated with the latest software patches and updates from the squeeze repositories that are automatically added when you add them with synaptic. I have yet to figure out the problem as to why there isn’t any sound through the devices. When I tested it on ekiga I found that ekiga needed some sound devices to be configured for it to work properly I finally got ekiga to ring but I still couldn’t hear anything when I did the echo test. I know for sure that it wasn’t an ekiga problem since it has worked before and I tried using zoiper on my android tablet and I get the same thing. I can call the softphones with ringtones and everything but I just can’t hear anything from the server or the person on the other phone. What is the problem here, Do I need to install another piece of software in order for the audo to work?

No audio is usually a firewall or NAT problem. The SDP from the SIP dialogue often gives a clue.

The only other possibility is that you have negotiated a codec for which you have format modules but no codec module. That should show up in the logs.

Have you tried using sample configuration files.

I have just fixed it, I have looked through how the SIP protocol and the RTP protocol work and they don’t seem like the best choice when going over NAT. SIP wasn’t originally intended to run in a WAN environment, just the LAN. I have decided to make the devices use the IAX2 protocol and it started working. My main concern is that not all IP Phones use IAX2 protocol such as those professional office CISCO phones that will use SIP but I guess I shouldn’t expect to use them outside the LAN, Thats what the receptionist is for.