从Asterisk Server播放文件时没有声音和RTP失败

问题描述 投票:-1回答:1

我最近在AWS EC2实例上安装了我的第一个Asterisk并遇到了一些小问题,目前手机没有收到挂断指令,也没有从服务器播放文件时发出声音。

我认为这个问题与服务器实例的公共和私有IP问题有关,所以我在实例上有一个xxxx的公共ip和yyyy的私有ip,电话在xxxx上注册到服务器并且可以拨打扩展和现在有了一些NAT改动,我可以听到并通过电话和电话交谈,他们不会在通话结束时挂机,如果从服务器播放文件没有声音,也没有在通话结束时挂机。

我试过防火墙强制关闭和所有交通所有端口在实例上打开所以我不认为它的前壁或NAT问题如此解决这些问题,我认为它与内部和外部IP不同或者可能是RTP协议实例上的端口未设置到某处

手机显示它们正在连接,但随后RTP协议失败(当我希望它显示公共IP x.x.x.x时,它显示y.y.y.y iternal ip如下所示

16/4/2019 15:30:06 [NOTICE] PHN: TPL: Socket 364 idle/connect timeout
16/4/2019 15:30:10 [ERROR ] PHN: SIP: transaction_timeout udp: 1001331 (32000)
16/4/2019 15:30:10 [ERROR ] PHN: SIP: transport error: 1001331 -> udp:y.y.y.y:5060
16/4/2019 15:30:10 [NOTICE] PHN: SIP: Add dirty host: udp:y.y.y.y:5060 (0 sec)
16/4/2019 15:30:10 [NOTICE] PHN: SIP: final transport error: 1001331 -> udp:y.y.y.y:5060
16/4/2019 15:30:10 [ERROR ] PHN: SIP: transport error 1001331: generating fake 599
16/4/2019 15:30:10 [NOTICE] MEDIA: MediaIpc::rtpClose: RP72
16/4/2019 15:30:10 [NOTICE] MEDIA: MediaIpc::rtpClose: RC72
16/4/2019 15:30:12 [WARN  ] PHN: SIP: process_registrar_packet: 401 needs 128 bit nonce
16/4/2019 15:30:12 [NOTICE] PHN: SIP: process auth:Match challenge for user=WB001, realm=asterisk
16/4/2019 15:30:12 [NOTICE] PHN: RTP: set_destination RP73 adr=y.y.y.y:19684
16/4/2019 15:30:12 [WARN  ] MEDIA: CallStats: 2156890680 not found

服务器显示以下日志..

  == Using SIP RTP CoS mark 5
-- Executing [200@LocalSets:1] Answer("SIP/WB001-00000015", "") in new stack
-- Executing [200@LocalSets:2] Playback("SIP/WB001-00000015", "hello-world") in new stack
-- <SIP/WB001-00000015> Playing 'hello-world.gsm' (language 'en')
-- Executing [200@LocalSets:3] Hangup("SIP/WB001-00000015", "") in new stack
  == Spawn extension (LocalSets, 200, 3) exited non-zero on 'SIP/WB001-00000015'
[Apr 16 15:30:45] WARNING[13228]: chan_sip.c:4119 retrans_pkt: 
Retransmission timeout reached on transmission f2e6b55c11ce-zqpp4q4dbedu for seqno 2 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 31998ms with no response
  == Using SIP RTP CoS mark 5
 -- Executing [101@LocalSets:1] Dial("SIP/WB001-00000016", "SIP/WB002") in new stack
  == Using SIP RTP CoS mark 5
-- Called SIP/WB002
-- SIP/WB002-00000017 is ringing
-- SIP/WB002-00000017 is ringing
-- SIP/WB002-00000017 answered SIP/WB001-00000016
-- Channel SIP/WB002-00000017 joined 'simple_bridge' basic-bridge <87c7a794-f9e6-4488-8957-9c0db9e0234f>
-- Channel SIP/WB001-00000016 joined 'simple_bridge' basic-bridge <87c7a794-f9e6-4488-8957-9c0db9e0234f>
[Apr 16 15:32:14] WARNING[13228]: chan_sip.c:4119 retrans_pkt: Retransmission timeout reached on transmission 49e7b55c4a45-rd1is68l1q0a for seqno 2 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
 [Apr 16 15:32:14] WARNING[13228]: chan_sip.c:4143 retrans_pkt: Hanging up call 49e7b55c4a45-rd1is68l1q0a - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
-- Channel SIP/WB001-00000016 left 'native_rtp' basic-bridge <87c7a794-f9e6-4488-8957-9c0db9e0234f>
  == Spawn extension (LocalSets, 101, 1) exited non-zero on 'SIP/WB001-00000016'
-- Channel SIP/WB002-00000017 left 'native_rtp' basic-bridge <87c7a794-f9e6-4488-8957-9c0db9e0234f>
[Apr 16 15:32:14] WARNING[13228][C-00000011]: chan_sip.c:24312 handle_response_invite: Re-invite to non-existing call leg on other UA. SIP dialog '[email protected]:5060'. Giving up.
asterisk sip rtp
1个回答
0
投票

如果有其他人遇到这种类型的问题,那就是编解码器和防火墙问题,一旦打开服务器上的RTP端口(在进入的EC2实例中确保TCP和UDP匹配RTP.conf中的RTP开始和结束点)

在asterisk CLI中,将详细程度设置为3或更多并启动SIP调试(您可以在config.conf或CLI中执行此操作)

我在电话中回复了以下内容

== Using SIP RTP CoS mark 5
-- Executing [200@LocalSets:1] Answer("SIP/WB001-00000000", "") in new stack
-- Executing [200@LocalSets:2] Playback("SIP/WB001-00000000", "hello-world") in new stack
[Apr 18 12:32:02] WARNING[3055][C-00000001]: channel.c:5579 set_format: Unable to find a codec translation path: (gsm) -> (g729)
[Apr 18 12:32:02] WARNING[3055][C-00000001]: file.c:1252 ast_streamfile: Unable to open hello-world (format (g729)): No such file or directory
[Apr 18 12:32:02] WARNING[3055][C-00000001]: app_playback.c:492 playback_exec: Playback failed on SIP/WB001-00000000 for hello-world
-- Executing [200@LocalSets:3] Hangup("SIP/WB001-00000000", "") in new stack
  == Spawn extension (LocalSets, 200, 3) exited non-zero on 'SIP/WB001-00000000'
[Apr 18 12:32:34] WARNING[1334]: chan_sip.c:4119 retrans_pkt: Retransmission timeout reached on transmission 3160b85c0cbe-bx3kp12qqxec for seqno 2 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions

数据包在32001ms后超时,没有响应

问题是新安装我没有安装G729许可的sono编解码器,我只是在sip.conf文件中解析了这个编解码器。

© www.soinside.com 2019 - 2024. All rights reserved.