Asterisk and jitterbuffer

Hi all,
for my contact centre I have 4 pbx.
3 of them send the calls to the 4th and the 4th send the calls to provider.
Few day ago I’ve mistakenly changed the jitterbuffer settings and the audio become distorted.
Can you help me to modify this settings?

CentOS release 5.5 (Final)
4GB ram
4x Intel® Xeon® CPU E5335 @ 2.00GHz

Asterisk 1.4.35

jbenable = yes
jbforce = no
jbmaxsize = 100
jbresyncthreshold = 1000
jbimpl = fixed
jblog = no

jitterbuffer= no
forcejitterbuffer= no
resyncthreshold= 1000

Also, I have 2 public fixed IP and in sip.conf, in externip i have setted one of them.
In /etc/sysconfig/network-script/route-ethx I have
default via dev eth0 via dev eth0

where xxx is the ip address of provider.
I want all calls destinated to xxx pass through with another public ip.
May I have problems?

Need more info?
Thanks in advance

One would not normally enable a jitter buffer for SIP. It is generally for the side that handles analogue audio, or circuit switched connections to deal with this, and also with echo suppression, i.e. the phone, or the line card interface.

Asterisk only supports multiple public interfaces on systems that are properly multi-home, i.e. run Border Gateway Protocol and have an autonomous system number. In that case, it does not matter which address is used be the external system; the interface that is closest, in network terms, will be used.

If you are forced to use a broken multi-homes system, the best way is to run multiple instances and interconnect them with, for example, IAX.

If your special interface is directly on the Asterisk box, you may be able to declare it as a local network, as long as you make sure you disable direct media.

So why now i hear distorted voice?

Before my edit it was work good.
I have this issues when the numbers of calls are ~100

Can you help me to configure it well, please?

If the number of calls makes a difference, you are overloading either the network or processor. You need to provide more resources, although, for the network, you may be able to prioritise VoIP media using the QoS parameters. This will requires suitable configuration of all the routers, and possibly switches, between the end points.

Anyway how I can well configure iax.conf jitterbuffer? is there any tutorial?

The settings you list above are the defaults. I had issues with out-of-sequence packets causing voice artifact in Asterisk (modified by I set jitter buffer as follows and it improved significantly but I still get some artifact.

jbenable = yes
jbforce = yes
jbmaxsize = 250
jbresyncthreshold = 1000
jbimpl = fixed
jblog = no

Hope this helps. You can do a packet capture and look at it in Wireshark Telophony=>RTP=>Streams=>Analysis to see out-of-sequence packets (result of jitter) to see if you have improved and tweak sip.conf jitter parameters until you get the best result.

Thank you
I’ve try but still get some artifact