Asterisk在特定的WIFI网络上听不到声音

时间:2014-05-03 10:30:15

标签: wifi sip asterisk 3g 4g

Asterisk 11无法在特定的WIFI网络上传送来电和被叫语音。

WIFI手机==> 4G LTE手机(可以听到声音/工作)

== Using SIP RTP CoS mark 5
-- Called SIP/01036504100
-- SIP/01036504100-00000594 is ringing
-- SIP/01036504100-00000594 answered SIP/01010001004-00000593
-- Locally bridging SIP/01010001004-00000593 and SIP/01036504100-00000594
   > 0x7f5a401b6800 -- Probation passed - setting RTP source address to 1XX.63.12.134:7076
   > 0x7f5a401b6800 -- Probation passed - setting RTP source address to 1XX.63.12.134:7076
   > 0x7f5a3800bf90 -- Probation passed - setting RTP source address to 2XX.62.163.73:51658

3G手机==> 4G LTE手机(可以听到声音/工作)

== Using SIP RTP CoS mark 5
-- Called SIP/01088143268
-- SIP/01088143268-00000596 is ringing
-- SIP/01088143268-00000596 answered SIP/01036504100-00000595
-- Remotely bridging SIP/01036504100-00000595 and SIP/01088143268-00000596
   > 0x7f5a3800bf90 -- Probation passed - setting RTP source address to 3X.7.29.226:2779
   > 0x7f5a40017050 -- Probation passed - setting RTP source address to 2XX.62.163.73:51944
   > 0x7f5a3800bf90 -- Probation passed - setting RTP source address to 3X.7.29.226:2779

另一部WIFI手机==> 4G LTE手机(听不到声音/不工作)

== Using SIP RTP CoS mark 5
-- Called SIP/01036504100
-- SIP/01036504100-00000598 is ringing
-- SIP/01036504100-00000598 answered SIP/01088143268-00000597
-- Remotely bridging SIP/01088143268-00000597 and SIP/01036504100-00000598
   > 0x7f5a40116470 -- Probation passed - setting RTP source address to 5X.237.58.102:7076
   > 0x7f5a40116470 -- Probation passed - setting RTP source address to 5X.237.58.102:7076
   > 0x7f5a38027a20 -- Probation passed - setting RTP source address to 2XX.62.163.73:52040
   > 0x7f5a38027a20 -- Probation passed - setting RTP source address to 2XX.62.163.73:52040

我想也许我只打开10,000到20,000之间的UDP。但是,我错了。 asterisk -rvvvvv并没有告诉我这是什么问题。

2 个答案:

答案 0 :(得分:2)

打开控制台上的SIP和RTP调试日志:sip set debug onrtp set debug on

通过这种方式,您可以找出RTP音频流的哪一段不会到达应有的位置。这主要是由NAT问题引起的(请参阅sip.conf的NAT部分。

如果您无法看到来自手机的传入RTP数据包,那么可能是防火墙阻止了流量,或者存在NAT问题。

答案 1 :(得分:1)

我将用户的nat值更改为“force_rport,comedia”,现在两个用户都可以听到声音。

nat=force_rport,comedia

奇怪,nat = yes和nat = force_rport,comdia应该是相同的,但第二个正在研究Asteirks 11。