Tom?? Valenta wrote: > Hello, > I participate in developing a TTS/ASR (text-to-speech / > automatic-speech-recognition) application and we need to support SIP in the > application, so we decided to use PJSIP library. It is very simple to use Cool! :) > the library (pjsua-lib layer) and it provides sufficient functionality. But > there is one thing I miss in pjsua-lib: data loss detection, which can be > very important especially for ASR part. The only way to do this I found, was > to parse string returned by pjsua_call_dump() and get lost packet count > number. Ugh, that's ugly. A slightly better way perhaps is to access pjsua-lib's internal data by including pjsua_internal.h, where you can get the media session instance for a particular call. Then call pjmedia_session_get_stream_stat() to get the stream's statistic. > Is there a smarter way to get the information without modifying library > source code? No matter if it is lost packets count or lost frames count, but > information that this frame does not contain real data would be very > valuable. An audio frame can have PJMEDIA_FRAME_TYPE_NONE type to indicate that there's no real data in it. I'm not sure if this is sufficient for your use case, since this type alone doesn't tell if the frame was lost, or if it's because there's no audio transmitted from the other side. The stream.c does have this information, but it's not propagated elsewhere (have a look at get_frame() function in stream.c). -benny > Thanks. > Vali > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org -- Benny Prijono http://www.pjsip.org