summaryrefslogtreecommitdiff
path: root/pjsip/src
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip/src')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_acc.c2
-rw-r--r--pjsip/src/pjsua-lib/pjsua_core.c2
-rw-r--r--pjsip/src/pjsua2/account.cpp4
3 files changed, 6 insertions, 2 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c
index dbdb698c..996335fa 100644
--- a/pjsip/src/pjsua-lib/pjsua_acc.c
+++ b/pjsip/src/pjsua-lib/pjsua_acc.c
@@ -3043,7 +3043,7 @@ pj_status_t pjsua_acc_get_uac_addr(pjsua_acc_id acc_id,
addr->port = tfla2_prm.ret_port;
/* For TCP/TLS, acc may request to specify source port */
- if (acc->cfg.contact_rewrite_use_src_port) {
+ if (acc->cfg.contact_use_src_port) {
pjsip_host_info dinfo;
pjsip_transport *tp = NULL;
pj_addrinfo ai;
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c
index 056ff888..c9aa1a45 100644
--- a/pjsip/src/pjsua-lib/pjsua_core.c
+++ b/pjsip/src/pjsua-lib/pjsua_core.c
@@ -289,7 +289,7 @@ PJ_DEF(void) pjsua_acc_config_default(pjsua_acc_config *cfg)
cfg->srtp_optional_dup_offer = pjsua_var.ua_cfg.srtp_optional_dup_offer;
cfg->reg_retry_interval = PJSUA_REG_RETRY_INTERVAL;
cfg->contact_rewrite_method = PJSUA_CONTACT_REWRITE_METHOD;
- cfg->contact_rewrite_use_src_port = PJ_TRUE;
+ cfg->contact_use_src_port = PJ_TRUE;
cfg->use_rfc5626 = PJ_TRUE;
cfg->reg_use_proxy = PJSUA_REG_USE_OUTBOUND_PROXY |
PJSUA_REG_USE_ACC_PROXY;
diff --git a/pjsip/src/pjsua2/account.cpp b/pjsip/src/pjsua2/account.cpp
index 247c4a4a..52178451 100644
--- a/pjsip/src/pjsua2/account.cpp
+++ b/pjsip/src/pjsua2/account.cpp
@@ -202,6 +202,7 @@ void AccountNatConfig::readObject(const ContainerNode &node) throw(Error)
NODE_READ_STRING ( this_node, sipOutboundRegId);
NODE_READ_UNSIGNED( this_node, udpKaIntervalSec);
NODE_READ_STRING ( this_node, udpKaData);
+ NODE_READ_INT ( this_node, contactUseSrcPort);
}
void AccountNatConfig::writeObject(ContainerNode &node) const throw(Error)
@@ -232,6 +233,7 @@ void AccountNatConfig::writeObject(ContainerNode &node) const throw(Error)
NODE_WRITE_STRING ( this_node, sipOutboundRegId);
NODE_WRITE_UNSIGNED( this_node, udpKaIntervalSec);
NODE_WRITE_STRING ( this_node, udpKaData);
+ NODE_WRITE_INT ( this_node, contactUseSrcPort);
}
///////////////////////////////////////////////////////////////////////////////
@@ -397,6 +399,7 @@ void AccountConfig::toPj(pjsua_acc_config &ret) const
ret.allow_contact_rewrite = natConfig.contactRewriteUse;
ret.contact_rewrite_method = natConfig.contactRewriteMethod;
+ ret.contact_use_src_port = natConfig.contactUseSrcPort;
ret.allow_via_rewrite = natConfig.viaRewriteUse;
ret.allow_sdp_nat_rewrite = natConfig.sdpNatRewriteUse;
ret.use_rfc5626 = natConfig.sipOutboundUse;
@@ -558,6 +561,7 @@ void AccountConfig::fromPj(const pjsua_acc_config &prm,
}
natConfig.contactRewriteUse = prm.allow_contact_rewrite;
natConfig.contactRewriteMethod = prm.contact_rewrite_method;
+ natConfig.contactUseSrcPort = prm.contact_use_src_port;
natConfig.viaRewriteUse = prm.allow_via_rewrite;
natConfig.sdpNatRewriteUse = prm.allow_sdp_nat_rewrite;
natConfig.sipOutboundUse = prm.use_rfc5626;