Share via

How to enable G.722 codec for Azure Communication Services phone number?

Raife Hizlan 0 Reputation points
2026-04-02T07:51:53.4133333+00:00

I'm using Azure Communication Services phone number for an AI voice assistant with Azure OpenAI Realtime API.

Current Issue:

  • Audio codec appears to be G.711 (8 kHz narrowband)
  • Speech recognition accuracy is low
  • Particularly poor for numbers

Question:

How can I enable G.722 wideband codec (16 kHz) for this phone number

to improve audio quality and speech recognition accuracy?

Is G.722 available for Microsoft-managed phone numbers, or do I need

Direct Routing?

Thanks!

Azure Communication Services
0 comments No comments

2 answers

Sort by: Most helpful
  1. Shree Hima Bindu Maganti 7,035 Reputation points Microsoft External Staff Moderator
    2026-04-05T15:22:30.8466667+00:00

    Hi @Raife Hizlan
    Azure Communication Services (ACS) does not currently allow enabling or forcing the G.722 wideband codec for Microsoft-managed (PSTN) phone numbers. When you use an ACS phone number, calls are routed through the public switched telephone network, which is inherently narrowband and limited to G.711 (8 kHz), and ACS automatically handles codec negotiation without exposing any configuration to override this behavior. As a result, lower speech recognition accuracy especially for numbers is expected due to the limited audio quality. G.722 (16 kHz wideband) is only used in VoIP scenarios (ACS SDK clients) or in Direct Routing setups where you control a Session Border Controller (SBC) and can influence codec negotiation. Therefore, if wideband audio is required for better AI speech recognition, you must either use VoIP-based calling or implement Direct Routing, as it is not supported with standard ACS phone numbers.
    https://dori-uw-1.kuma-moon.com/en-us/dynamics365/customer-service/administer/voice-channel-faqs?wt.mc_id=knowledgesearch_inproduct_azure-cxp-community-insider#setup
    https://dori-uw-1.kuma-moon.com/en-us/azure/communication-services/concepts/telephony/direct-routing-infrastructure
    https://dori-uw-1.kuma-moon.com/en-us/azure/communication-services/concepts/voice-video-calling/calling-sdk-features
    Let me know if you have any further assistance needed.

    0 comments No comments

  2. Q&A Assist
    2026-04-02T07:52:12.0733333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    G.722 use depends on which leg of the call is being considered and how the PSTN connectivity is set up.

    For Azure Communication Services (ACS) telephony:

    1. Codec support on ACS Direct Routing (SBC ↔ ACS media processor)
      For ACS Direct Routing, the leg between the Session Border Controller (SBC) and the ACS Cloud Media Processor supports:
      • SILK
      • G.711
      • G.722
      • G.729
        The SBC can be configured to prefer or force G.722 by excluding other codecs from the offer:
      • Configure the SBC so that SDP offers toward ACS include only G.722 (or prioritize it) if wideband audio is desired.
      • This gives 16 kHz wideband audio on the SBC ↔ ACS media leg.
    2. Codec on ACS Calling SDK app ↔ ACS media processor
      On the leg between the ACS Calling SDK app and the Cloud Media Processor, ACS uses:
      • G.722
        This is fixed today; work on adding more codecs is in progress. So if the AI voice assistant is built using the ACS Calling SDK, that leg already uses G.722.
    3. Microsoft-managed phone numbers vs Direct Routing
      The context provided describes codec control explicitly only for Direct Routing scenarios (SBC ↔ Cloud Media Processor). It does not expose a setting to change codecs per Microsoft-managed phone number directly in the portal or via number configuration.
      To explicitly control and guarantee G.722 on the PSTN side, Direct Routing with a certified SBC is required, where the SBC is configured to offer G.722.
    4. Implications for speech recognition with Azure OpenAI Realtime API
      • If PSTN → ACS is narrowband (G.711) but ACS → AI assistant is wideband (G.722 / 16 kHz), recognition quality is still limited by the narrowband leg.
      • To improve recognition (especially for numbers), ensure the PSTN leg into ACS is wideband by using Direct Routing and configuring the SBC for G.722.

    Summary:

    • G.722 is supported on ACS media legs (SBC ↔ Cloud Media Processor and Calling SDK ↔ Cloud Media Processor).
    • There is no per-phone-number setting in the provided context to switch Microsoft-managed numbers from G.711 to G.722.
    • To explicitly enable and control G.722 for PSTN calls, Direct Routing with a certified SBC is needed, with the SBC configured to prefer or enforce G.722.

    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.