Ignore:
Timestamp:
Jun 24, 2013 9:53:16 AM (9 years ago)
Author:
bennylp
Message:

Closed #1668: Option to use the IP address found in REGISTER response in the SDP

File:
1 edited

Legend:

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

    r4542 r4543  
    240240    pj_status_t status = PJ_SUCCESS; 
    241241    char addr_buf[PJ_INET6_ADDRSTRLEN+10]; 
     242    pjsua_acc *acc; 
    242243    pj_sock_t sock[2]; 
    243     pjsua_acc *acc = &pjsua_var.acc[call_med->call->acc_id]; 
    244244 
    245245    use_ipv6 = (acc->cfg.ipv6_media_use != PJSUA_IPV6_DISABLED); 
    246246    af = use_ipv6 ? pj_AF_INET6() : pj_AF_INET(); 
     247 
     248    acc = &pjsua_var.acc[call_med->call->acc_id]; 
    247249 
    248250    /* Make sure STUN server resolution has completed */ 
     
    424426 
    425427        } else { 
     428            if (acc->cfg.allow_sdp_nat_rewrite && acc->reg_mapped_addr.slen) { 
     429                pj_status_t status; 
     430 
     431                /* Take the address from mapped addr as seen by registrar */ 
     432                status = pj_sockaddr_set_str_addr(af, &bound_addr, 
     433                                                  &acc->reg_mapped_addr); 
     434                if (status != PJ_SUCCESS) { 
     435                    /* just leave bound_addr with whatever it was 
     436                    pj_bzero(pj_sockaddr_get_addr(&bound_addr), 
     437                             pj_sockaddr_get_addr_len(&bound_addr)); 
     438                     */ 
     439                } 
     440            } 
    426441 
    427442            if (!pj_sockaddr_has_addr(&bound_addr)) { 
Note: See TracChangeset for help on using the changeset viewer.