void ccsnap_gen_callEvent(ccapi_call_event_e event, cc_call_handle_t handle){ session_data_t *call_info = CCAPI_Call_getCallInfo(handle); if ( call_info == NULL ) { call_info = getDeepCopyOfSessionData(NULL); } //print all info if (g_CCAppDebug) { printCallInfo(call_info, "ccsnap_gen_callEvent"); } CCAPI_CallListener_onCallEvent(event, handle, call_info, gROAPSDP.answerSDP); CCAPI_Call_releaseCallInfo(call_info); }
/** * Get call info snapshot * @param [in] handle - call handle * @return cc_call_info_snap_t */ cc_callinfo_ref_t CCAPI_Call_getCallInfo(cc_call_handle_t handle) { unsigned int session_id = ccpro_get_sessionId_by_callid(GET_CALL_ID(handle)); cc_callinfo_ref_t snapshot=NULL; session_data_t * data; if ( session_id != 0 ) { data = findhash(session_id); if ( data != NULL ) { snapshot = getDeepCopyOfSessionData(data); if (snapshot == NULL) { return NULL; } snapshot->ref_count = 1; } } return snapshot; }