diff options
author | Benny Prijono <bennylp@teluu.com> | 2010-11-16 03:07:46 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2010-11-16 03:07:46 +0000 |
commit | e27b2a2975a378643ff03e36176be3c378b9bc19 (patch) | |
tree | e7f95b0d411d78b71fe4e651ddb5ebf7bfbf2785 /pjsip/include | |
parent | 160111f12b0fe593ab26fd09a1b222a6f40a9caa (diff) |
Implemented SIP outbound (closed #1020)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3366 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 35 | ||||
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua_internal.h | 11 |
2 files changed, 45 insertions, 1 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 0661bb2f..0a6cbdd8 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -2333,6 +2333,41 @@ typedef struct pjsua_acc_config int contact_rewrite_method; /** + * 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 + * registration. This feature is highly useful in NAT-ed deployemtns, + * hence it is enabled by default. + * + * Note: currently SIP outbound can only be used with TCP and TLS + * transports. If UDP is used for the registration, the SIP outbound + * feature will be silently ignored for the account. + * + * Default: PJ_TRUE + */ + unsigned use_rfc5626; + + /** + * Specify SIP outbound (RFC 5626) instance ID to be used by this + * application. If empty, an instance ID will be generated based on + * the hostname of this agent. If application specifies this parameter, the + * value will look like "<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>" + * without the doublequote. + * + * Default: empty + */ + pj_str_t rfc5626_instance_id; + + /** + * Specify SIP outbound (RFC 5626) registration ID. The default value + * is empty, which would cause the library to automatically generate + * a suitable value. + * + * Default: empty + */ + pj_str_t rfc5626_reg_id; + + /** * Set the interval for periodic keep-alive transmission for this account. * If this value is zero, keep-alive will be disabled for this account. * The keep-alive transmission will be sent to the registrar's address, diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h index 3126b889..dc91d231 100644 --- a/pjsip/include/pjsua-lib/pjsua_internal.h +++ b/pjsip/include/pjsua-lib/pjsua_internal.h @@ -114,7 +114,6 @@ struct pjsua_srv_pres int expires; /**< "expires" value in the request. */ }; - /** * Account */ @@ -128,6 +127,9 @@ typedef struct pjsua_acc pj_str_t display; /**< Display name, if any. */ pj_str_t user_part; /**< User part of local URI. */ pj_str_t contact; /**< Our Contact header. */ + pj_str_t reg_contact; /**< Contact header for REGISTER. + It may be different than acc + contact if outbound is used */ pj_str_t srv_domain; /**< Host part of reg server. */ int srv_port; /**< Port number of reg server. */ @@ -152,6 +154,13 @@ typedef struct pjsua_acc pj_uint32_t global_route_crc; /** CRC of global route setting. */ pj_uint32_t local_route_crc; /** CRC of account route setting.*/ + unsigned rfc5626_status;/**< SIP outbound status: + 0: not used + 1: requested + 2: acknowledged by servers */ + pj_str_t rfc5626_instprm;/**< SIP outbound instance param. */ + pj_str_t rfc5626_regprm;/**< SIP outbound reg param. */ + unsigned cred_cnt; /**< Number of credentials. */ pjsip_cred_info cred[PJSUA_ACC_MAX_PROXIES]; /**< Complete creds. */ |