summaryrefslogtreecommitdiff
path: root/pjsip/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2013-06-24 09:53:16 +0000
committerBenny Prijono <bennylp@teluu.com>2013-06-24 09:53:16 +0000
commitac1d9cc6e18880bf3a5d142f20d53e4382c0e611 (patch)
tree38c2a40619cdd8e3fc06bddf6c95689b7b5508e5 /pjsip/include
parent0a2c5325be043699024c91a0268c22050975f5ff (diff)
Closed #1668: Option to use the IP address found in REGISTER response in the SDP
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4543 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r--pjsip/include/pjsua-lib/pjsua.h12
-rw-r--r--pjsip/include/pjsua-lib/pjsua_internal.h4
2 files changed, 16 insertions, 0 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index 0cc34acc..ef408764 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -3031,6 +3031,18 @@ typedef struct pjsua_acc_config
pj_bool_t allow_via_rewrite;
/**
+ * This option controls whether the IP address in SDP should be replaced
+ * with the IP address found in Via header of the REGISTER response, ONLY
+ * when STUN and ICE are not used. If the value is FALSE (the original
+ * behavior), then the local IP address will be used. If TRUE, and when
+ * STUN and ICE are disabled, then the IP address found in registration
+ * response will be used.
+ *
+ * Default: PJ_FALSE (no)
+ */
+ pj_bool_t allow_sdp_nat_rewrite;
+
+ /**
* Control the use of SIP outbound feature. SIP outbound is described in
* RFC 5626 to enable proxies or registrar to send inbound requests back
* to UA using the same connection initiated by the UA for its
diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h
index d1a696ae..d70506eb 100644
--- a/pjsip/include/pjsua-lib/pjsua_internal.h
+++ b/pjsip/include/pjsua-lib/pjsua_internal.h
@@ -229,6 +229,10 @@ typedef struct pjsua_acc
pj_status_t reg_last_err; /**< Last registration error. */
int reg_last_code; /**< Last status last register. */
+ pj_str_t reg_mapped_addr;/**< Our addr as seen by reg srv.
+ Only if allow_sdp_nat_rewrite
+ is set */
+
struct {
pj_bool_t active; /**< Flag of reregister status. */
pj_timer_entry timer; /**< Timer for reregistration. */