One-way Audio

From Pbxnsip Wiki

Jump to: navigation, search

Contents

Problem

A common problem in VoIP is that the audio stream is established only in one direction. This is called "one-way audio". For general problems with trunks, see Troubleshooting SIP Trunk Problems.

In all cases you should try and configure the phone using the Auto-Provisioning service.

If you have IPv6, you can easily avoid the routing problems by giving the PBX a public routable IPv6 address.

Reasons

NAT and Firewall

Typically this problem is related to firewalls that block traffic. Devices behind NAT generally have problems providing routable IP addresses; therefore the device running on the other side of the NAT has to provide a routable address. Depending on the NAT-type this can get tricky. The PBX addresses this problem by sending the RTP to the location from where it receives RTP. Although this is not strictly standard compliant, it solves most of the situations. In situations where other devices require a strict RFC compliance, this behavior can be turned off.

What you can do:

  • If the SIP signaling already works, but only the RTP stream gives your problems, check the firewall configuration for the RTP ports. Maybe SIP has been allowed, but RTP was not. Make sure your firewall is configured correctly.
  • Check your routing. It is a common problem that some operating systems prefer the interface with the highest bandwidth as default gateway by default. If the LAN interface has higher bandwidth, packets to the public Internet might be sent through the private interface to the public Internet, and then present a non-routable IP address.

Strict RTP Routing

When the IETF specified SIP, it neglected the NAT problem and wrote into the standard, that a SIP user agent must send the media exactly to the specified address and port - even if it receives media from another port and IP address. This is a very NAT unfriendly specification, as it makes it impossible to learn the RTP address of a user-agent that is behind NAT. Unfortunately, there are a few vendors that strictly require this behavior and point to the RFC in the case of one-way audio. Therefore, it is impossible to be NAT and RFC-compliant at the same time.

There is a flag on Port level and on Trunk level that controls this behavior (practically all SIP phones today are able to send and receive from the same IP address and port, so that there is no need for a settings on extension level). If you experience one-way audio and you don't have devices with the "strict" RFC behavior connected to your PBX, then you should not use the strict RTP routing.

Surprisingly, when you are using a trunk without an outbound proxy, that trunk can go anywhere - including the phone that you are calling from. So when the request hits the PBX, it first believes that the call came from that trunk and looks at the RTP routing flag for that trunk. When this trunk has the "Strict RTP Routing" set to "on", the PBX will not follow the NAT RTP address of the phone - even if later during the call processing the PBX will find out that the call actually came from an extension.

Because of this, when you don't set the outbound proxy of the trunk, you should not set "Strict RTP Routing" to "on".

IP Address Conflict

Another reason can be that there is an IP address conflict in the network. It can be very difficult to track this problem down. As a general advice, we recommend to use a DHCP server that makes sure that IP addresses are used only once in the network.

You can use the "ping" command to see what network elements are responding to an IP address. Some operating systems already issue a warning when they detect an IP address conflict.

Codec Mismatch

The PBX tries to offer all possible codecs. Some older implementations do not work well with several codecs in a SDP answer. You can find out if this is a problem by setting only one codec on the trunk or in the codec preference. If the behavior changes, check the connected equipment for this bug and perform a software upgrade or considering using only one codec.

RTP Port Range

Every call with two call legs consumes at least 4 RTP ports (RTP and RTCP in two directions). That means if you define a port range of 100 ports, the PBX will be able to have only 25 calls at the same time. We recommend to use a large port range (at least 1000 ports), so that the probability of a RTP overlap is minimized and hanging user agents cannot "spray" accidentially on open RTP ports.

If you are port forwarding RTP from the firewall, make sure that the port range matches the settings of the PBX.

Personal tools
Getting Help