From ac1d9cc6e18880bf3a5d142f20d53e4382c0e611 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Mon, 24 Jun 2013 09:53:16 +0000 Subject: 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 --- pjsip/include/pjsua-lib/pjsua.h | 12 ++++++++++++ pjsip/include/pjsua-lib/pjsua_internal.h | 4 ++++ 2 files changed, 16 insertions(+) (limited to 'pjsip/include') 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 @@ -3030,6 +3030,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 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. */ -- cgit v1.2.3