Asterisk Dual Wan - Dual Lan

Hi to all.
I have the following problem:
In our company we have two LAN. the first one is the office LAN (10.x.x.x) and the second is for guest (192.168.1.x/24)
Now we have this configuration:

INTERNET WAN <-> Router A <-> LAN 10.x.x.x <-> Router B <-> LAN 192.168.1.x

  • The Router A has the NAT on to the Asterisk server (port 5060)
  • The Router B is configured with the WAN interface on the LAN 192.168.1.x and the LAN interface on the LAN 10.x.x.x. The NAT is on and the ports (5060-5061 and 10000-20000) are forwarded to the Asterisk Server IP.
  • The Asterisk server is located on the LAN 10.x.x.x with the NAT on and the public IP addres of Router A.
  • We use two sip trunks and all works fine.
  • On the LAN 10.x.x.x we have some IP phones that can call and receive calls without problem
  • On the LAN 192.168.1.x we have some IP phones that works fine with incoming calls but on the outcoming calls works with one way audio

The problem should be that when the call start from a IP phone to the LAN 192.168.1.x the Asterisk server send the NAT parameters with the public IP address and not the “WAN” address of router B.

Someone know how I could solve this issue?


Which channel technology driver are you using (even if one assumes SIP, there are two possiblities)?

Are we talking media address, signalling address, or both?

Have you declared 192,168.1/24 as a l ocal network in the Asterisk daemon cnfiguration?

How have you configured the phones on 192.168.1/24 to cope with NAT?

What NAT traversal options have you set for the phones on 192.168.1/24?

Which is the one way?

Generally, though having two layers of NAT is asking for trouble.

We use SIP for trunks and pjsip for extension and the adress are the same for media and signaling.

We haven’t declared the 192.168.1/24 has local network. Should we have did it? (also with 10.x.x.x?)

The two ip phone are different, one budgetone and one SPA and should works with nat.

The one way means that:

  • if the call start from LAN 10.x to 192.168 (from external or from one extension) the audio is fine (bi-directional)
  • if the call start from LAN 192.168 to 10.x the audio is one way and the callers hear the audio but the called (on 10.x) not (only silence)

The problem should be that:

  • When the LAN 192.168 extension call, the RTP stream start from the Asterisk server.
  • the router B change the source IP address and the port with the “wan” values but the caller extension send the RTP packets to the ports wrote on the INVITE message (that are closed).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.