VOIP NAT

本文详细介绍了SIP协议与IAX2协议在网络电话系统中的应用及配置方法。针对SIP协议,需要设置5060端口用于指令传输,并开放10000-20000端口用于语音流;而IAX2协议则通过单一的4569端口同时传输指令和媒体流。此外,还提供了具体的配置步骤和注意事项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

 

Voip-info.org: NAT and VOIP

Voip-info.org: Asterisk, SIP and NAT

SIP协议,采用5060端口来传递指令,10000-20000传递语音流,所有如果SIP客户端在防火墙或者内网就需要开放相应的端口,来通讯。

From Voip-info.org

On your router NAT/firewall, forward SIP ports 5060 - 5082 and RTP ports 8000 - 20000 to your * server IP address. Then edit the "rtpstart" value in rtp.conf - from rtpstart=10000 to rtpstart=8000 since 8000 is the default RTP port on x-lite phones. Also enter the same externip=xxx.xxx.xxx.xxx and localnet=xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx info from your sip.conf general settings into sip_nat.conf. Then in sip.conf under the remote extension account authentication settings add nat=yes, canreinvite=no . This should get it working flawlessly, it did it for me after much research and troubleshooting. This should mark the end of NAT/firewall issues with asterisk.


NOTE: Your WAN or externip address from your ISP is usually not permanent so in the case where it changes you will have to edit the "externip=" value in sip.conf general settings and sip_nat.conf to the new value or you can register with dynamic DNS (dyndns) to automaticaly update the value.

 

IAX2协议指令和媒体流都通过4569端口来传递,穿透能力比较强。

Voip-info.org: Asterisk NAT=yes documentation (sip.conf)

Voip-info.org: STUN

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值