[asterisk-users] IAX to work on two ports: 4569 and 4570

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Fri Jul 25 11:17:43 CDT 2008


On Friday 25 July 2008 10:58:28 bilal ghayyad wrote:
> The reason that I need to do this is:
>
> I will have two Asterisk PBX's, and I need both of them to use same
> Internet (so both of them will be behind NAT under same DSL router), in
> that case, how I will distinguish on the router the calls that need to be
> send for box A and the calls that need to send for box B?
>
> Asterisk C will be in remote side, and will communicate with Asterisk A and
> B, so I was look to have two ports on for IAX to be running on Asterisk C,
> for example: 4569 and 4570, so when box C need to talk with box A, then it
> sends via 4569 and when it needs to talk with box B then it sends via 4570
> port, and DSL router does the routing based on these ports.
>
> Is there any other solution?

Oh, for outbound traffic, you don't need to define other ports.  Simply
forward port 4570 on your router to port 4569 on Asterisk B.  Remember that
unlike SIP, IAX2 does not encode the port number into the protocol, so it'll
work perfectly fine this way.

If you're bound and determined to listen to port 4570 on Asterisk B, you still
don't need to listen on two ports on Asterisk C.  Just leave off the port
number in iax.conf the specification for Asterisk C on box B.  Likewise on
Asterisk C, define the specification for Asterisk B to use port=4570.

There is no need for port numbers to be the same on both machines when talking
IAX.

-- 
Tilghman



More information about the asterisk-users mailing list