Ignore:
Timestamp:
Nov 25, 2006 2:50:25 PM (17 years ago)
Author:
bennylp
Message:

Print media statistic when call is disconnected in pjsua, to assist tracing media problems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r813 r831  
    9191    call->last_text.ptr = call->last_text_buf_; 
    9292    call->last_text.slen = 0; 
     93    call->conn_time.sec = 0; 
     94    call->conn_time.msec = 0; 
     95    call->res_time.sec = 0; 
     96    call->res_time.msec = 0; 
    9397} 
    9498 
     
    17771781 
    17781782    /* Calculate call duration */ 
    1779     if (call->inv->state >= PJSIP_INV_STATE_CONFIRMED) { 
     1783    if (call->conn_time.sec != 0) { 
    17801784        pj_gettimeofday(&duration); 
    17811785        PJ_TIME_VAL_SUB(duration, call->conn_time); 
     
    17881792 
    17891793    /* Calculate first response delay */ 
    1790     if (call->inv->state >= PJSIP_INV_STATE_EARLY) { 
     1794    if (call->res_time.sec != 0) { 
    17911795        res_delay = call->res_time; 
    17921796        PJ_TIME_VAL_SUB(res_delay, call->start_time); 
     
    19771981        call->inv = NULL; 
    19781982        --pjsua_var.call_cnt; 
     1983 
     1984        /* Reset call */ 
     1985        reset_call(call->index); 
     1986 
    19791987    } 
    19801988 
Note: See TracChangeset for help on using the changeset viewer.