Hi Benny, thanks, this is much better. I use the library compiled as a DLL (in Visual Studio), so I cannot access global variables. Therefore I had to create a function that returns pointer to pjsau_var. Consider adding such function marked PJ_DECL into pjsua_internal so that access to PJSUA internals is enabled even from DLL. And one more improvement I suggest to you: Building DLL would be much simpler if it was macro-driven, i.e. if for example macro PJ_DLL was defined, PJ_DECL(T) would be then defined as __declspec(dllexport) and so a DLL will be produced. Cheers! Vali ----- Original Message ----- From: "Benny Prijono" <bennylp@xxxxxxxxx> To: "pjsip embedded/DSP SIP discussion" <pjsip at lists.pjsip.org> Sent: Saturday, October 27, 2007 8:03 AM Subject: Re: [pjsip] Lost packet count querying 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 _______________________________________________ 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