返回列表 發帖

【角色茶桌】—— Multiple Asterisk Servers Behind A Router

本帖最後由 角色 於 2011-9-29 09:54 編輯

如果单一Asterisk,坊间已经有很多examples怎样set,但是多了,真的不知道是否set得正确,所以特意开这幅帖子,集中讨论,然后我把大家的心得多好好的整理,那么大家以后起多余一个Asterisk Servers时就有一个非常重要的根据地了。

角色

本帖最後由 角色 於 2011-9-29 11:42 編輯

Multiple Asterisk Servers Configuration 1.gif

上面只是一个说明,除了第一个Asterisk Server A是标准的settings,其他都是没有经过详细核实。

TOP

本帖最後由 角色 於 2011-10-5 07:25 編輯

问题: 用5228 TCP Port注册不成功? 答案
问题: 用SPA IP Phone注册可以(例如ext 2001),但是在Asterisk Server看到ext 2001 unreachable 答案

TOP

對於一般 Router 而言,這樣的架構必須每一個 Asterisk 都有獨立的 public IP,然後將 Asterisk 會用到 SIP & RTP port 互相分開,如此應該也是可行。
OSSLab Blog :: VoIP & IT Consultant

TOP

谢谢alang兄的意见,我补充一下,SIP和RTP port是UDP port,而不是TCP port。

角色

TOP

回復 4# alang

如果用commercial router, 有獨立public IP 的話,基本上唔需要改SIP and RTP ports

TOP

我知道大家会有不同的Asterisk severs在router后面,那么你事怎样处理呢?

角色

TOP

本帖最後由 ckleea 於 2011-10-1 13:37 編輯

Let me check my router and get back. There is a way to do direct Public ip binding to internal ip. Now I am working in different way.

TOP

Here is my router WAN mode

WAN Mode
The WAN mode page allows you to configure how your router should use your external Internet connections, for example your WAN1 and WAN2 port connections.
NAT is a technique which allows several computers on a LAN to share an Internet connection. The computers on the LAN use a "private" IP address range while the WAN port on the router is configured with a single "public" IP address.
Along with connection sharing, NAT also hides internal IP addresses from the computers on the Internet.
NAT (Network Address Translation)
Select NAT if your ISP has assigned only one IP address to you. The computers that connect through the router will need to be assigned IP addresses from a private subnet (example: 192.168.1.0). If your ISP has assigned an IP address for each of the computers that you use, select Classic Routing.
Note: The router will delete all inbound firewall rules when switching between NAT and Classic Routing.

Load Balancing Settings
These options allow you to configure the router to balance internet traffic across all of the configured WAN ports, or to use a redundant ISP link for backup purposes.
Select Load Balancing mode to distribute your internet load among configured ISP's simultaneously. The active WAN interfaces (at least 2) will carry data for the protocols that are bound to them. Protocol bindings can be specified in the Protocol Bindings menu. For example, if the HTTP protocol is bound to WAN1 and FTP protocol is bound to WAN3, then the router will automatically channel FTP data from and to the computers on the LAN through the WAN3 port. All HTTP traffic will be routed through the WAN1 port. This feature can be used to segregate traffic between links that are not of the same speed. High volume traffic can be routed through a port connected to a high speed link and low volume traffic can be routed through a different port connected to the slow link. When the router is configured in Load Balancing Mode, it checks the connection of both the links at regular intervals to detect its status. If WAN is configured for Idle Timeout, then Load Balancing Mode is not applicable.
This device supports Weighted Load Balancing (LB), where balance weights are calculated based on WAN link speed and available WAN bandwidth. This is the default and most efficient balancing algorithm. With Round-robin load balancing, new traffic connections are sent over a WAN link in a serial method irrespective of bandwidth or link speed. For example if WAN1, WAN2, and WAN3 are active in round-robin load balancing, a HTTP request will first be sent over WAN1, and then a new FTP session will start on WAN2, and then any new connection to the internet will be made on WAN3. This method ensure that any one WAN will not have a disproportionate distribution of sessions over that single link.
Primary WAN mode should be used when load balancing is not required, and all internet traffic should be sent over the selected primary WAN (choose between WAN1 to WAN4). Enable Auto Rollover to use a single WAN for all internet connectivity until a failure on that link is detected. Once a failure on the primary WAN link is detected, all active connections to the internet will be rolled over to the selected secondary WAN port.
Note: If Auto Rollover mode is selected, you must configure the primary WAN port's Failure Detection Method, located in the WAN Advanced Options page.
Note: IPsec VPN policies will be rolled over in both Load balancing and failover mode.

TOP

Could you please simplify the discussion and let us have a look at your configuration?

YH

TOP

If you have a commercial router or one that allows direct binding of public IP to internal asterisk server, then you do not need port forward. All default SIP, IAX, RTP ports can be used for the asterisk.

However, if you can use only NAT mode, then multiple asterisk servers can only be accessible by having different SIP, IAX, RTP ports for each server. Adjustment of the settings are required to ensure the servers are accessible and functional.

TOP

Last time I had problem in connecting with my Intel ATOM-based Asterisk server. I do not know whether the problem came from the setting for type, which I mistyped as typp. I will check it on Monday morning to see any improvement if I changed it to type.

Anyway, whatever configurations are appreciated.

YH

TOP

是我搞混了,有多個 public IP 就不需要分開 port。
OSSLab Blog :: VoIP & IT Consultant

TOP

Not your fault. Sometimes, we also mix up the wan mode and number of IPs we have.
BTW, did you implement cdr-stats in your system? I saw the information in your website

TOP

原来multiple servers真的点难度,因为以前没有用过Asterisk 1.8,而1.8与1.4是有分别。

真的慢慢做才能成功。

今晚辛苦了bubblestar兄的指导,成功在望。


角色

TOP

返回列表