NYSE: IDT
Stay ahead with IDT Express
Products

Discover how our products can revolutionize the way you communicate and collaborate.

Voice

Explore our advanced voice solutions designed to optimize your communication workflows.

Diverse range of DID number solutions designed to enhance your communication capabilities.

Experience unparalleled communication efficiency with our advanced SIP Trunking Solutions.

Cutting-edge technology to proactively detect and neutralize spam flags on your DID Numbers.

Enable your customers to connect with your business by dialing a toll-free number.

AI voice agents that handle calls, capture leads, and provide customer support automatically, anytime.
Messaging

Wherever your audience is, our platform ensures seamless messaging across diverse channels.

Build customer journeys by fostering interactive conversations, all within the framework of your app. 

Connect with your audience in a simple and effective way through our cutting-edge SMS platform. 

BYOC

Harness the power of IDT as your chosen carrier while leveraging your platform’s advanced features and services.

Integrate Twilio with our robust carrier routing platform to achieve unparalleled Voice termination system.

Experience reliable and high-quality communication services while leveraging the advanced capabilities of Genesys. 

Integrate IDT with the collaborative strength of MS Teams, unlocking efficient and feature-rich communication. 

Experience the power of our carrier network seamlessly connected to Plivo through our cutting-edge BYOC solution. 

Tools

Experience the power of our online voice tools, designed to simplify communication management. 

Ensure the authenticity and integrity of outbound calls with our STIR/SHAKEN Verification Check tool. 

User-friendly tool to verify the reputation of your business number, ensuring that it remains trusted. 

Compare and gain insights into outbound call expenses, optimize budget, and make informed decisions. 

Easily estimate and compare the costs associated with different DID numbers providers. 

Compare inbound VoIP rates among top CPaaS providers and optimize your inbound call costs. 

Generate custom SMS templates. 

Resources

Empower yourself with the resources you need to thrive in the dynamic landscape of communication.

Articles covering a wide range of topics.

Discover our video guides.

Get answers to common queries.

Find instructions to make the most of our products.

Stay informed with today's most important news stories

Discover telecom insights and trends.

Find definitions of popular telecom terms.

Discover the upcoming events on our calendar
Company

A global telecom partner built to meet your needs. 

Discover the story behind our commitment to delivering innovative solutions to connect people and businesses worldwide. 

Learn about our robust network infrastructure that spans across the globe, ensuring reliable and secure connectivity. 

Got a question, feedback, or need assistance? Our dedicated team is here to help!

Find partners or sign up for partnership programs.

NYSE: IDT
Learn / Blog

Fixing One-Way Audio and NAT Problems on SIP Trunks

|
|  9 min
|
In this article

One-way audio is a problem on SIP calls where the call connects normally but sound travels in only one direction, so one person can hear the other but not the other way round. When neither side can hear anything, the cause is usually the same, only affecting both directions.

The key to understanding these problems is that SIP handles call setup and audio separately. During call setup, each side tells the other where to send its audio, using an IP address and port listed in a part of the message called the SDP. One-way audio almost always means that one side was given an address it can’t reach, or that a firewall blocked the audio along the way. Once you find the incorrect address or the blocked path, you’ve found the fault. In most cases the cause is network address translation (NAT), which changes addresses as traffic passes between a private network and the internet.

This guide assumes you can read a SIP trace and capture network traffic. It explains how to find the cause step by step and how to prevent the problem from coming back.

How each side learns where to send audio

When a call is being set up, each side includes an SDP description of its audio in the setup messages. Two lines in that description matter most here:

c=IN IP4 192.168.10.25

m=audio 18560 RTP/AVP 0 101

The c= line gives the IP address the other side should send audio to. The m= line gives the port, along with the audio formats this side can accept. In this example, 0 means G.711 μ-law and 101 means keypad tone events. The other side will send its audio to exactly that address and port.

In this example, the address 192.168.10.25 is a private address that only works inside a local network. If this description leaves your network without being corrected, the carrier will try to send your incoming audio to a private address inside its own network, where it will be lost. Your outgoing audio still reaches the carrier, because your device knows the carrier’s public address. As a result, the person at the other end can hear you, but you can’t hear them.

The most common causes

SymptomLikely causeWhere to look
You can’t hear them, but they can hear youA private IP address in your SDP, or incoming audio blockedThe c= line in your outgoing SDP and your firewall
They can’t hear you, but you can hear themYour outgoing audio is blocked or sent to the wrong addressThe other side’s SDP and your outbound firewall rules
Audio works at first and then stopsThe NAT mapping for audio timed out, or a new setup message changed the portNAT timeout settings and re-INVITE messages
The call ends after about 32 secondsThe confirmation for the answered call never arrivedThe Contact header and NAT on the signaling path
No audio in either directionMismatched codecs or encryption settings, or all audio blockedThe agreed audio format and encryption lines
Problems only after hold, resume or transferA new SDP with a different address or portHow re-INVITE messages are handled
Random problems that come and goA SIP ALG feature on a router rewriting messagesRouter and firewall settings

Step 1: check the SDP on both sides

Start by collecting a SIP trace of a call that failed. In it, find the SDP your side sent and the SDP you received, in both the initial call request (the INVITE) and the answer (the 200 OK). If the call played audio before it was answered, check the 183 message too.

For each c= and m= line, ask two questions. First, is the address one that the other side can reach from the internet? Second, is the port within the range your firewall allows? In most cases, the fault is a private address, an incorrect public address or a port outside the allowed range.

Step 2: capture the audio traffic

The SDP shows where each side was told to send audio, while a packet capture shows where the audio actually went. On the SBC or PBX, capture both the call setup messages and the audio for a test call, for example with:

tcpdump -i any -s 0 -w call.pcap port 5060 or portrange 10000-20000

Then open the capture in a tool that understands SIP and look at the audio streams, which use a protocol called RTP. For a working call, you should see two streams, one in each direction, between the addresses and ports listed in the SDP. If one stream is missing, that tells you which direction is failing. If a stream comes from a different address or port than the SDP promised, NAT is changing the traffic on its way through.

Step 3: check for SIP ALG

SIP ALG is a feature found on many routers and firewalls. It tries to help SIP work through NAT by rewriting the addresses inside SIP messages. In practice, however, it often rewrites them incorrectly or only partly, especially when an SBC is already handling NAT correctly.

The symptoms can be confusing, because calls work some of the time, audio fails on some calls but not others, and phones occasionally lose their registration. If you have an SBC or a PBX that can handle NAT itself, turn off SIP ALG on every router and firewall between it and the carrier. This one change fixes more one-way audio problems than any other.

Step 4: advertise the correct public address

If your SBC or PBX sits behind NAT, it must list its public address in the SDP rather than its private one. Most SBCs and PBXs have a setting for this, often called the external or public media address, along with a list of local networks for which the private address should still be used.

Set the public address, define your local networks, and then test again. If your public address can change, ask your internet provider for a fixed address for voice traffic, because SIP trunks are difficult to run reliably on an address that changes.

Step 5: open the full range of audio ports

Audio uses a range of UDP ports that is set on your PBX or SBC. Your firewall must allow incoming audio on that entire range from your carrier’s media addresses, not only from the address it uses for call setup. Carriers often send audio from different IP addresses than the ones they use for signaling, so ask your carrier for its full list of media addresses.

The port range on your device and the port range on your firewall must also match exactly. For example, if your PBX uses ports 10000 to 20000 but your firewall only allows 10000 to 15000, about half of your calls will have audio problems, which makes the fault look random.

Step 6: use symmetric RTP and rport

Symmetric RTP means that a device sends audio from the same port it receives audio on, and that the other side sends audio back to wherever it actually received audio from, rather than relying only on the address in the SDP. Many carriers and SBCs support this, sometimes under the name media latching. Because the return audio follows the real path through the NAT, this setting fixes many NAT problems automatically.

For call setup messages, a parameter called rport, defined in RFC 3581, does a similar job. It asks the other side to send its responses back to the address and port the request actually came from. Turn on both features wherever your equipment supports them.

Calls that end after about 32 seconds

If a call connects, has working audio and then ends after about 32 seconds, the cause is almost always a call setup problem rather than an audio problem. When a call is answered, the answering side sends an answer message (a 200 OK) and waits for the caller’s side to acknowledge it with a message called an ACK. If the ACK never arrives, the answering side keeps resending the 200 OK for about 32 seconds and then ends the call.

The usual reason the ACK doesn’t arrive is that the answer message contained a private address in its Contact header, so the ACK was sent somewhere unreachable. To fix this, make sure the correct public address is used for call setup messages as well, or let the SBC rewrite the Contact header.

Audio that stops partway through a call

If audio works at first and then stops, especially after a period of silence or after the call has been on hold, check your NAT timeouts and any new setup messages sent during the call. Some firewalls remove their record of a UDP connection after a short idle period, so a muted call can lose its audio path. You can avoid this by increasing the UDP timeout for voice traffic, or by using comfort noise and keep-alive messages so the connection stays open.

Putting a call on hold, resuming it or transferring it often sends a new setup message, called a re-INVITE, with a new SDP. If that new SDP contains a different address or port, and your NAT settings only corrected the original one, the audio will stop working at exactly that point in the call.

No audio before the call is answered

If callers hear silence instead of a ringing tone, or a recorded announcement plays on only one side, look at early media. Some calls send audio in a 183 Session Progress message before the call is answered, so that callers hear ringing or a carrier announcement. That early audio uses the SDP in the 183 message, which may be different from the SDP in the final answer. Check that your NAT and firewall settings apply to early audio as well, and that your PBX or SBC is set up to play or pass it through.

When the problem isn’t NAT

Two causes lead to no audio in either direction and have nothing to do with NAT. The first is a codec mismatch, where the two sides agree on an audio format that one of them can’t actually decode; our guide to G.711, G.729 and Opus explains how to avoid this. The second is an encryption mismatch, where one side encrypts the audio and the other doesn’t. This is common with Microsoft Teams Direct Routing, which our post on what breaks in Direct Routing covers.

If calls don’t arrive at all, rather than arriving without audio, the cause is usually number configuration or routing instead. Our guide to common DID setup issues covers those problems.

Keep a record of each fix

Once you’ve found the cause, write down the symptom, the evidence from the trace, the setting you changed and the device you changed it on. One-way audio problems often return after equipment is replaced or a firewall is migrated, and having notes from the first diagnosis makes the second one much faster.

Preventing one-way audio

Most one-way audio problems can be prevented with a few standard practices. Use an SBC at the edge of your network to handle NAT, turn off SIP ALG everywhere, use a fixed public address for voice, make sure the audio port range matches between your devices and your firewall, and run a set of test calls after every network change. It’s also worth checking audio during failover tests, because a backup site with the wrong media address will only show the problem during a real outage. Our guide to geo-redundant SIP trunks explains how to test failover.

When you connect to a carrier, ask for its signaling and media address ranges, the codecs it supports and whether it supports symmetric RTP. IDT Express provides SIP trunking from 40+ locations, so before you go live, ask the team for the signaling and media address ranges your firewall needs to allow. Our SIP trunking page gives an overview of the service.

Frequently asked questions

What causes one-way audio on SIP calls?

One-way audio usually happens because one side is told to send audio to an address it can’t reach, most often a private IP address listed in the SDP behind NAT, or because a firewall blocks the audio in one direction.

Should I disable SIP ALG?

Yes, in most cases. SIP ALG on routers and firewalls often rewrites SIP messages incorrectly, which causes one-way audio and lost registrations, especially when an SBC or a NAT-aware PBX is already handling NAT.

Why do SIP calls drop after 32 seconds?

A call that ends after about 32 seconds usually means the acknowledgement for the answered call never arrived, often because the Contact header contained a private address. The answering side keeps resending its answer for about 32 seconds and then ends the call.

What ports does RTP use?

RTP uses a range of UDP ports set on your PBX or SBC, often somewhere between 10000 and 20000. Your firewall must allow that exact range from your carrier’s media addresses.

What is symmetric RTP?

Symmetric RTP means audio is sent back to the address and port it actually came from, rather than the address listed in the SDP. This lets audio follow the real path through NAT and fixes many one-way audio problems.

Talk to our SIP team

If you’re trying to solve a one-way audio problem on your trunks, talk to the IDT Express SIP team about the media address ranges and settings your setup needs.

Share this article

Leave a Reply

Required fields are marked *

Rate this article


Tags

Meet our wholesale voice routing

Fulfill all your voice calling needs with our category leading wholesale A-Z Voice Termination.
Try IDT Express for a $25 Credit

Get $25 Free Trial Credit

Get IDT Express articles in your inbox

The best source of information in the telecom industry. Join us.

    Most Popular

    08-byoc-for-contact-center-platforms
    |
    |  8 min
    Bring-your-own-carrier (BYOC) is often presented as a way to pay...
    06-fixing-one-way-audio-and-nat-problems-on-sip-trunks
    |
    |  9 min
    One-way audio is a problem on SIP calls where the...
    05-per-channel-metered-or-bundled
    |
    |  9 min
    SIP trunk providers usually price their service in one of...