从Asterisk服务器播放文件时没有声音和RTP失败

时间:2019-04-16 14:50:40

标签: asterisk sip rtp

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

我认为问题与服务器实例的公共和私有IP问题有关,因此我在实例上具有xxxx的公共ip和yyyy的私有ip,电话在xxxx上注册到服务器,并且可以拨号分机,现在有了一些NAT更改,我可以听到和听到电话与电话之间的对话,但它们不会在通话结束时挂断,而且,如果从服务器播放文件,声音也不会挂断。打电话。

我已经尝试过在防火墙强制关闭并且实例上打开所有流量所有端口的情况下使用它,因此我认为它不会解决前壁或NAT问题,我认为这与内部和外部IP有所不同或可能有关实例上的RTP协议端口未设置在某处

手机显示它们正在连接,但是RTP协议失败了(当我希望它显示公共IP x.x.x.x时,它显示如下所示的y.y.y.y 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 '3ca4381a658c7f5f2cee3d8c02acb2a7@172.31.29.187:5060'. Giving up.

1 个答案:

答案 0 :(得分:0)

如果其他人遇到此类问题,则是编解码器和防火墙问题,一旦打开了服务器上的RTP端口(在传入的EC2实例中,请确保TCP和UDP与RTP中的RTP起点和终点匹配) .conf)

在星号CLI中,将详细程度设置为3或更高,然后开始SIP调试(您可以在config.conf或CLI中进行此操作)

我在通话中返回了以下内容

Fatal Exception: md5bcaacea39e485ed8e3d7f0e2edda77a7.MonoExceptionHelper: (NullReferenceException) Object reference not set to an instance of an object
   at md8340a283ba8745f8993ee3dff35d08f0.MyActivity.n_onCreate(MyActivity.java)
   at md8340a283ba8745f8993ee3dff35d08f0.MyActivity.onCreate(MyActivity.java:29)
   at android.app.Activity.performCreate(Activity.java:7183)
   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
   at android.app.ActivityThread.-wrap11(Unknown Source)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
   at android.os.Handler.dispatchMessage(Handler.java:105)
   at android.os.Looper.loop(Looper.java:164)
   at android.app.ActivityThread.main(ActivityThread.java:6944)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

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

问题在于,我的新安装中didnotint获得了G729许可证,因此未安装任何编解码器,我只是在sip.conf文件中禁用了该编解码器。