r****t 发帖数: 10904 | 1 搞了半个星期 one way voice 问题,虽然最后不是 nat 问题,不过却因为这个翻了不
少 voip 和 nat 的帖子,这儿就是个总结。
很多时候 one way voice 问题都和 nat 有关,但是 codec 也有可能是原因(a9). 这
篇笔记里面只讲 nat 问题, ATA 只以 PAP2 为例。
这些是根据
http://www.dslreports.com/forum/remark,22292023?hilite=pap2+nat
http://clanspace.com/forum/r22696108-
====================================================================
要诊断 nat 问题,首先要搞清楚自己设备 (ATA or asterisk) 前面是哪一种 nat, 这
个需要按 RFC 3489 定义的分类做几个 tests 才能知道结果,每个 test 都向某个
stun server 发送些消息然后根据收到的 message 来决定下个 test 是啥,一直到最
后确定结果的 | r****t 发帖数: 10904 | 2 最后,直接 copy/paste 一个 recommended configuration for PAP2:
http://clanspace.com/forum/r22696108-
Here's a more general set of steps to properly set up a PAP2/SPAxxxx type
ATA behind a NAT router, that should work under just about any conditions.
Browse to the ATA's advanced, admin level web configuration. Under the SIP
tab:
1) Record the port number specified by RTP Port Min.
2) Record the port number specified by RTP Port Max.
3) Set Handle VIA received to yes.
4) Set Handle VIA rport to yes.
5) S | p**i 发帖数: 688 | 3 呵呵, 这些设置应该都是为了让asterisk里的分机的canreinvite=yes能work.
我的理解是如果我的ATA登录到asterisk上, 而且分机的canreinvite=no,
then the ATA will never need to talk to outside hosts directly, since all
the packets to the ATA are routed from asterisk
stun or NAT settings may be necessary if the ATA is register itself to an
outside provider (such as gizmo5 or sipgate)
on
【在 r****t 的大作中提到】 : 最后,直接 copy/paste 一个 recommended configuration for PAP2: : http://clanspace.com/forum/r22696108- : Here's a more general set of steps to properly set up a PAP2/SPAxxxx type : ATA behind a NAT router, that should work under just about any conditions. : Browse to the ATA's advanced, admin level web configuration. Under the SIP : tab: : 1) Record the port number specified by RTP Port Min. : 2) Record the port number specified by RTP Port Max. : 3) Set Handle VIA received to yes. : 4) Set Handle VIA rport to yes.
| r****t 发帖数: 10904 | 4 My understanding of canreinvite=yes is that it requires to forward
RTP range to ATA so direct talk can happen.
The simple case you mentioned applys when the ATA and asterisk
are behind a same NAT, but things get more complicated if
they reside behind two different NATs. There the ATA needs to
traverse both of them in order to talk to asterisk. Even under
these situations, most of time by merely having nat=yes only
in asterisk, things will work (of course under canreinite=no).
The notes also expl
【在 p**i 的大作中提到】 : 呵呵, 这些设置应该都是为了让asterisk里的分机的canreinvite=yes能work. : 我的理解是如果我的ATA登录到asterisk上, 而且分机的canreinvite=no, : then the ATA will never need to talk to outside hosts directly, since all : the packets to the ATA are routed from asterisk : stun or NAT settings may be necessary if the ATA is register itself to an : outside provider (such as gizmo5 or sipgate) : : on
| p**i 发帖数: 688 | 5 you are probably right. In my case, ATA can reach asterisk on the same
subnet. Therefore I don't need to tune stun or NAT settings.
all
an
【在 r****t 的大作中提到】 : My understanding of canreinvite=yes is that it requires to forward : RTP range to ATA so direct talk can happen. : The simple case you mentioned applys when the ATA and asterisk : are behind a same NAT, but things get more complicated if : they reside behind two different NATs. There the ATA needs to : traverse both of them in order to talk to asterisk. Even under : these situations, most of time by merely having nat=yes only : in asterisk, things will work (of course under canreinite=no). : The notes also expl
|
|