Ignore:
Timestamp:
Mar 6, 2013 5:55:09 AM (11 years ago)
Author:
ming
Message:

Fixed #1629: Add pjsua_call_set_hold2() API to allow update of Contact header

File:
1 edited

Legend:

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

    r4411 r4421  
    22582258                                        const pjsua_msg_data *msg_data) 
    22592259{ 
     2260    return pjsua_call_set_hold2(call_id, 0, msg_data); 
     2261} 
     2262 
     2263PJ_DEF(pj_status_t) pjsua_call_set_hold2(pjsua_call_id call_id, 
     2264                                         unsigned options, 
     2265                                         const pjsua_msg_data *msg_data) 
     2266{ 
    22602267    pjmedia_sdp_session *sdp; 
    22612268    pjsua_call *call; 
    22622269    pjsip_dialog *dlg = NULL; 
    22632270    pjsip_tx_data *tdata; 
     2271    pj_str_t *new_contact = NULL; 
    22642272    pj_status_t status; 
    22652273 
     
    22842292        goto on_return; 
    22852293 
     2294    if ((options & PJSUA_CALL_UPDATE_CONTACT) && 
     2295        pjsua_acc_is_valid(call->acc_id)) 
     2296    { 
     2297        new_contact = &pjsua_var.acc[call->acc_id].contact; 
     2298    } 
     2299 
    22862300    /* Create re-INVITE with new offer */ 
    2287     status = pjsip_inv_reinvite( call->inv, NULL, sdp, &tdata); 
     2301    status = pjsip_inv_reinvite( call->inv, new_contact, sdp, &tdata); 
    22882302    if (status != PJ_SUCCESS) { 
    22892303        pjsua_perror(THIS_FILE, "Unable to create re-INVITE", status); 
Note: See TracChangeset for help on using the changeset viewer.