返回列表 發帖

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

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

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

角色

It depends.  It is not necessary for me to enable stun in Asterisk and other voip devices behind NAT.  If you need to , you may try this one stun.xten.com

TOP

1. I'm testing it from outside and connect back to my home network
2. I don't have any QNAP and my asterisk is run under ubuntu.

I just figured out my Android SIP client (CSIPSimple) need to enable the stun server in order to hear the sound. Any recommendation for the stun server? Thanks.

TOP

Are you testing the Asterisk within the network segment?

What is the model number of QNAP that you using?

YH

TOP

Registered but no sound, my NAT problem?

1. Router set port Forward 7000-7999 (both TCP and UCP)
2. sip.conf
  1. [general]
  2. bindport=7060
  3. [1234]
  4. nat=yes
  5. ...
  6. ...
複製代碼
3. rtp.conf
  1. rtpstart=7900
  2. rtpend=7999
  3. ...
  4. ...
複製代碼
Is there anything I need to set? Thanks!

TOP

It is confirmed that with the revised settings, both SIP signalling and RTP voice packets work perfectly.

YH

TOP

It should work for you

TOP

问题: Asterisk Server B可以注册到,但是内外互打出问题,两边什么声音都听不到。

答案:
1) 我Asterisk Server A的rtp.conf已经更改为10000-10999, 而Server A,已经更改过。而Server B, router都做了port forwarding,如UDP 5228, 11000-11999,分流到Server B IP address。

2) 查找后,发现在router对应Server A的RTP port forwarding 10000-20000, 没有更新,现在更改为10000-10999 (因为没有时间测试,所以不知道这次更改后,是否通话正常?)

角色

TOP

If you do have two public IP addresses, you do not need this port forwarding process.

YH

TOP

I recall I do not need to make this port change when I have two asterisk servers. But I use two public IP.

TOP

回復 16# ckleea

Now I have two servers running at the same time,one is QNAP TS-119 NAS Asterisk and the other is Intel ATOM-based D515 Asterisk. I may add another one IP-01 later. If I have time, I may add one more for testing purpose.

YH

TOP

问题: 用5228 TCP Port注册不成功?

解答:
因为Asterisk default是用UDP port,从TCP更改到UDP port,变成注册。

角色

TOP

问题: 用SPA IP Phone注册可以(例如ext 2001),但是在Asterisk Server看到ext 2001 unreachable

解答:
1) 我的第二台Asterisk server B全用default port 5060,而我利用我的router,做port redirection,从5228 UDP Port转到5060 UDP Port of Asterisk server B IP,于是我可以注册到。

2)但是这个“转动”改动是单向,而不是双向, 所以Asterisk server B能注册,在Asterisk server B想发出UDP packets to IP Phone时,因为router不会把Asterisk server B IP:5060, 往外面转至WAN (IP) Port:5228。

3)在更改Asterisk server B的bindport=5228,和router,用port forwarding,WAN的5228,转到Asterisk server IP的5228,就可以。这个转向是双向的。

4)更改后SPA IP Phone注册后,就可以reachable。


角色

TOP

How many servers you have now?

TOP

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

真的慢慢做才能成功。

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


角色

TOP

返回列表