bensari / mediaserver

Automatically exported from code.google.com/p/mediaserver
1 stars 0 forks source link

playing GSM file #127

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
0. added GSM codec to Mobicents Media Server configuration
1. connect to an IVR Endpoint using mgcp-demo project (IVRSbb)
2. set the announcement URL (http://.../file.gsm) to a GSM file with .gsm 
extension in IVRSbb
3. call 2010 from a sip phone with GSM codec. 

What is the expected output? What do you see instead?
I'm getting the following error:
16:35:15,107 DEBUG [MgcpProvider] Receive  message 286 bytes length
16:35:15,113 DEBUG [MgcpProvider] Parsing message: CRCX 412631099 
mobicents/ivr/$@192.168.135.129:2427 MGCP 1.0
C: 1
M: sendrecv

v=0
o=Zoiper_user 0 0 IN IP4 192.168.135.1
s=Zoiper_session
c=IN IP4 192.168.135.1
t=0 0
m=audio 8000 RTP/AVP 3 101
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

16:35:15,113 DEBUG [MgcpProvider] Dispatching message
16:35:15,137 INFO  [MGCP] tx=412631099 Started, message= CRCX 
mobicents/ivr/$@192.168.135.129:2427, call agent = /192.168.135.1:2727
16:35:15,137 DEBUG [EndpointQueue] Endpoint mobicents/ivr/1 taken
16:35:15,138 DEBUG [EndpointQueue] Free endpoints 4
16:35:15,138 DEBUG [ResourcesPool] Allocated new rtp connection,pool 
size:10,free:9
16:35:15,139 DEBUG [ResourcesPool] Allocated new dtmf detector,pool 
size:5,free:4
16:35:15,141 INFO  [RtpConnectionImpl] Formats from SDP : RTPFormats{3 
AudioFormat[GSM,8000,mono],101 AudioFormat[telephone-event,8000,mono]}
16:35:15,141 INFO  [RtpConnectionImpl] Server Formats : RTPFormats{97 
AudioFormat[l16,8000,16,mono],8 AudioFormat[pcma,8000,8,mono],0 
AudioFormat[pcmu,8000,8,mono],18 AudioFormat[g729,8000,mono],3 
AudioFormat[gsm,8000,mono],101 AudioFormat[telephone-event,8000,mono]}
16:35:15,143 INFO  [MGCP] tx=412631099 was executed normaly
16:35:15,206 DEBUG [MgcpProvider] Receive  message 323 bytes length
16:35:15,206 DEBUG [MgcpProvider] Parsing message: RQNT 412631100 
mobicents/ivr/1@192.168.135.129:2427  MGCP 1.0
N:192.168.135.1@192.168.135.1:2727
X:1
S:AU/pa(an=http://192.168.135.1:8080/mgcpdemo/audio/RQNT-GSM.gsm it=10)
R:AU/oc (N),AU/of (N),D/0 (N),D/1 (N),D/2 (N),D/3 (N),D/4 (N),D/5 (N),D/6 
(N),D/7 (N),D/8 (N),D/9 (N),D/A (N),D/B (N),D/C (N),D/D (N),D/* (N),D/# (N)

16:35:15,206 DEBUG [MgcpProvider] Dispatching message
16:35:15,206 INFO  [MGCP] tx=412631100 Started, message= RQNT 
mobicents/ivr/1@192.168.135.129:2427, call agent = /192.168.135.1:2727
16:35:15,226 DEBUG [ResourcesPool] Allocated new player,pool size:20,free:19
16:35:15,234 INFO  [Play] (mobicents/ivr/1) Start announcement (segment=0)
16:35:15,376 ERROR [AudioPlayerImpl] (mobicents/ivr/1) error occured
java.io.IOException: mark/reset not supported
        at sun.net.www.http.KeepAliveStream.reset(KeepAliveStream.java:129)
        at java.io.FilterInputStream.reset(FilterInputStream.java:217)
        at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.reset(HttpURLConnection.java:2556)
        at org.tritonus.share.sampled.file.TAudioFileReader.getAudioInputStream(TAudioFileReader.java:325)
        at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1111)
        at org.mobicents.media.server.impl.resource.mediaplayer.audio.gsm.GsmTrackImpl.<init>(GsmTrackImpl.java:64)
        at org.mobicents.media.server.impl.resource.mediaplayer.audio.AudioPlayerImpl.setURL(AudioPlayerImpl.java:152)
        at org.mobicents.media.server.mgcp.pkg.au.Play.startAnnouncementPhase(Play.java:116)
        at org.mobicents.media.server.mgcp.pkg.au.Play.execute(Play.java:109)
        at org.mobicents.media.server.mgcp.controller.Request.execute(Request.java:142)
        at org.mobicents.media.server.mgcp.tx.cmd.NotificationRequestCmd$Executor.perform(NotificationRequestCmd.java:213)
        at org.mobicents.media.server.scheduler.Task.run(Task.java:122)
        at org.mobicents.media.server.scheduler.Scheduler$WorkerThread.run(Scheduler.java:420)
16:35:15,377 INFO  [Play] Received URL can not be found , firing of
16:35:15,380 INFO  [MGCP] tx=412631100 was executed normaly

What version of the product are you using? On what operating system?
3.0.0.FINAL on centOS 6.2

Original issue reported on code.google.com by florea.s...@gmail.com on 19 Jun 2013 at 2:36

GoogleCodeExporter commented 9 years ago
Should use BufferedInputStream to resolve :
http://stackoverflow.com/questions/5529754/java-io-ioexception-mark-reset-not-su
pported

Original comment by oifa.yul...@gmail.com on 20 Jun 2013 at 11:48