Hi, I have been trying to use the pjsip on linux, and I found a strange problem. Because of my English is very poor, I try my best to explain it clearly. First, I download the pjsip code(version 2.2.1) in the CentOS(linux), and build it using the default configuration. # ./configure # make dep # make 2nd, I wite an app use the pjsua-api. When the app received a "BYE" msg to DISCONNECT the sip connection, the problem hanppened. A pjsip thread is block on the pthread_join(). And,when I try to use the pjsua_call_make_call () to make a new call, my app main thread is blocked by pthread_mutex_lock (). So, it is no-response forever. The callstack1: Thread 16 (Thread 0xb29fdb70 (LWP 9619)): #0 0x00110424 in __kernel_vsyscall () #1 0x00ae21fd in pthread_join () from /lib/libpthread.so.0 #2 0x08122c74 in PaUnixThread_Terminate () #3 0x08125bf9 in RealStop () #4 0x080b1485 in strm_stop () #5 0x080c173d in pjmedia_snd_port_destroy () #6 0x0806c648 in close_snd_dev () #7 0x0806dfa6 in close_snd_timer_cb () #8 0x08142dec in pj_timer_heap_poll () #9 0x0808ff45 in pjsip_endpt_handle_events2 () #10 0x0805ea2e in pjsua_handle_events () #11 0x0805eb3e in worker_thread () #12 0x08134d77 in thread_main () #13 0x00ae1b39 in start_thread () from /lib/libpthread.so.0 #14 0x009f8d6e in clone () from /lib/libc.so.6 The callstack2: Thread 2 (Thread 0xb7fdfb70 (LWP 9605)): #0 0x00110424 in __kernel_vsyscall () #1 0x00ae8189 in __lll_lock_wait () from /lib/libpthread.so.0 #2 0x00ae352e in _L_lock_731 () from /lib/libpthread.so.0 #3 0x00ae343a in pthread_mutex_lock () from /lib/libpthread.so.0 #4 0x08134ae0 in pj_mutex_lock () #5 0x0805b1e2 in pjsua_call_make_call () #6 0x0804d84d in VOIP_PjsipMakeCall (pcSipUrl=0x8196f3c "sip:192.168.106.1") at voip_pjsip.c:212 #7 0x0804e47e in VOIP_ProcPttStartRe (pstMsg=0xb7fdee48) at voip_tcp.c:210 #8 0x0804e545 in VOIP_ProcTcpBuf (pucBuf=0xb7fdee48 "D\001", puiBufLen=0xb7fdee44) at voip_tcp.c:247 #9 0x0804dba4 in MAIN_ThreadMain (pPara=0x0) at main.c:126 #10 0x00ae1b39 in start_thread () from /lib/libpthread.so.0 #11 0x009f8d6e in clone () from /lib/libc.so.6 I thought maybe the pjsip worker_thread get the mutex lock and not release it before blocked by the pthread_join (). I check the code and make sure it. In the function close_snd_timer_cb(), close_snd_dev () be called between the PJSUA_LOCK() and PJSUA_UNLOCK(); Then, the question is "why the worker_thread will be blocked by the pthread_join?" Any help will be greatly appreciated as I have been stuck on this for quite some while. Luyao -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20140418/1b9ebb1a/attachment.html>