diff options
author | Benny Prijono <bennylp@teluu.com> | 2010-06-22 06:02:13 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2010-06-22 06:02:13 +0000 |
commit | 0b4550b549b2dd9770c07aef9607ece8f122060a (patch) | |
tree | 1ded269d44faa6c252eaffc4486b540a9d347c69 /pjsip/include | |
parent | 9a61cdc66183f1c4ed0c4a4e27ebc1b6a67ac183 (diff) |
Fixed #1095 (New option to control the Route headers in REGISTER request). Details:
- added new account config setting: reg_use_proxy. This contains bitmask values to indicate whether outbound proxies and account proxies are to be added in the REGISTER request. Default value is to add both.
- added new pjsua cmdline option to control this: --reg-use-proxy
- miscellaneous minor fixes in other pjsua cmdline arguments
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3216 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 26 | ||||
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua_internal.h | 3 |
2 files changed, 29 insertions, 0 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 2826c9fa..36a11489 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -1924,6 +1924,20 @@ PJ_DECL(pj_status_t) pjsua_transport_close( pjsua_transport_id id, /** + * Bit value used in pjsua_acc_config.reg_use_proxy field to indicate that + * the global outbound proxy list should be added to the REGISTER request. + */ +#define PJSUA_REG_USE_OUTBOUND_PROXY 1 + + +/** + * Bit value used in pjsua_acc_config.reg_use_proxy field to indicate that + * the account proxy list should be added to the REGISTER request. + */ +#define PJSUA_REG_USE_ACC_PROXY 2 + + +/** * This structure describes account configuration to be specified when * adding a new account with #pjsua_acc_add(). Application MUST initialize * this structure first by calling #pjsua_acc_config_default(). @@ -2224,6 +2238,18 @@ typedef struct pjsua_acc_config */ pj_bool_t drop_calls_on_reg_fail; + /** + * Specify how the registration uses the outbound and account proxy + * settings. This controls if and what Route headers will appear in + * the REGISTER request of this account. The value is bitmask combination + * of PJSUA_REG_USE_OUTBOUND_PROXY and PJSUA_REG_USE_ACC_PROXY bits. + * If the value is set to 0, the REGISTER request will not use any proxy + * (i.e. it will not have any Route headers). + * + * Default: 3 (PJSUA_REG_USE_OUTBOUND_PROXY | PJSUA_REG_USE_ACC_PROXY) + */ + unsigned reg_use_proxy; + } pjsua_acc_config; diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h index f20b73de..f9146fb7 100644 --- a/pjsip/include/pjsua-lib/pjsua_internal.h +++ b/pjsip/include/pjsua-lib/pjsua_internal.h @@ -285,6 +285,9 @@ struct pjsua_data pj_status_t nat_status; /**< Detection status. */ pj_bool_t nat_in_progress; /**< Detection in progress */ + /* List of outbound proxies: */ + pjsip_route_hdr outbound_proxy; + /* Account: */ unsigned acc_cnt; /**< Number of accounts. */ pjsua_acc_id default_acc; /**< Default account ID */ |