9 | 9 | To use PJSIP, it is recommended to call {{{pj_init()}}} and {{{pj_shutdown()}}} from the main thread. After {{{pj_init()}}} is completed, application can continue with the initialization or create a secondary/worker thread and register the thread by calling {{{pj_thread_register()}}}. As described in [http://www.pjsip.org/docs/latest/pjsip/docs/html/group__PJSUA__LIB__BASE.htm#details PJSUA-API Basic API documentation], app needs to call {{{pjsua_create()}}}, {{{pjsua_pool_create()}}}, {{{pjsua_init()}}} to perform the initialization. Then app must call {{{pjsua_start()}}} to start PJSUA and finally after everything is done, call {{{pjsua_destroy()}}} to shut it down. Sample code: |