[pjsip] Calling pjlib from unknown/external thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



S G wrote:
> Hi all,
> 
> perhaps this a newbie question but I didn't find an anwer. I am trying 
> to do some programming using the c++ pjsua library but I  have this 
> error everytime I try to execute it:
> 
> "Calling pjlib from unknown/external thread. You must register external 
> threads with pj_thread_register() before calling any pjlib functions."
> 
> So, here are my questions:
> 1) Where exactly do I have to call register thread? I add this code just 
> before calling pjsua_create, pjsua_init, etc but I keep having the same 
> problem.

You should call this in the context of the external thread. For 
example, if you create a thread with API other than 
pj_thread_create(), you must call pj_thread_register() in the 
thread's entry function before you call any PJSIP's functions.

regards,
  -benny

> 2) I am having different assertion problems, so I don't know if I have 
> to call this funcion before the assertion.
> 3) I did a gui for the python library and I didn't have any problem so I 
> am guessing the thread issue is different using python and c++ but I 
> don't know why.
> 
> Sorry if it is not clear to me. I hope someone can help me.
> 
> Best regards,
> Sergio





[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux