# Voice quality

**URL:** <https://community.asterisk.org/t/voice-quality/10387>\
**Category:** Asterisk Support\
**Created:** [November 10, 2006, 10:12am UTC](https://community.asterisk.org/t/voice-quality/10387 "2006-11-10T10:12:34Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![LG1](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@LG1](https://community.asterisk.org/u/LG1)\
**Post date:** [November 10, 2006, 10:12am UTC](https://community.asterisk.org/t/voice-quality/10387/1 "2006-11-10T10:12:34Z")

</div>

Hi,

I have problems with voicecalls quality on Asterisk, if i have only 2-3 simultaneous calls is ok, when the number increase the quality decrease a lot.  
My setup:

Asterisk 1.2.13  
Linux Gentoo up to date

The server is Dell 2850 PowerEdge, CPU Xeon 3,2 dual core, 2 Gb DDR2, UltraSCSI320 HDD. The CPU is on 5-10 % with asterisk when I have ~10 calls. I also don’t have problems with internet bandwidth.

The outgoing providers that I use are Voipgate (~50ms constant) and Nikotel.

Mention: I don’t have Digium card, I only use VoIP.

Any ideas?

Thanks

---

<div class="post-metadata">

**Author:** ![baconbuttie](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/baconbuttie/32/916_2.png) [@baconbuttie](https://community.asterisk.org/u/baconbuttie)\
**Post date:** [November 10, 2006, 1:18pm UTC](https://community.asterisk.org/t/voice-quality/10387/2 "2006-11-10T13:18:47Z")

</div>

> [@LG](#):
>
> I also don’t have problems with internet bandwidth.

so how much bandwidth do you have, what codec are you using, and do you have any QoS in place ?

---

<div class="post-metadata">

**Author:** ![LG1](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@LG1](https://community.asterisk.org/u/LG1)\
**Post date:** [November 10, 2006, 1:52pm UTC](https://community.asterisk.org/t/voice-quality/10387/3 "2006-11-10T13:52:46Z")

</div>

I have 7Mb/s internet bandwidth.

IAX conf:  
[general]  
bindport=4569  
bindaddr=0.0.0.0  
iaxcompat=yes  
delayreject=yes  
authdebug=yes  
notransfer=yes  
disallow=all  
allow=ilbc  
allow=g729  
allow=gsm  
allow=alaw  
allow=ulaw  
jitterbuffer=no  
forcejitterbuffer=no

SIP conf:  
srvlookup=yes  
maxexpiry=3600  
recordhistory=yes  
disallow=all  
allow=ilbc  
allow=ulaw  
allow=alaw  
qualify=400  
allow=gsm  
musicclass=default  
language=en  
relaxdtmf=yes  
dtmfmode=rfc2833  
nat=no

also the outbound provider is registerng and the codecs that he uses:

type=friend  
disallow=all  
allow=ilbc  
allow=g729  
allow=gsm  
allow=alaw  
allow=ulaw

And yes, I have QoS implemented at switch and router level.

Do you think a Digium card could help even if i’m not using PSTN?

Thanks

---

<div class="post-metadata">

**Author:** ![rrashid](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@rrashid](https://community.asterisk.org/u/rrashid)\
**Post date:** [November 10, 2006, 2:09pm UTC](https://community.asterisk.org/t/voice-quality/10387/4 "2006-11-10T14:09:37Z")

</div>

Is it 7mb open pipe (which I doubt) ? If not what is your upload speed ? And what are you using for QםS ?

---

<div class="post-metadata">

**Author:** ![LG1](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@LG1](https://community.asterisk.org/u/LG1)\
**Post date:** [November 10, 2006, 2:28pm UTC](https://community.asterisk.org/t/voice-quality/10387/5 "2006-11-10T14:28:20Z")

</div>

The pipe is 7 Mb/s guarantee, upload /download. If I have only 10 users in the network on calls (no other traffic) The graphs show ~20% usage.  
So the bandwidth is not a problem.  
QoS is implemented at switches (Cisco Catalyst 2950) the NIC’s are in 100Mb full duplex. The router is Juniper SSG520 with NetScreen OS 5.4.  
I also had an Cisco 2621XM router with Voip traffic prioritised (no difference).  
If I ping asterisk from any of the stations: 1ms constant  
Do you use jitterbuffer?

Thanks

---

<div class="post-metadata">

**Author:** ![rrashid](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@rrashid](https://community.asterisk.org/u/rrashid)\
**Post date:** [November 12, 2006, 10:40am UTC](https://community.asterisk.org/t/voice-quality/10387/6 "2006-11-12T10:40:19Z")

</div>

No I have never implemented jitter buffer (dont use iax much and didnt try 1.4 yet). At this point I dont know what to say. I have never used cisco QoS before so I cant think of what can be the issue. I would try multiple VOIP providers as tests to see if anything changes (get a teliax, voipjet and some other accounts). If you have issues with no matter whom you go with I would say it may be an internet issue. Is it possible to hook up a cheap router to the DSL line or do you need the cisco ? I would test with an SMC router and see what happens.

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [November 12, 2006, 12:18pm UTC](https://community.asterisk.org/t/voice-quality/10387/7 "2006-11-12T12:18:04Z")

</div>

Ok

First things first. Do you have ztdummy setup ?

Second thing is why are you using ilbc, as I thing this is the root f your problem. If you do a show translations you will see that ilbc takes the longest to translate, an is processor intensive. Why may explain the 5-10% CPU which to be honest is WAY too high.

Do you have lots of AGI’s running?

To test swap the codecs so its using alaw or ulaw depending on your country, and then see how that goes, Also do a ps -ef with 10 calls on to see whats rrunning

Ian

---

<div class="post-metadata">

**Author:** ![808blogger](https://avatars.discourse-cdn.com/v4/letter/8/b5e925/32.png) [@808blogger](https://community.asterisk.org/u/808blogger)\
**Post date:** [November 17, 2006, 3:56am UTC](https://community.asterisk.org/t/voice-quality/10387/8 "2006-11-17T03:56:33Z")

</div>

Unless you have a reason to… and your network is clean and all switched and you have 7megs of internet, i would run ulaw the entire way…

disallow=all  
allow=ulaw

and thats it…

[quote=“ianplain”]Ok

First things first. Do you have ztdummy setup ?

Second thing is why are you using ilbc, as I thing this is the root f your problem. If you do a show translations you will see that ilbc takes the longest to translate, an is processor intensive. Why may explain the 5-10% CPU which to be honest is WAY too high.  
[/quote]

---

<div class="post-metadata">

**Author:** ![LG1](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@LG1](https://community.asterisk.org/u/LG1)\
**Post date:** [November 17, 2006, 2:21pm UTC](https://community.asterisk.org/t/voice-quality/10387/9 "2006-11-17T14:21:24Z")

</div>

- I have ztdummy setup.
- I have changed the codec to alaw and second ulaw.
- internaly I’m using IdeFisk 1.35 as a softphone.
- the router in Juniper

What dou you recomand as a codec considering that I’m from Europe, and one of the voip providers that I use is also in Europe and most of the outbound calls are to Europe countries? I know that is better ulaw for US and alaw foer EU, is it true?

What is your experience whit asterisk/how many calls in the same time/voip only (without Digium card) - how is the voice quality?

Next week I can make a test with many users to see if the settings recomanded (stop using ilbc) will be better than those used before.  
In the mean time I wil also try voipjet.

Thanks,

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [November 17, 2006, 4:01pm UTC](https://community.asterisk.org/t/voice-quality/10387/10 "2006-11-17T16:01:50Z")

</div>

Hi [quote]I know that is better ulaw for US and alaw foer EU, is it true?  
[/quote]

yes thats correct US and Japan for uLaw the rest of us Alaw. and Alaw will sound a bit better.

Ian

---

<div class="post-metadata">

**Author:** ![808blogger](https://avatars.discourse-cdn.com/v4/letter/8/b5e925/32.png) [@808blogger](https://community.asterisk.org/u/808blogger)\
**Post date:** [November 17, 2006, 8:31pm UTC](https://community.asterisk.org/t/voice-quality/10387/11 "2006-11-17T20:31:10Z")

</div>

[quote=“LG”]- What is your experience whit asterisk/how many calls in the same time/voip only (without Digium card) - how is the voice quality?

Next week I can make a test with many users to see if the settings recomanded (stop using ilbc) will be better than those used before.  
In the mean time I wil also try voipjet.

Thanks,[/quote]

do you mean how many calls from softphone to softphone WITHIN THE SAME LAN? or do you mean how many calls to your voip provider?

I think you are implying how many calls over your IAX trunk to your provider can support. It all depends. as long as you are running ULAW the entire way, you are fine, the idea is to minimize transcoding, while being mindful of your bandwidth, if bandwidth is NO issue and you are not transcoding, you should beable to push A LOT of calls through your voip provider, as long as they can support. I have moved 60 simultaneus ulaw calls through binfone simultaneusly (this is not a huge number) but at that poinbt the load on my asterisk box was low.

It really depends on your situtation. check out binfone. I have had some trouble with voipjet…

---

<div class="post-metadata">

**Author:** ![LG1](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@LG1](https://community.asterisk.org/u/LG1)\
**Post date:** [November 19, 2006, 8:05pm UTC](https://community.asterisk.org/t/voice-quality/10387/12 "2006-11-19T20:05:41Z")

</div>

Yes, how many simultaneous calls from softphone - asterisk - outbound voip provider - enduser?

Did you use ilbc or speex for minimiseing the bandwidth? If I have 3 Gh Xeon dual core, 2 Gb DDR2 and Ultra320SCSI HDD’s the transcoding for ~30 simultaneous calls do you think is a problem? how much CPU usage I should have in this situation? Considering that I’m using this server only for asterisk.

Do you think is possible to amplify the sound from asterisk? for example if I switch to Skype, the sound is a lot louder, the other person seems to be much “closer”,

Do you use a Digium card? or just a ztdummy setup?

---

<div class="post-metadata">

**Author:** ![808blogger](https://avatars.discourse-cdn.com/v4/letter/8/b5e925/32.png) [@808blogger](https://community.asterisk.org/u/808blogger)\
**Post date:** [November 21, 2006, 2:45am UTC](https://community.asterisk.org/t/voice-quality/10387/13 "2006-11-21T02:45:24Z")

</div>

I am not worried about bandwidth so i use ulaw the entire way. then there is no transcoding and soundquality will be good (if you have no bandwidth issues) with those specs I dont think 30 simultaneous calls will be a problem. Why are you not interested in using ulaw? as far as “amplifying the sound” thats all codecs pretty much. Skype has a propreitary codec. there has been work in the asterisk branch on “HD” voice, but at this point ulaw is the best for quality. The reason to use ULAW or THE SAME CODEC the entire way is to minimize transcoding formats, this takes up cpu and messes with quality.

I dont use ztdummy because all of my servers have pri cards in them (for one reason or another).

[quote=“LG”]Yes, how many simultaneous calls from softphone - asterisk - outbound voip provider - enduser?

Did you use ilbc or speex for minimiseing the bandwidth? If I have 3 Gh Xeon dual core, 2 Gb DDR2 and Ultra320SCSI HDD’s the transcoding for ~30 simultaneous calls do you think is a problem? how much CPU usage I should have in this situation? Considering that I’m using this server only for asterisk.

Do you think is possible to amplify the sound from asterisk? for example if I switch to Skype, the sound is a lot louder, the other person seems to be much “closer”,

Do you use a Digium card? or just a ztdummy setup?[/quote]

---

<div class="post-metadata">

**Author:** ![LG1](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@LG1](https://community.asterisk.org/u/LG1)\
**Post date:** [November 21, 2006, 9:54am UTC](https://community.asterisk.org/t/voice-quality/10387/14 "2006-11-21T09:54:38Z")

</div>

What is the latency between your asterisk and the best voip provider? 50ms is ok, 150ms?

I have moved to alaw and ulaw, the quality is now better, I will also try to minimise the transcoding. I have another problem now with echo but I think I know how to resolve it and some strange metalic sounds durring the call but not from the begining, any ideea?

Thanks,

---

<div class="post-metadata">

**Author:** ![jorge\_pbx](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jorge\_pbx](https://community.asterisk.org/u/jorge_pbx)\
**Post date:** [January 12, 2007, 4:04am UTC](https://community.asterisk.org/t/voice-quality/10387/15 "2007-01-12T04:04:31Z")

</div>

voipgate have a new template for iax2 definition. it solve a lot of problems. try it.

---- START /etc/asterisk/iax.conf ----  
[general]  
bindport = 4569 ; Port to bind to (IAX is 4569)  
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)  
delayreject=yes  
disallow=all  
allow=ilbc  
allow=speex  
allow=gsm  
allow=alaw  
allow=ulaw  
jitterbuffer=yes  
mailboxdetail=yes  
register =\> [USERNAME:PASSWORD@iaxregister.voipgate.com](mailto:USERNAME:PASSWORD@iaxregister.voipgate.com)

[USERNAME] ; this must be your voipGATE username  
type=user  
disallow=all  
allow=ilbc  
allow=g729  
allow=gsm  
allow=alaw  
allow=ulaw  
username=USERNAME  
secret=PASSWORD  
[host=register.voipgate.com](http://host=register.voipgate.com)  
notransfer=yes  
context=FROM-VOIPGATE  
---- END /etc/asterisk/iax.conf ----

---- START /etc/asterisk/extensions.conf ----  
[TO-VOIPGATE]  
exten =\> \_X.,1,DIAL(IAX2/USERNAME:PASSWORD@iaxcalls.voipgate.com/${EXTEN},120)  
exten =\> \_X.,2,hangup ; the called party did not answer  
exten =\> \_X.,102,Playtones(busy) ; the called party is busy  
exten =\> \_X.,103,Busy(10)  
exten =\> \_X.,104,Hangup  
[FROM-VOIPGATE]  
exten =\> VOIPGATE\_PHONE\_NUMBER,1,Dial(SIP/your\_sip\_phone\_01)  
---- END /etc/asterisk/extensions.conf ----
