crash of the media server during call recording

48 views
Skip to first unread message

Laurent Schweizer

unread,
Jan 22, 2014, 3:39:33 AM1/22/14
to sipme-med...@googlegroups.com

Hello,

I have detect diffrent crash of my media server and I see that the 2 last was during call recording.

 any idea ?

BR

Laurent

 

2014-01-22 08:49:13,245 INFO  [Play] (Thread-6) (mobius/ivr/7) Start announcement (segment=11)
 2014-01-22 08:49:16,084 INFO  [AudioPlayerImpl] (Thread-8) (mobius/ivr/7) End of file reached
2014-01-22 08:49:16,084 INFO  [Play] (Thread-8) (mobius/ivr/7) Announcement (segment=11) has completed
2014-01-22 08:49:16,091 INFO  [MGCP] (Thread-8) tx=1389 Started, message= NTFY mobius/ivr/7...@95.128.80.92:2427, call agent = /95.128.80.92:2727
 2014-01-22 08:49:16,092 INFO  [MGCP] (Thread-4) tx=1389 was executed normaly
2014-01-22 08:49:16,124 INFO  [MGCP] (Thread-11) tx=572103307 Started, message= RQNT mobius/ivr/7...@95.128.80.92:2427, call agent = /95.128.80.92:2727
 2014-01-22 08:49:16,144 INFO  [PlayRecord] (Thread-5) (mobius/ivr/7) Prepare digit collect phase
2014-01-22 08:49:16,144 INFO  [PlayRecord] (Thread-5) (mobius/ivr/7) Start prompt phase
2014-01-22 08:49:16,145 INFO  [DtmfBuffer] (Thread-5) (detector) Flush, buffer size: 0
 2014-01-22 08:49:16,145 INFO  [MGCP] (Thread-5) tx=572103307 was executed normaly
2014-01-22 08:49:16,564 INFO  [AudioPlayerImpl] (Thread-12) (mobius/ivr/7) End of file reached
2014-01-22 08:49:16,564 INFO  [PlayRecord] (Thread-12) (mobius/ivr/7) Prompt phase terminated, start collect/record phase
 2014-01-22 08:49:16,704 INFO  [MGCP] (Thread-7) tx=572103308 Started, message= RQNT mobius/ivr/7...@95.128.80.92:2427, call agent = /95.128.80.92:2727
 2014-01-22 08:49:16,704 INFO  [MGCP] (Thread-7) tx=572103309 Started, message= RQNT mobius/ivr/7...@95.128.80.92:2427, call agent = /95.128.80.92:2727
 2014-01-22 08:49:16,704 INFO  [MGCP] (Thread-7) tx=572103310 Started, message= DLCX mobius/ivr/7...@95.128.80.92:2427, call agent = /95.128.80.92:2727
 2014-01-22 08:49:16,705 INFO  [AudioRecorderImpl] (Thread-5) (mobius/ivr/7) !!!!!!!!!! Writting to file......................
2014-01-22 08:49:16,705 ERROR [MGCP] (Thread-5) tx=572103308 Failed
java.lang.NullPointerException
         at ua.mobius.media.server.impl.resource.audio.AudioRecorderImpl.writeToWaveFile(AudioRecorderImpl.java:385)
        at ua.mobius.media.server.impl.resource.audio.AudioRecorderImpl.deactivate(AudioRecorderImpl.java:198)
         at ua.mobius.media.server.mgcp.pkg.au.PlayRecord.terminateRecordPhase(PlayRecord.java:327)
        at ua.mobius.media.server.mgcp.pkg.au.PlayRecord.terminate(PlayRecord.java:407)
        at ua.mobius.media.server.mgcp.pkg.au.PlayRecord.cancel(PlayRecord.java:228)
         at ua.mobius.media.server.mgcp.controller.Request.cancel(Request.java:132)
        at ua.mobius.media.server.mgcp.tx.cmd.NotificationRequestCmd$Request.perform(NotificationRequestCmd.java:128)
        at ua.mobius.media.server.scheduler.Task.run(Task.java:127)
         at ua.mobius.media.server.scheduler.Scheduler$WorkerThread.run(Scheduler.java:425)

Laurent Schweizer

unread,
Jan 22, 2014, 4:28:59 AM1/22/14
to sipme-med...@googlegroups.com
 
the line creating the null exception is:
logger.info("(" + getEndpoint().getLocalName() + ") !!!!!!!!!! Size=" + size);  seems that getEndpoint() is null 
 
just before, getEndpoint() was used succefully  line  368:  logger.info("(" + getEndpoint().getLocalName() + ") !!!!!!!!!! Writting to file......................");
 
 if I check my log I can see that on the first call of getEndpoint()  line 368 "getEndpoint().getLocalName()  " is always not null  but for the second call line 385 it's changing
 
getEndpoint()   is not null both time
2014-01-16 14:56:51,911 INFO  [AudioRecorderImpl] (Thread-15) (mobius/ivr/2) !!!!!!!!!! Writting to file......................
2014-01-16 14:56:51,911 INFO  [AudioRecorderImpl] (Thread-15) (mobius/ivr/2) !!!!!!!!!! Size=390400
getEndpoint()   is not null only the first time
2014-01-16 14:55:25,946 INFO  [AudioRecorderImpl] (Thread-8) (mobius/ivr/2) !!!!!!!!!! Writting to file......................
2014-01-16 14:55:25,946 INFO  [AudioRecorderImpl] (Thread-8) !!!!!!!!!! Size=29760
so I supect that getEndpoint()  value is changing just after the check    if(getEndpoint()==null)  line 382
 
Laurent
 
/**
* Writes samples to file following WAVE format.
*
* @throws IOException
*/
private void writeToWaveFile() throws IOException {
if(getEndpoint()==null)
logger.info("!!!!!!!!!! Writting to file......................");
else
logger.info("(" + getEndpoint().getLocalName() + ") !!!!!!!!!! Writting to file......................");

//stop called on inactive recorder
if (fout == null) {
return;
}

fout.flush();
fout.close();

FileInputStream fin = new FileInputStream(temp);
fout = new FileOutputStream(file);

int size = fin.available();
if(getEndpoint()==null)
logger.info("!!!!!!!!!! Size=" + size);
else
logger.info("(" + getEndpoint().getLocalName() + ") !!!!!!!!!! Size=" + size);

headerBuffer.clear();


oifa.yulian

unread,
Jan 22, 2014, 5:29:05 AM1/22/14
to sipme-med...@googlegroups.com
Hello
Please open a ticket for that.
Basically the solution is to call getEndpoint() once in start of function and store the value inside some variable.
Then all occurences of getEndpoint() inside the function should be replaced with this variable.

There are 6 occurences of that.
I am having exams till 5 of February , after that i will make a new release. ( Currently there are 2 issues opened - first is native codecs compilation for windows , second is adaptive jitter buffer ).
Also if you have implemented G.722 please consider to commit it with new issue , so i will integrate it into new release.

Best regards
Yulian Oifa

Laurent Schweizer

unread,
Jan 22, 2014, 7:51:15 AM1/22/14
to sipme-med...@googlegroups.com
Yes I will open a ticket.
 
I have already fixed in the same way  but only one times I will search other occurences, thanks.
 
for G722 not yet, time issue , it's not an urgent project so I do it when I have time ... actualy I must terminate call recording, IVR and queuing for ou hosted pbx.
 
 
BR
 
Laurent
Reply all
Reply to author
Forward
0 new messages