But the error doesn't say how the native method pj_thread_register() is exported to the PJSUA2 Java API so how can you call it from withing a Java application? @Akram: As for now I figured out that the problem is not using different threads in my application, but it is the Java/Android garbage collector. This is a known problem which is documented. Von: pjsip [mailto:pjsip-bounces at lists.pjsip.org] Im Auftrag von Norman Franke Gesendet: Donnerstag, 10. Juli 2014 17:45 An: pjsip list Betreff: Re: [pjsip] Threading in Android using pjsua2 The error says how to do it, call pj_thread_register() from any threads you create that then call a PJ function. Norman Franke Answering Service for Directors, Inc. www.myasd.com<http://www.myasd.com> On Jul 10, 2014, at 6:19 AM, Akram <dh.akram at gmail.com<mailto:dh.akram at gmail.com>> wrote: Hi, I'm facing the same problem , Did you manage to register external threads in java ? On Tue, Jul 8, 2014 at 2:28 PM, Stefan Winkler <inst27 at gmail.com<mailto:inst27 at gmail.com>> wrote: Hi, I'm using pjsua2 in an Android application and get the following error: pj_thread_this: assertion "!"Calling pjlib from unknown/external thread. You must " "register external threads with pj_thread_register() " "before calling any pjlib functions."" failed My question is how can I register my thread using the pjsua2 API. Hope there is a solution! Thanks! _______________________________________________ Visit our blog: http://blog.pjsip.org<http://blog.pjsip.org/> pjsip mailing list pjsip at lists.pjsip.org<mailto:pjsip at lists.pjsip.org> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip at lists.pjsip.org<mailto:pjsip at lists.pjsip.org> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20140714/a8a5311c/attachment.html>