Ignore:
Timestamp:
Jun 3, 2010 10:41:32 AM (14 years ago)
Author:
nanang
Message:

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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r3013 r3196  
    13211321 
    13221322    return PJ_SUCCESS; 
     1323} 
     1324 
     1325/* 
     1326 * Check if call remote peer support the specified capability. 
     1327 */ 
     1328PJ_DEF(pjsip_dialog_cap_status) pjsua_call_remote_has_cap( 
     1329                                                    pjsua_call_id call_id, 
     1330                                                    int htype, 
     1331                                                    const pj_str_t *hname, 
     1332                                                    const pj_str_t *token) 
     1333{ 
     1334    pjsua_call *call; 
     1335    pjsip_dialog *dlg; 
     1336    pj_status_t status; 
     1337    pjsip_dialog_cap_status cap_status; 
     1338 
     1339    status = acquire_call("pjsua_call_peer_has_cap()", call_id, &call, &dlg); 
     1340    if (status != PJ_SUCCESS) 
     1341        return PJSIP_DIALOG_CAP_UNKNOWN; 
     1342 
     1343    cap_status = pjsip_dlg_remote_has_cap(dlg, htype, hname, token); 
     1344 
     1345    pjsip_dlg_dec_lock(dlg); 
     1346 
     1347    return cap_status; 
    13231348} 
    13241349 
Note: See TracChangeset for help on using the changeset viewer.