summaryrefslogtreecommitdiff
path: root/pjsip/include/pjsua-lib
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-07-18 00:33:02 +0000
committerBenny Prijono <bennylp@teluu.com>2006-07-18 00:33:02 +0000
commit65035358b4b7f51b4183a0937e9e93ff130d7525 (patch)
treed38d458e390fd2ac04e91f90bac5b856f4089c4c /pjsip/include/pjsua-lib
parentcbb6c140cf6e47e65b31b93009cfe39916933009 (diff)
More intelligent PJSUA-LIB in selecting the appropriate address for Contact header
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@611 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsua-lib')
-rw-r--r--pjsip/include/pjsua-lib/pjsua.h35
-rw-r--r--pjsip/include/pjsua-lib/pjsua_internal.h2
2 files changed, 36 insertions, 1 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index f8a9aff1..7ae37eed 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -1303,6 +1303,41 @@ PJ_DECL(pjsua_acc_id) pjsua_acc_find_for_outgoing(const pj_str_t *url);
PJ_DECL(pjsua_acc_id) pjsua_acc_find_for_incoming(pjsip_rx_data *rdata);
+/**
+ * Create a suitable URI to be put as Contact based on the specified
+ * target URI for the specified account.
+ *
+ * @param pool Pool to allocate memory for the string.
+ * @param contact The string where the Contact URI will be stored.
+ * @param acc_id Account ID.
+ * @param uri Destination URI of the request.
+ *
+ * @return PJ_SUCCESS on success, other on error.
+ */
+PJ_DECL(pj_status_t) pjsua_acc_create_uac_contact( pj_pool_t *pool,
+ pj_str_t *contact,
+ pjsua_acc_id acc_id,
+ const pj_str_t *uri);
+
+
+
+/**
+ * Create a suitable URI to be put as Contact based on the information
+ * in the incoming request.
+ *
+ * @param pool Pool to allocate memory for the string.
+ * @param contact The string where the Contact URI will be stored.
+ * @param acc_id Account ID.
+ * @param rdata Incoming request.
+ *
+ * @return PJ_SUCCESS on success, other on error.
+ */
+PJ_DECL(pj_status_t) pjsua_acc_create_uas_contact( pj_pool_t *pool,
+ pj_str_t *contact,
+ pjsua_acc_id acc_id,
+ pjsip_rx_data *rdata );
+
+
/**
* @}
diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h
index a0f52189..fe57b451 100644
--- a/pjsip/include/pjsua-lib/pjsua_internal.h
+++ b/pjsip/include/pjsua-lib/pjsua_internal.h
@@ -79,8 +79,8 @@ typedef struct pjsua_acc
pj_bool_t valid; /**< Is this account valid? */
int index; /**< Index in accounts array. */
+ pj_str_t display; /**< Display name, if any. */
pj_str_t user_part; /**< User part of local URI. */
- pj_str_t real_contact; /**< Real contact address. */
pj_str_t srv_domain; /**< Host part of reg server. */
int srv_port; /**< Port number of reg server. */