Ignore:
Timestamp:
Jun 20, 2012 10:39:05 AM (7 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/include/pjsip/sip_dialog.h

    r3553 r4173  
    174174    /** Module specific data. */ 
    175175    void               *mod_data[PJSIP_MAX_MODULE]; /**< Module data.       */ 
     176 
     177    /** 
     178     * If via_addr is set, it will be used as the "sent-by" field of the 
     179     * Via header for outgoing requests as long as the request uses via_tp 
     180     * transport. Normally application should not use or access these fields. 
     181     */ 
     182    pjsip_host_port     via_addr;   /**< Via address.                       */ 
     183    const void         *via_tp;     /**< Via transport.                     */ 
    176184}; 
    177185 
     
    299307 
    300308/** 
     309 * Set the "sent-by" field of the Via header for outgoing requests. 
     310 * 
     311 * @param dlg       The dialog instance. 
     312 * @param via_addr  Set via_addr to use for the Via header or NULL to use 
     313 *                  the transport's published name. 
     314 * @param via_tp    via_addr will only be used if we are using via_tp 
     315 *                  transport. 
     316 * 
     317 * @return          PJ_SUCCESS on success. 
     318 */ 
     319PJ_DECL(pj_status_t) pjsip_dlg_set_via_sent_by(pjsip_dialog *dlg, 
     320                                               pjsip_host_port *via_addr, 
     321                                               pjsip_transport *via_tp); 
     322 
     323 
     324/** 
    301325 * Create a new (forked) dialog on receipt on forked response in rdata.  
    302326 * The new dialog will be created from original_dlg, except that it will have 
     
    403427 */ 
    404428PJ_DECL(pj_bool_t) pjsip_dlg_has_usage(pjsip_dialog *dlg, 
    405                                           pjsip_module *module); 
     429                                       pjsip_module *module); 
    406430 
    407431/** 
Note: See TracChangeset for help on using the changeset viewer.