Ignore:
Timestamp:
Mar 3, 2017 2:11:02 AM (7 years ago)
Author:
ming
Message:

Fixed #1966:

  • Add option to specify default address family in ICE default candidate
  • As answerer, match the address family in the SDP offer if possible.
File:
1 edited

Legend:

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

    r5535 r5562  
    852852     
    853853    ice_cfg.opt = acc_cfg->ice_cfg.ice_opt; 
     854 
     855    if (call_med->call->async_call.rem_sdp) { 
     856        /* Match the default address family according to the offer */ 
     857        const pj_str_t ID_IP6 = { "IP6", 3}; 
     858        const pjmedia_sdp_media *m; 
     859        const pjmedia_sdp_conn *c; 
     860 
     861        m = call_med->call->async_call.rem_sdp->media[call_med->idx]; 
     862        c = m->conn? m->conn : call_med->call->async_call.rem_sdp->conn; 
     863 
     864        if (pj_stricmp(&c->addr_type, &ID_IP6) == 0) 
     865            ice_cfg.af = pj_AF_INET6(); 
     866    } else if (use_ipv6) { 
     867        ice_cfg.af = pj_AF_INET6(); 
     868    } 
    854869 
    855870    /* If STUN transport is configured, initialize STUN transport settings */ 
Note: See TracChangeset for help on using the changeset viewer.