Broken speech issue

We have 2 offices and 2 Asterisk servers.

Office A has the ISDN lines and Office B connects over a VPN for purposes of dialling out.

In Office B we have 6 channels. Speech is OK when 4 channels are in use but when the 5th channel is in use we get broken speech.

Will a change of codecs help and which ones use the least bandwidth?

Many thanks

this might be something related to the bandwidth of your current VPN.
anyway changing the codec will help in this case: try to use either GSM, or g729 which will required you to buy a license for each channel

Thank you for the reply, can you detail how to add the codec and once added is it the iax.conf file I need to edit?

for each user in iax.conf do the following:
disallow=all
allow=gsm

and then configure the codec in all your phones to be gsm