Very distorted voice call

I bought The Sangoma PHS-500 box(FreePBX 13.0.119 ‘VoIP Server’) and have connected it to the new Audiocodes median500 MSBR (Firmware Version 6.60A.292.001).

And From Mediant500 to ISDN PRI-E1 in Thailand but I got a very distorted voice for all calls with outside(both incoming and outgoing). but all internal calls by ext no. are working normally.

I am a newbie for these boxes. I found nowhere about voice setting in Sangoma.
So, I have tried adjust Voice Volume (-32 to 31 dB)/Input Gain (-32 to 31 dB)/Silence Suppression/Echo Canceller in the Mediant500 already. It does not help, still got same very distorted voice.

Now, I’m not sure that Mediant500 to E1 need a cross over Lan cable or not, will find one to test soon.

Please suggest me to solve this issue
Thanks

They are connected via SIP trunk?
Did you check codecs ?

Yes it is a SIP trunk.
I also attached both codec setting pic too. The upper one is Mediant500, lower one is Sangoma.

Dear You are checking IAX2 codec settings. Please check Asterisk SIP Settings.

I have changed to the SIP codec already

Please run “sip show peer audiocodectrunkname” and paste the output.
(gateway and freepbx should ping each other.)
Did you record your call? in recording file you see this voice issue?

I don’t to how to use the command sip show peer audiocodectrunkname
My trunk name is “Mediant” but when I entered "sip show peer audiocodecMediant"
It said “Peer audiocodecMediant not found.”

Both are on the same Lan network.
The records are also got the issue.

I would check with your vendor if the framing/line coding/clock timing is set on your CPE (the Mediant) EXACTLY as your vendor is provisioning it. You will need to use alaw on any SIP trunking to the Mediant. Only they and you can help here.

Remove the g729 from the trunk and try again. Also check the settings of your line as @dicko suggests!

I have asked the technician of provider here at first before I set these boxes, they just sent me the pic of example settings of other customer. They don’t know anything more than in this pic and said it is the all neccessary info I need.

Below is my configs, please help me check which one I do wrong or miss.
the things I set are just the 3 Red boxes. I wonder that where can I set D-ch =16?? do I need to set it?

I also wonder that I should set protocol to :E1 cas instead of euroisdn or not but it has only “none” for “CAS table per trunk” and I can’t entered any number to “CAS table per Channel” as well. (may be I don’t know how to set it)

I am not familiar with Thai E1

Post your /etc/dahdi/system.conf

Autogenerated by /usr/sbin/dahdi_genconf on Mon Mar 21 11:27:34 2016

If you edit this file and execute /usr/sbin/dahdi_genconf again,

your manual changes will be LOST.

Dahdi Configuration File

This file is parsed by the Dahdi Configurator, dahdi_cfg

Global data

loadzone = us
defaultzone = us

Sorry, that was a spurious request for that file. You have a gateway.

Sorry again but I can’t help here, I would look to Audiocodes for support.

If you use E1/T1, you have to check both sides for setting. If there is any mis confi, it will cause something happened.

I have contacted the engineer at ISDN provider again. They confirmed that this is all info they can provide me. But they will help check the signal again that I think it does not help.

Unluckily, my Mediant comes without its support so I can’t ask them anything.
So, thx you guy for helping. still waiting for more suggestions.

Hi guys,
I’m glad to let you know that I have fixed it already.
In Mediant500, just disbled all coders except ALaw and set TDM setting>PCM LAW>from Mulaw to Alaw, it’s fixed.

Thanks everybody.