Ignore:
Timestamp:
Sep 17, 2008 3:32:06 PM (16 years ago)
Author:
nanang
Message:

Ticket #631:

  • Added new fields in media transport info: remote address originating RTP & RTCP.
  • Updated transport UDP & ICE to fill above fields in getting transport info.
  • Updated pjsua call dump, instead of showing remote RTP address from SDP, it will show address of RTP originator.
File:
1 edited

Legend:

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

    r2266 r2291  
    20192019static void dump_media_session(const char *indent,  
    20202020                               char *buf, unsigned maxlen, 
    2021                                pjmedia_session *session) 
     2021                               pjsua_call *call) 
    20222022{ 
    20232023    unsigned i; 
     
    20252025    int len; 
    20262026    pjmedia_session_info info; 
    2027  
     2027    pjmedia_session *session = call->session; 
     2028    pjmedia_transport_info tp_info; 
     2029 
     2030    pjmedia_transport_info_init(&tp_info); 
     2031 
     2032    pjmedia_transport_get_info(call->med_tp, &tp_info); 
    20282033    pjmedia_session_get_info(session, &info); 
    20292034 
     
    20382043 
    20392044        pjmedia_session_get_stream_stat(session, i, &stat); 
    2040         rem_addr = pj_sockaddr_print(&info.stream_info[i].rem_addr, 
    2041                                      rem_addr_buf, sizeof(rem_addr_buf), 3); 
     2045        // rem_addr will contain actual address of RTP originator, instead of 
     2046        // remote RTP address specified by stream which is fetched from the SDP. 
     2047        // Please note that we are assuming only one stream per call. 
     2048        //rem_addr = pj_sockaddr_print(&info.stream_info[i].rem_addr, 
     2049        //                           rem_addr_buf, sizeof(rem_addr_buf), 3); 
     2050        if (pj_sockaddr_has_addr(&tp_info.rem_rtp_name)) { 
     2051            rem_addr = pj_sockaddr_print(&tp_info.rem_rtp_name, rem_addr_buf,  
     2052                                         sizeof(rem_addr_buf), 3); 
     2053        } else { 
     2054            pj_ansi_snprintf(rem_addr_buf, sizeof(rem_addr_buf), "-"); 
     2055        } 
    20422056 
    20432057        if (info.stream_info[i].dir == PJMEDIA_DIR_ENCODING) 
     
    26282642/* Print call info */ 
    26292643void print_call(const char *title, 
    2630                        int call_id,  
    2631                        char *buf, pj_size_t size) 
     2644                int call_id,  
     2645                char *buf, pj_size_t size) 
    26322646{ 
    26332647    int len; 
     
    27592773    /* Dump session statistics */ 
    27602774    if (with_media && call->session) 
    2761         dump_media_session(indent, p, end-p, call->session); 
     2775        dump_media_session(indent, p, end-p, call); 
    27622776 
    27632777    pjsip_dlg_dec_lock(dlg); 
Note: See TracChangeset for help on using the changeset viewer.