1

我在本地机器上的 Oracle VirtualBox 中运行 Mobicents 媒体服务器和 Restcomm。拨打 1234 时出现以下错误。

2015-06-24 14:47:50,231 INFO [MGCP] (Thread-2) tx=147483653 开始,消息= CRCX mobicents/bridge/$@192.168.1.122:2427,呼叫代理 = /192.168.1.122:2727
2015-06-24 14:47:50,238 INFO [UdpManager] (Thread-1) 尝试绑定 192.168.1.122:65534 失败
2015-06-24 14:47:50,244 INFO [RtpConnectionImpl] (Thread-1) FormatsRTPFormats{0 AudioFormat[PCMU,8000,8,mono],8 AudioFormat[PCMA,8000,8,mono],101 AudioFormat[telephone-事件,8000,单声道],93 音频格式[Speex,16000,单声道]}
2015-06-24 14:47:50,256 INFO [MGCP] (Thread-2) tx=147483653 已正常执行
2015-06-24 14:47:50,414 INFO [MGCP] (Thread-1) tx=147483654 开始,消息= CRCX mobicents/bridge/1@192.168.1.122:2427,呼叫代理 = /192.168.1.122:2727
2015-06-24 14:47:50,425 INFO [MGCP] (Thread-2) tx=147483654 已正常执行
2015-06-24 14:47:50,433 INFO [MGCP] (Thread-1) tx=147483655 开始,消息= MDCX mobicents/ivr/1@192.168.1.122:2427,呼叫代理 = /192.168.1.122:2727
2015-06-24 14:47:50,447 INFO [MGCP] (Thread-1) tx=147483655 已正常执行
2015-06-24 14:47:50,533 INFO [MGCP] (Thread-1) tx=147483656 开始,消息= RQNT mobicents/ivr/1@192.168.1.122:2427,呼叫代理 = /192.168.1.122:2727
2015-06-24 14:47:50,557 INFO [Play] (Thread-1) (mobicents/ivr/1) 开始公告 (segment=0)
2015-06-24 14:47:50,598 错误 [AudioPlayerImpl] (Thread-1) (mobicents/ivr/1) 发生错误
java.io.FileNotFoundException: http://192.168.1.122:8080/restcomm/cache/ACae6e420f425248d6a26948c17a9e2acf/c5fd1f13812a7d11cd9072b5a7c1d3455265a5724094920f9629f4feb941cv1
    在 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1624)
    在 java.net.URL.openStream(URL.java:1037)
    在 org.mobicents.media.server.impl.resource.mediaplayer.audio.wav.WavTrackImpl.(WavTrackImpl.java:74)
    在 org.mobicents.media.server.impl.resource.mediaplayer.audio.AudioPlayerImpl.setURL(AudioPlayerImpl.java:150)
    在 org.mobicents.media.server.mgcp.pkg.au.Play.startAnnouncementPhase(Play.java:116)
    在 org.mobicents.media.server.mgcp.pkg.au.Play.execute(Play.java:109)
    在 org.mobicents.media.server.mgcp.controller.Request.execute(Request.java:142)
    在 org.mobicents.media.server.mgcp.tx.cmd.NotificationRequestCmd$Executor.perform(NotificationRequestCmd.java:213)
    在 org.mobicents.media.server.scheduler.Task.run(Task.java:122)
    在 org.mobicents.media.server.scheduler.Scheduler$WorkerThread.run(Scheduler.java:420)
2015-06-24 14:47:50,599 INFO [Play] (Thread-1) 找不到接收到的 URL,触发
2015-06-24 14:47:50,603 INFO [MGCP] (Thread-1) tx=147483656 已正常执行
2015-06-24 14:47:50,873 INFO [JitterBuffer] (Thread-2) 格式已更改:0 AudioFormat[pcmu,8000,8,mono]
2015-06-24 14:47:58,193 INFO [MGCP] (Thread-1) tx=147483657 已启动,消息= DLCX mobicents/bridge/1@192.168.1.122:2427,呼叫代理 = /192.168.1.122:2727

restcomm.conf 如下:

# Network configuration
NET_INTERFACE=eth0
PRIVATE_IP=192.168.1.122
SUBNET_MASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST_ADDRESS=192.168.1.255
# PUBLIC IP ADDRESS
STATIC_ADDRESS=192.168.1.122

媒体服务器配置如下:

<!-- Network interfaces definition -->
    <bean name="localhost" class="org.mobicents.media.server.io.network.UdpManager">
        <constructor>
            <parameter><inject bean="Scheduler"/></parameter>
        </constructor>
        <property name="bindAddress">192.168.1.122</property>
        <property name="localBindAddress">192.168.1.122</property>
        <property name="localNetwork">192.168.1.0</property>
        <property name="localSubnet">255.255.255.0</property>
        <property name="useSbc">true</property>
        <property name="rtpTimeout">0</property>
    </bean>

restcomm.xml 配置是,

<!-- The location where the audio prompts are located. -->
        <prompts-uri>http://192.168.1.122:8080/restcomm/audio</prompts-uri>

        <!-- Cache settings. -->
        <cache-path>${restcomm:home}/cache</cache-path>
        <cache-uri>http://192.168.1.122:8080/restcomm/cache</cache-uri>


        <!-- The path where recordings made by the <Record> verb are stored. -->
        <recordings-path>file://${restcomm:home}/recordings</recordings-path>
        <recordings-uri>http://192.168.1.122:8080/restcomm/recordings</recordings-uri>

        <!-- The URL to the errors dictionary. -->
        <error-dictionary-uri>http://192.168.1.122:8080/restcomm/errors</error-dictionary-uri>

        <!-- The IP to use for out-bound SIP REGISTER requests. This is useful
            when you want to report a different IP than the one RestComm picked by default. -->
        <external-ip>192.168.1.122</external-ip>
4

1 回答 1

1
  1. 请检查缓存文件是否存在:$RESTCOMM_HOME/standalone/deployments/restcomm.war/cache/ACae6e420f425248d6a26948c17a9e2acf/c5fd1f13812a7d11cd9072b5a7c1d3455265a5724094920f929f4feb941c1061。
  2. 检查 Restcomm 是否绑定到 192.168.1.122:8080
  3. 检查没有防火墙阻止 192.168.1.122:8080

尽管您提供的来自 MMS 的日志只是此调用实际日志的一小部分,但我认为问题在于本地端口 65534 不是免费的。

INFO [UdpManager] (Thread-2) Failed trying to bind 192.168.226.245:65534

此时 MMS 正在尝试将 RTP 端口 65534 绑定到 192.168.226.245。

我建议您停止 Restcomm/MMS - 运行ps -ef | grep java以确保 Restcomm/MMS 实际停止 - 然后重新启动并检查 netstat -anp | grep 65534端口是否繁忙以及拥有此端口的进程是什么。

如果这没有帮助,请提供 pcap 文件 (tcpdump -i any -w YOUR_FILE.pcap) 并完成 Restcomm 和 MMS 日志文件(确保在测试调用之前删除旧日志)。

乔治

于 2015-06-24T14:28:17.550 回答