I'm using sample pjsua code, and i need to do some threading or just set timer on action... Here is code: /* Callback called by the library when call's state has changed */ static void on_call_state(pjsua_call_id call_id, pjsip_event *e) { pjsua_call_info ci; PJ_UNUSED_ARG(e); pjsua_call_get_info(call_id, &ci); PJ_LOG(2,(THIS_FILE, "Call %d state=%.*s", call_id, (int)ci.state_text.slen, ci.state_text.ptr)); if(ci.state == PJSIP_INV_STATE_EARLY){ // // //after 5 secs hangup call // // } if(ci.state == PJSIP_INV_STATE_DISCONNECTED ){ PJ_LOG(2,(THIS_FILE, "Call %d reason: =%.*s (%d)", call_id, (int)ci.last_status_text.slen, ci.last_status_text.ptr, (int)ci.last_status)); } } Can someone help me, and give just hints how to do it?