Ignore:
Timestamp:
Jun 20, 2012 10:39:05 AM (12 years ago)
Author:
ming
Message:

Fixed #1537: Via rewrite: putting the right IP address in Via sent-by for outgoing requests

File:
1 edited

Legend:

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

    r4172 r4173  
    865865    } 
    866866 
     867    if (acc->cfg.allow_via_rewrite && acc->via_addr.host.slen > 0) 
     868        pjsip_dlg_set_via_sent_by(dlg, &acc->via_addr, acc->via_tp); 
     869 
    867870    /* Set credentials and preference. */ 
    868871    pjsip_auth_clt_set_credentials(&dlg->auth_sess, acc->cred_cnt, acc->cred); 
     
    12291232    /* Add headers etc */ 
    12301233    pjsua_process_msg_data(tdata, NULL); 
     1234 
     1235    /* Set Via sent-by */ 
     1236    if (acc->cfg.allow_via_rewrite && acc->via_addr.host.slen > 0) { 
     1237        pjsip_publishc_set_via_sent_by(acc->publish_sess, &acc->via_addr, 
     1238                                       acc->via_tp); 
     1239    } 
    12311240 
    12321241    /* Send the PUBLISH request */ 
     
    17811790    pjsip_dlg_inc_lock(buddy->dlg); 
    17821791 
     1792    if (acc->cfg.allow_via_rewrite && acc->via_addr.host.slen > 0) 
     1793        pjsip_dlg_set_via_sent_by(buddy->dlg, &acc->via_addr, acc->via_tp); 
     1794 
    17831795    status = pjsip_pres_create_uac( buddy->dlg, &pres_callback,  
    17841796                                    PJSIP_EVSUB_NO_EVENT_ID, &buddy->sub); 
     
    20972109     */ 
    20982110    pjsip_dlg_inc_lock(acc->mwi_dlg); 
     2111 
     2112    if (acc->cfg.allow_via_rewrite && acc->via_addr.host.slen > 0) 
     2113        pjsip_dlg_set_via_sent_by(acc->mwi_dlg, &acc->via_addr, acc->via_tp); 
    20992114 
    21002115    /* Create UAC subscription */ 
Note: See TracChangeset for help on using the changeset viewer.