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

MFH asterisk-admin at hulber.com
Sun Jul 27 14:25:51 CDT 2008


Depending on how smart your router configuration is, you can leave both 
boxes A and B on port 4569 and then just set up two rules on your router:

Port 4569 -> Box A port 4569
Port 4570 -> Box B port 4569

If your router is not complex enough to allow a port mapping such as the 
second line above then you'll need to get box B IAX on port 4570 and I 
think people have described how to do that.


bilal ghayyad wrote:
> Again, I did not understand.
>
> How the router will know if the call that came from Asterisk Box C need to be routed for Asterisk Box A or Asterisk Box B?
>
> Note: Asterisk A and B both behind DSL router, while Asterisk C in remote side, both sides are connected via Internet.
>
>
> Regards
> Bilal
>
> ------------------------------
>
> 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.
>
>   



More information about the asterisk-users mailing list