我在本地机器上的 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>