Question About Using Internal (for phones) And External (for SIP trunks) Interfaces.

4 posts / 0 new
Last post
phil.872001
phil.872001's picture
Question About Using Internal (for phones) And External (for SIP trunks) Interfaces.

Attempting to setup a FreePBX v2.8.1.4 server and have some topology questions.

Router1 interfaces (Dual WAN Zywall Router):
WAN1 IP = 65.175.x.x Cable Modem
WAN2 IP = 64.223.x.x DSL Modem
VNET1 = 192.168.1.1

Router2 interfaces (Cisco 1721):
WAN = 192.168.1.2
LAN = 220.220.220.1

So in a nutshell i have a primary router with two external IP addresses which NATs to a second router i then have all of my PC's connected to the internal interface of the second router. what i want to do is run FreePBX with an external interface and an internal interface. The external interface should reside on the 192.168.1.x network by connecting it to a VLAN1 configured port on router1 (between the routers so that the SIP trunk traffic is not passing over my second router). The internal interface should be on the 220.220.220.x network in order to provide a connection to all of my SIP phones and soft phones on the PC's. With this setup no VoIP traffic should be passing over router2 at any point.

To simplify things for now i have forced all SIP traffic over the DSL connection and left the cable modem connection out of the mix so that we are only dealing with a single external IP (64.223.x.x).

Is this a viable configuration?
From what i have been able to dig up this will not work since i can only bind SIP to a single address, is that a correct statement?

I have some more questions but lets start with this since it will dictate which of my other questions still apply.

Thank you,
Phil

SkykingOH
SkykingOH's picture
Quote: From what i have been

Quote:
From what i have been able to dig up this will not work since i can only bind SIP to a single address, is that a correct statement?

Asterisk will listen on all connected interfaces for SIP. It's a NAT issue. You can only specify a single externip.

phil.872001
phil.872001's picture
I understand only a single

I understand only a single external IP can be specified which means I can't use the second WAN connection without a dynamic DNS service.

So I should be able to connect a phone from any network listed within the "localnet" specified networks?

I have the following lines in my sip_general_additional.conf file:

nat=yes
externip=64.223.**.** (the IP address of my DSL connection)
localnet=220.220.220.0/255.255.255.0 (inside network where phones are)
localnet=192.168.2.0/255.255.255.0 (network between router1 and router2)

phones are working and i can dial from one extension to another.

i pointed my inbound route to an extention (tried voicemail too) but when calling all i hear is ringing, a packet capture from router1 shows the SIP invites coming from my provider and being forwarded to 192.168.2.3 but i don't see anything being returned.

SkykingOH
SkykingOH's picture
Your externip and localnet

Your externip and localnet are correct.