Changeset 4889


Ignore:
Timestamp:
Aug 18, 2014 9:09:18 AM (10 years ago)
Author:
bennylp
Message:

More re #1677:

  • renamed the option to contact_use_src_port
  • added the missing pjsua2 API implementation
Location:
pjproject/trunk/pjsip
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r4888 r4889  
    30663066     * Default: PJ_TRUE (yes). 
    30673067     */ 
    3068     pj_bool_t        contact_rewrite_use_src_port; 
     3068    pj_bool_t        contact_use_src_port; 
    30693069 
    30703070    /** 
  • pjproject/trunk/pjsip/include/pjsua2/account.hpp

    r4704 r4889  
    562562 
    563563    /** 
     564     * Specify if source TCP port should be used as the initial Contact 
     565     * address if TCP/TLS transport is used. Note that this feature will 
     566     * be automatically turned off when nameserver is configured because 
     567     * it may yield different destination address due to DNS SRV resolution. 
     568     * Also some platforms are unable to report the local address of the 
     569     * TCP socket when it is still connecting. In these cases, this 
     570     * feature will also be turned off. 
     571     * 
     572     * Default: 1 (yes). 
     573     */ 
     574    int                 contactUseSrcPort; 
     575 
     576    /** 
    564577     * This option is used to overwrite the "sent-by" field of the Via header 
    565578     * for outgoing messages with the same interface address as the one in 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r4888 r4889  
    30443044 
    30453045    /* For TCP/TLS, acc may request to specify source port */ 
    3046     if (acc->cfg.contact_rewrite_use_src_port) { 
     3046    if (acc->cfg.contact_use_src_port) { 
    30473047        pjsip_host_info dinfo; 
    30483048        pjsip_transport *tp = NULL; 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c

    r4888 r4889  
    290290    cfg->reg_retry_interval = PJSUA_REG_RETRY_INTERVAL; 
    291291    cfg->contact_rewrite_method = PJSUA_CONTACT_REWRITE_METHOD; 
    292     cfg->contact_rewrite_use_src_port = PJ_TRUE; 
     292    cfg->contact_use_src_port = PJ_TRUE; 
    293293    cfg->use_rfc5626 = PJ_TRUE; 
    294294    cfg->reg_use_proxy = PJSUA_REG_USE_OUTBOUND_PROXY | 
  • pjproject/trunk/pjsip/src/pjsua2/account.cpp

    r4704 r4889  
    203203    NODE_READ_UNSIGNED( this_node, udpKaIntervalSec); 
    204204    NODE_READ_STRING  ( this_node, udpKaData); 
     205    NODE_READ_INT     ( this_node, contactUseSrcPort); 
    205206} 
    206207 
     
    233234    NODE_WRITE_UNSIGNED( this_node, udpKaIntervalSec); 
    234235    NODE_WRITE_STRING  ( this_node, udpKaData); 
     236    NODE_WRITE_INT     ( this_node, contactUseSrcPort); 
    235237} 
    236238 
     
    398400    ret.allow_contact_rewrite   = natConfig.contactRewriteUse; 
    399401    ret.contact_rewrite_method  = natConfig.contactRewriteMethod; 
     402    ret.contact_use_src_port    = natConfig.contactUseSrcPort; 
    400403    ret.allow_via_rewrite       = natConfig.viaRewriteUse; 
    401404    ret.allow_sdp_nat_rewrite   = natConfig.sdpNatRewriteUse; 
     
    559562    natConfig.contactRewriteUse = prm.allow_contact_rewrite; 
    560563    natConfig.contactRewriteMethod = prm.contact_rewrite_method; 
     564    natConfig.contactUseSrcPort = prm.contact_use_src_port; 
    561565    natConfig.viaRewriteUse     = prm.allow_via_rewrite; 
    562566    natConfig.sdpNatRewriteUse  = prm.allow_sdp_nat_rewrite; 
Note: See TracChangeset for help on using the changeset viewer.