You also have to consider the source of the audio. For example, softphones sound terrible, while hard phones sound better.
Even in hardphones, there are degrees of “good”. For instance phones from Polycom are (in my opinion and experience) better than phones from Grandstream. Probably just a better choice of audio components by Polycom, but it makes a noticeable difference. Buy a few different phones from a few makers, and experiment.
Network quality, PSTN adapters, etc also play a part.
Transcoding also adds errors to the audio. You’re essentially “sampling a sample”. If your incoming audio codec is uLaw, keep the internal codec at uLaw as well. This will minimize losses due to codec translation.
In my opinion your biggest choice will be the adapter to the PSTN. Start off with high quality audio from the beginning, and you’re much better off.
If you’re looking for the highest possible quality, you’ll want to buy boards that have their own DSPs and processors. (Like Dialogic DIVA boards for example.) Yes, they’re expensive ($7K for a 2-T1 board is typical) but you get what you pay for.
Buying a Dialogic board is one way, but we do it differently. We use a Cisco 3725 (used about $650) and an HDV card (used about $1200) to terminate our PRIs. This also gets the PRI off the asterisk server which lowers its CPU utilization. We had several PRIs at one point (down to 2) but use SIP connectivity through Verizon - great quality product.
I may use some of your solutions but the real issue we are experimenting is the fact that our customers, when using Skype with the same hardware got better quality sound.
We are using ulaw on every softphone for sound (like I told before, we tried all of them), and h261 for video.
The softphone is ekiga (we have tried quite a lot too) and almost all the pc are running Debian etch.
you might be suprised at the sound quality of a grandsteam ata like the gs286.
However i agree with everyone. I have ekiga on my machine however i will talk on my polycom all day… its much better than any other phone.