Solved CODEC issue

Status
Not open for further replies.

blackslash

Forum User
Joined
Jul 24, 2019
Messages
11
Reaction score
0
Hi Guys,

I have a 3CX setup in our office, PBX is hosted in the cloud. All the phones are sitting behind a router and I have set the PBX to deliver audio. However the call quality is very bad, when calling an extension within the office and when receiving calls from outside numbers. Also there are 2 users using the 3CX app and they too are facing the same issue. What codec would you recommend that I should use to get better quality?

For 3CX app users I have set the following order

GSM-FR
G729
G.711 U-law
G.711 A-law
G722

For desk phone user the following are set

PCMU
PCMA
G722
G729
 
Try calling the echo test extension *777. If it still sounds bad, it's not a codec issue. Hint, audio quality is rarely a codec issue.
 
Quality is much much better when I dial 777. Any suggestions?
 
Ok so if the echo test is good, it means one of two things: you ran the echo test when there was less network/internet traffic or the server was less burdened and that's why it sounds good or there is actually a codec issue. So try to do the echo test when you notice the bad call quality and see if it still sounds better. If it does, then try making PCMU/G.711 ULAW the first codec on your trunk and on your extensions and then re-provision them and test again. If that doesn't help then you'll want to run wireshark to confirm what codec is actually being used. See the links below:

https://www.3cx.com/docs/capture-network-traffic/

https://www.3cx.com/3cxacademy/videos/advanced/basic-troubleshooting/

Also, what phones are you using?
 
I was using PCMA/G711 ALAW as that was what was recommended by the SIP provider.

Using Yealink T46S and T48S units
 
Hi @blackslash

Are you on STUN or SBC at the office?
 
With your ISP do you have enough bandwith ? Link is dedicated to VOIP ? how many SC do you have ?
 
You could also consider adding an SBC if you have more than a couple of phones, the internal calls audio can stay local for extension to extension.

As for the remote audio (calling via your trunks on the PBX) you will need a connection that has enough dedicated bandwidth for media streams according to your codecs and simultaneous calls. In case the connection is shared by office machines you might find that the quality suffers when people are downloading or uploading. Remember, anything that uses internet is part of download an upload (ie. watching a video or sending an email with attachments).

https://www.3cx.com/blog/docs/bandwidth-utilised-for-voip/

For now you can enable QoS in your router/firewall settings as a start but don't assume that the codec is the issue if you have clear audio some times and sometimes not.
 
We are on a 100down / 40up line. Link is shared between Voip and data with 16SC

I should say the internal calls to extensions works perfect. Just issues on external calls and its the same all day long.

Will try QoS and look at SBC if this doesn’t resolve.
 
Yes QoS might help in this case as it should prioritize the traffic.

I would also run a capture on my PBX during an external call and listen to the audio stream.

A) Is the stream coming from the provider IP to the PBX IP clean?
-Yes: the provider to PBX connection is good
-No: the cloud machine's connection to the internet OR the VoIP provider's side is facing an issue

B) Is the stream coming from the Phone IP to the PBX IP clean?
-Yes: The office connection is likely good at the moment of this call
-No: Either the office internet or the PBX internet connection is facing an issue

These are general ways of starting to narrow things down, not necessarily conclusive but can at least point you in some direction
 
As you have a good ISP link why not using your pbx on premise ?
 
We moved evertyhing to the cloud as didn't want anything hosted onsite, as was the reason why we went with STUN and not with SBC
 
So if extension to extension calls sound good, it's likely not a bandwidth issue since with STUN phones, the audio is going up to the PBX and back anyways. My bet is you are transcoding and that's what the problem is. You said you were using PCMA/G.711 ALAW but didn't mention if you had that set on the trunk or the extension or both. I would remove all codecs from the trunk except PCMA/ALAW and do the same on one extension. Reprovision the extension and then test.

Also, you mentioned you moved 3CX out of your office. When it was previously in the office did you have the same provider and was the call quality good?
 
@cobaltit

3CX was a brand new setup, it was never onsite to start of with. we have it running on a linode. Since my first post was made, I have removed all codecs except for G.711 A-Law/PCMA on all extensions and SIP Trunks as this was the recommended by our SIP provider and I have also set G.711 A-Law/PCMA as the first codec under Settings>General>Codec priority for Local/internal and External call.

I am not sure if it is actually an issue with the SIP provider itself. Thinking of getting another SIP trunk with a random number from a differnt vendor and check how it would perform
 
Just for kicks try changing it to G711U/ULAW.
 
Thinking of getting another SIP trunk with a random number from a different vendor and check how it would perform
This is a good idea if you have not another one yet to test with.
 
It turned out the SIP server was under a DDOS attack. The provider had it resolved and the quality is way better now. It was just a bad time for us to go live. Anyway all working good now. Thank you everyone for all your replies.
 
It turned out the SIP server was under a DDOS attack. The provider had it resolved and the quality is way better now. It was just a bad time for us to go live.

o_O

So they didn't have a email notification or something to let you know about this? That's a pretty scary situation. Hopefully things so smoother from here on out but you might want to look at a backup or alternative provider just in case.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,932
Messages
589,807
Members
164,805
Latest member
Diana Paladutsa