# Remove Unnecessary Codecs for Grandstream IP Phone

A codec (short for coder-decoder) is the method a phone and Cloud Voice use to compress and carry call audio, for example G.711, G.722, or Opus. Before two ends can talk, they negotiate and agree on a shared codec.

Out of the box, a Grandstream IP phone (a desk phone that makes calls over the network) turns on every codec it supports for each account. When more codecs are advertised than needed, outbound calls can behave unpredictably. To keep call setup reliable, pare the account's codec list down to only what you use.

This is a two-pass job: first set the codecs on Cloud Voice (the hosted PBX, the system that routes your calls), then match the same list on the phone itself.

:::caution
The phone and Cloud Voice must share at least one codec. If their lists have no codec in common, calls will fail to connect or connect with no audio. Whatever you keep on one side, make sure the other side keeps it too.
:::

## Before you start

Make sure the Grandstream phone is already provisioned against your extension. See [Provision Grandstream IP Phone with Cloud Voice](/pbx/ip-phone-configuration-guide/provision-grandstream-ip-phone-with-cloud-voice-cloud/).

## Set the codecs in Cloud Voice

1. Sign in to the Cloud Voice web portal and open **Auto Provisioning > Phones**.
2. Locate the Grandstream phone in the list and click the edit icon (![edit icon](/images/pbx/wizard-previous.png)) next to it.

   ![Phone list in Auto Provisioning with the edit control for the Grandstream device](/images/pbx/edit-gs-phone-pce.png)

3. On the phone's configuration page, scroll to the **Codecs** section.
4. Move the codecs you want to keep from the **Available** box into the **Selected** box.

   ![Codecs section showing available and selected codec lists](/images/pbx/gs-codec.png)

   :::tip
   Keep a widely supported codec such as G.711 (listed as PCMU or PCMA) in the **Selected** box. It is supported almost everywhere, so keeping it guarantees a common codec is always available for a call.
   :::

5. Click **Save**.

## Match the codecs on the phone

:::note
Grandstream phones do not allow Cloud Voice to strip enabled codecs through auto provisioning. Because of this limitation, you have to remove the extras by hand in the phone's own web interface so it lines up with what you set in Cloud Voice.
:::

1. Open the phone's web interface by browsing to its IP address and logging in.
2. In the left-hand menu, go to **Accounts > Accounts**.
3. Click the account you want to change, then open the **Codec Settings** tab.

   ![Account codec settings tab in the Grandstream phone interface](/images/pbx/codec-setting-for-gs-phone.png)

4. Under **Preferred Vocoder** (Grandstream's label for the codec list), move any codec you no longer need from the **Selected** box back to the **Available** box.

   ![Moving an unused codec out of the selected vocoder list](/images/pbx/move-codec-for-gs-phone-1.png)

   :::caution
   Leave at least one codec in the **Selected** box, and make sure it also appears in the list you set in Cloud Voice. Removing every codec, or leaving no overlap between the two sides, breaks calling on this account.
   :::

5. Click **Save and Apply**.
