From 84f301467161a490a4df3ebb3664a4a67c3056e2 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Mon, 18 Aug 2014 09:09:18 +0000 Subject: More re #1677: - renamed the option to contact_use_src_port - added the missing pjsua2 API implementation git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4889 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsua-lib/pjsua.h | 2 +- pjsip/include/pjsua2/account.hpp | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'pjsip/include') diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index d83b05f8..0787d416 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -3065,7 +3065,7 @@ typedef struct pjsua_acc_config * * Default: PJ_TRUE (yes). */ - pj_bool_t contact_rewrite_use_src_port; + pj_bool_t contact_use_src_port; /** * This option is used to overwrite the "sent-by" field of the Via header diff --git a/pjsip/include/pjsua2/account.hpp b/pjsip/include/pjsua2/account.hpp index 2a7199f2..6452ad52 100644 --- a/pjsip/include/pjsua2/account.hpp +++ b/pjsip/include/pjsua2/account.hpp @@ -560,6 +560,19 @@ struct AccountNatConfig : public PersistentObject */ int contactRewriteMethod; + /** + * Specify if source TCP port should be used as the initial Contact + * address if TCP/TLS transport is used. Note that this feature will + * be automatically turned off when nameserver is configured because + * it may yield different destination address due to DNS SRV resolution. + * Also some platforms are unable to report the local address of the + * TCP socket when it is still connecting. In these cases, this + * feature will also be turned off. + * + * Default: 1 (yes). + */ + int contactUseSrcPort; + /** * This option is used to overwrite the "sent-by" field of the Via header * for outgoing messages with the same interface address as the one in -- cgit v1.2.3