One way Audio on endpoint?

CentOS 7
Asterisk 13.18.2

I have Asterisk Server with Static IP no NAT (Location A)
I have a 3rd party company (Location B) connecting to my Asterisk Server.
I have my endpoint (Location C)
The 3rd party company can connect to my server and can see the ringing of the phone but they can’t hear me at location C. I can hear them and respond but they cant hear me.

I believe their endpoints are behind a NAT and I have no control over their network. Are there any solution I can provide them. I been reading on STUN, TURN and ICE but not sure what would be best? Is it included with Asterisk? Maybe there is something on their router they need on like ALG?

Any help or suggestion would be appreciated it

There are a few setting you can add on the Asterisk side like : setting NAT support on peer defintion, define the usage of stun server on the remote endpoints, but also it is needed the router on the remote network can deal with NAT

Setting NAT support on peer defintion,
how do I do this? is it ice_support?

Define the usage of stun server on the remote endpoints
how do I do this also?
could you show me some example or point me in the right article?

Please and thank you

image

This an examples based on the zoiper client, the sip.conf and pjsip.conf sample files describe very clear the options to use when dealing with NAT

1 Like

Hi anoluck,
Solutions on Asterisk side might help you when your Asterisk server is located behind NAT.
However, in your case endpoints are behind NAT.

To eliminate the issue, you should refer to the network administrator responsible for location C and perform one of the following actions depending on their equipment and security policies:

  1. Enable SIP ALG on their router / firewall
  2. Open UDP ports for RTP traffic on their router / firewall (b default,this is the range 10000…20000)
  3. Enable STUN or ICE on their endpoints as suggested above.
1 Like

If the endpoints are not NAT aware you may need to force the use of comedia, and force_rport, in your Asterisk NAT settings. The first causes Asterisk to ignore the IP address given in the SDP and learn the true IP address from incoming traffic to the port that it has nominated. force_rport is probably not necessary, if the call is setting up and it is just the media that is going wrong, as it only relates to signalling.

NB you must never set the equivalent of comedia on both ends, as you will have a stalemate, with both sides waiting for the other to send first.

1 Like

I’d have to reread all info in sip.conf and pjsip.conf thanks.
stun server is something asterisk provides?

Thanks for the details. I figure it has to do with the endpoint but I have a question. I thought the problem would be in Location B and not C?
Location C can hear and respond fine but Location B cant hear anything. Wouldn’t the problem be at Location B with NAT issue?

One other thing. Disable direct media, as it may be the remote locations that are not handling NAT adequately when talking to each other.

1 Like

OMG! all I did was add direct_media=no to the endpoint template in pjsip.conf
and now I have two way audio! Thanks david551

What is the purpose of direct_media and why is it on by default if it can cause this kind of problem?

It allows media to flow directly between endpoints, which may or may not work depending on network layout. This reduces the load on Asterisk and the bandwidth of the system running Asterisk.

1 Like