Bad Audio using SIP

I have just installed Asterisknow in a test environment. I am using pure SIP, no interface cards at all. SIP trunking provided by a SIP extension off my PBX. When I call the SIP station, from the PBX, the audio is not there if the call routes to VM or conference bridge. If the call routes so a SIP station within the Asterisk server the audio is fine. Similarly if I call VM or the conference bridge from the Asterisk SIP station the audio is bad.

Any help is appreciated

What codecs are in use? If the phones are using g729, and you do not have a license for it in asterisk, there will be no audio when it needs to transcode sound files. Try changing everything to ulaw, and see if that fixes your issue.

You should also make sure that you have a good full duplex fast ethernet switch between your two SIP endpoints, and you’re not using wi-fi to reach the Asterisk box.

Full duplex switches (never hubs or wi-fi!) are best for good SIP communications.

I am on the same LAN that is supporting other VOIP services so I know it is not a bandwidth issue. How do I check what codecs are installed? I would like to use 729 or 711.
I am very new to this.

If all of the phones are on the same lan, I’d suggest you use ulaw (g711). In sip.conf you’d specify them for the peers like this.

disallow=all
allow=ulaw
allow=g729 ; Only enable if you are only doing pass through, or have purchased licenses

would that go in the “General” section?

I think if it is in the general section it applies to all peers. Or you can specify it in each peer section.