I tried that with no effect. I also get this problem randomly with other things so it may not only be a problem with stopping pjsua. I changed the code so I can bzero the threads that I register, so here is what my code looks like now. - (void)registerThread:(pj_thread_desc *)thePJThreadDesc { if (!pj_thread_is_registered()) { pj_thread_t *PJThread; pj_status_t status = pj_thread_register(NULL, *thePJThreadDesc, &PJThread); if (status!=PJ_SUCCESS) NSLog(@"Error registering thread for PJSUA with status %d", status); } } pj_thread_desc PJThreadDesc; [self registerThread:&PJThreadDesc]; if (ringbackPort!=NULL && ringbackSlot!=PJSUA_INVALID_ID) { pjsua_conf_remove_port(ringbackSlot); ringbackSlot = PJSUA_INVALID_ID; pjmedia_port_destroy(ringbackPort); ringbackPort = NULL; } if (PJPool!=NULL) { pj_pool_release(PJPool); PJPool = NULL; } pjsua_transport_close(UDPTransport, PJ_FALSE); pjsua_transport_close(TCPTransport, PJ_FALSE); status = pjsua_destroy(); if (status!=PJ_SUCCESS) NSLog(@"Error stopping SIP"); bzero(&PJThreadDesc, sizeof(pj_thread_desc)); I am on a mac using cocoa if you didn't know. This is the one problem I have no understanding of as I do not know the implementation of PJSIP. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100921/bf5b050c/attachment.html>