summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsua-lib/pjsua_call.c
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2010-06-03 10:41:32 +0000
committerNanang Izzuddin <nanang@teluu.com>2010-06-03 10:41:32 +0000
commit62f1ba21e766b422e3b49ad89601a30742b48a45 (patch)
treeda0707f46ebad43e858dc453f859d3293f22002f /pjsip/src/pjsua-lib/pjsua_call.c
parentf5a2d53060169500258cdc3bdebd76fe1481ebaf (diff)
Re #1089:
- Added a feature in dialog to store and retrieve remote capabilities dug from the remote messages. - Added few APIs in dialog to query and update remote capabilities, also added an API in pjsua_call to query whether a capability is supported by remote. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3196 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_call.c')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index cc9eaad9..85db6d5f 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -1322,6 +1322,31 @@ PJ_DEF(pj_status_t) pjsua_call_get_info( pjsua_call_id call_id,
return PJ_SUCCESS;
}
+/*
+ * Check if call remote peer support the specified capability.
+ */
+PJ_DEF(pjsip_dialog_cap_status) pjsua_call_remote_has_cap(
+ pjsua_call_id call_id,
+ int htype,
+ const pj_str_t *hname,
+ const pj_str_t *token)
+{
+ pjsua_call *call;
+ pjsip_dialog *dlg;
+ pj_status_t status;
+ pjsip_dialog_cap_status cap_status;
+
+ status = acquire_call("pjsua_call_peer_has_cap()", call_id, &call, &dlg);
+ if (status != PJ_SUCCESS)
+ return PJSIP_DIALOG_CAP_UNKNOWN;
+
+ cap_status = pjsip_dlg_remote_has_cap(dlg, htype, hname, token);
+
+ pjsip_dlg_dec_lock(dlg);
+
+ return cap_status;
+}
+
/*
* Attach application specific data to the call.