One way audio on sip trunk but WITH nat config, how can that be solved?

hello,

i have one way audio even with nat config in place. how can i solve that problem ?

sip_nat.conf

bindaddress=0.0.0.0
externip=xxx.xxx.xxx.xxx
localnet=10.27.99.0
localmask=255.255.255.0
nat=yes

outgoing settings:

canreinvite=no
host=xxx.xxx.xxx.xxx
insecure=very
nat=true
qualify=yes
secret=xxx
type=peer
username=xxx

incoming settings:

host=xxx.xxx.xxx.xxx
insecure=very
qualify=yes
secret=xxx
type=peer

register string:

xxx:[email protected]

i have only replaced username and password as well as public ip addresses by x’es.

i can place phone calls and can hear the other end but the other end actually cant hear me. i have a public ip address on our gateway which is forwarding ALL traffic to the internal address. and all internal traffic from the asterisk box is translated to THAT same public ip address. just to make it clear, its a 1:1 mapping public - private ip address.

to add to the confusion, all IAX2 is working fine outgoing and incoming calls are perfect. aix for this particular account is NOT a possibility.

have i done something wrong in the config ? am i missing something ?

any help is appreciated.
Regards
Jan

Try having local host the IP of your default gateway. If it still doesn’t work, let it be the IP of that server.
Take off local net and local mask. Replace with
localhost=0.0.0.0/255.255.255.0

right…

i have tried above without success.

i had localhost as my public ip, as the other servers ip and as 0.0.0.0. i understood that is what you suggested ? none of it works. i am wondering could it be a codec problem ? is there a way how i can find out which codec i need to use ?

thx
Jan

Change 0.0.0.0 to either the default gateway IP or server IP. Try both. Contact your provider if it still doesn’t work, or try iax, or try taking off the server from NAT temporarily

the provider is useless in this case, i tried. IAX is no option as that provider is not using asterisk and no nat is impossible. its’s not masquerading like a on a soho router, its 1:1 ip mapping. the public ip address is ONLY used for that server and regardless what comes it is mapped to the private ip address which is routed in our network. i cant physically bring that server to a point in our network where i have direct access to the public ip address.

i give the provider another chance friday. i am still not sure if this is a codec probem.

thanks for your help so far.
Jan

i noticed that if i had in the /etc/hosts
127.0.0.1 domain.name it wont! work while others say that you have to have that line

Hello,

I get one-way audio when using a SIP trunk connected to the FXO port of a Grandstream HT488. The device works perfectly with other SIP PBXs (AXON and 3CX). On the HT488 FXO port I have connected a Voxell UMTS gateway which also works fine with other systems. I am using the SIP trunk for oubound calls only. When I call a mobile phone through the SIP trunk, audio from the callee gets through the calling SIP phone, but the called mobile phone gets no audio at all. NAT is properly configured in asterisk (trixbox) because everything works fine with all the other SIP trunks. I get two-way audio only if canreivite=yes is set in the extensions from which I initiate the call. The other SIP trunks in this case still work, but call transfers fail, with a complete loss of audio. I tried to disable all codecs but uLaw both in the extensions and the SIP trunk, but the problem remains, unless I set canreinvite=yes with its detrimental side effect. All this looks very strange and difficult to understandand to me. Can anyone advise about possible solutions, please?

Regards.

With FXO and trixbox 2.4, there IS a known issue with this. Please visit trixbox.org and you should find something there. I’ve seen this many times

Hi,

thank you anyway for you advice. I was able to have two-way audio back by simply putting the “nat=yes” statement in the peer definition of the HT488 trunk. This looks strange because both the HT488 and the trixbox machine are on the same LAN segment without any firewall in between.

Reagrds.

i have tried all the configuration stated in this post. following is my configurations
I do Not have any Cards, Trunks.
Using SIP to make the calls
router config is same as above
one public ip on the router routing traffic lan where the pbx is hosted
All ports are open and fwding
using xlite phone with g711u and g.711a codecs
Nat is said to yes
Phones are getting registered without any problem
call are establised
however there is one way audio on the call. i.e from INside of the network to external remote phone.
And there is NO audio from the external to internal phone.

There is one more thing, ALL google (Gtalk) and Yahoo (IM) calls run without any issue. Please advice

Please advice need to fix this issue please help

Thanks in advace
Regards,
Chikki

Chikki,

Any IM client has no bearing on if Sip traffic can pass properly. Depending on where the phone is located it also might be behind a firewall and either is not issueing keep alives often enough or the firewall has to be adjusted to allow the sip udp port 5060 and 10001 to 20000 udp ports open. One way audio means that one of the firewalls is ok but the other is not as the traffics on the side that can NOT hear is not arriving properly.

Also make sure that the extension has the Nat option enabled.

if ‘canreinvite=yes’ in the extension for it. the reason is that once the call is setup, if reinvites are enabled, the grandstream may communicate directly with the remote peer…

Hi fskrotzki,

Thanks for speedy response.

I am PATing on my router for the following ports.

5060 - 5061 for sip
10000 - 20000 for RTP UDP support.
4696 for AIX support.

I have the firewall which was shutdown for this testing.

i have a public IP adress

123.123.123.123

which is nated with private IP adress of 192.168.0.1 /24 in ONE 2 MANY fromat.

the ip address of the Free PBX is in the Private IP adress Range.

  1. Senario

one machine with inside the netwrok of the freepbx makes a call to the outside remote phone.
a) audio from inside to outside is heard one way speech

  1. Senario.

2 machine outside the free pbx network try to make call.
a) no speech is there on the either of the sides.

i have tried all these confiurations but no luck. Please advice. looking forward for solving the issue.

Thanks and Regards to all people who are very genrous to help the needy
chikki

paste your sip_nat.conf file please.

It should have these lines
nat=yes
localnet=192.168.0.0/24
externalip=123.123.123.123

where 123.123.123.123 is your external ip.

At the VERY minimum.

using Pat versus nat it’s still translating which is a issue with sip and needs to be treated as such. Also realize that the far end might need port 5060 opened and forwarded.

haven’t read all of the above but I had a similar issue with an Avaya phone system. This fix should be universal because they all use the SIP protocol. When combined with STUN over certain NAT devices you experience one way audio. Here is a fix as well as an explaination as to why it happens sip one way audio
The last comment above mine is on the right track. It is related to dynamic ports.