Hi Michael, You have to call "pj_thread_register()" from the thread which is trying to use PJlib. Something like below should work for you :- ??? pj_thread_desc rtpdesc; ??? pj_thread_t *thread = 0; ? ? // Register the thread with PJLIB, this is must for any external threads ??? // which need to use the PJLIB framework ??? if (!pj_thread_is_registered()) ??? { ??????? status = pj_thread_register("Threadname", rtpdesc, &thread ); ??????? if (status != PJ_SUCCESS) ??????? { ??????????? app_perror("Threadname Failed to register with PJLIB,exit", status); ??????????? exit(1); ??????? } ??? } ??? if (pj_thread_is_registered()) ??? { ??????? REPORTERROR("Threadname is succesfully registered with PJMedia"); ??? } Regards, Manjeet --- On Thu, 4/2/09, Michael <s-michael at o2.pl> wrote: From: Michael <s-michael@xxxxx> Subject: Threads question To: pjsip at lists.pjsip.org Date: Thursday, April 2, 2009, 1:31 AM Hi All, I?m trying to use threads in my SIP driver under windows but without experience with threads I?m only receiving: "Calling pjlib from unknown/external thread. You must register external threads with pj_thread_register() before calling any pjlib functions." or it crashes as soon as it reaches pj_pool_create and I can?t do anything. I?m trying use simple PJSUA in my method responsible for starting SIP communication and from what I?ve read I have to register pjsip thread. I would be very thankful for any advice when and where can I (have to) register a thread, call pj_pool_create, pj_thread_create etc, or do I have to consider other issues? . Maybe someone have sample code with threads, besides those from pjsip site?. Thanks in advance Michael _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090401/edb0d7d6/attachment.html>