Connect IAX trunk to test server behind NAT with existing PBX using SIP port

Hi,

I have just installed freepbx on ubuntu precise which I plan to use to replace our existing trixbox.

For testing purposes how would I go about pointing one of our existing IAX trunk numbers to our new freepbx. The complication is that we have one external ip address and are already forwarding the sip port to trixbox behind our nat firewall.

I spoke to our voip provider Gradwell and although they confirmed this was possible the guy I was talking to had no idea how to sort.

Any help would be appreciated.

Thanks,

Chris

Hi

If i understand you correctly;;

You have to do something called PAT or port address translation. Do not do one-to-one nat. MOST if not all firewalls support PAT.

With pat you can do this, taking for example, my live IP is 8.8.8.8

Your existing server can be;
8.8.8.8 --> PAT UDP5060 —> Svr1 UDP5060
8.8.8.8 --> PAT RTP10000-20000 --> Svr1 RTP10000-20000

You new server could then be setup like this;
8.8.8.8 --> PAT IAX4569 —> Svr2 UDP4569

Also, it is possible to translate SIP too to the new server like this, you just need to ensure the external port is not using 5060 (since already used for svr1)

8.8.8.8 --> PAT SIP6060 --> Svr2 UDP5060
8.8.8.8 --> PAT RTP20000-30000 --> Svr2 RTP20000-30000
** For the above to work, you must tell your ISP/provider to connect to your secondary server SIP at 6060 and also change the RTP port range on Asterisk to be other than the default 10000-20000 (since already used on Svr1)

Apologies, I realize I have confused the issue due to my lack of understanding.

What I am really asking is can I get an IAX incoming trunk to come in on a port other than 4569, say 4570. So I can then redirect 4570 to my test server?

Many thanks,

Chris