Changeset 3452
- Timestamp:
- Mar 16, 2011 3:52:20 AM (14 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r3441 r3452 3023 3023 } pjsua_call_info; 3024 3024 3025 3025 /** 3026 * Flags to be given to various call APIs. More than one flags may be 3027 * specified by bitmasking them. 3028 */ 3029 typedef enum pjsua_call_flag 3030 { 3031 /** 3032 * When the call is being put on hold, specify this flag to unhold it. 3033 * This flag is only valid for #pjsua_call_reinvite() and 3034 * #pjsua_call_update(). Note: for compatibility reason, this flag 3035 * must have value of 1 because previously the unhold option is 3036 * specified as boolean value. 3037 */ 3038 PJSUA_CALL_UNHOLD = 1, 3039 3040 /** 3041 * Update the local invite session's contact with the contact URI from 3042 * the account. This flag is only valid for #pjsua_call_reinvite() and 3043 * #pjsua_call_update(). This flag is useful in IP address change 3044 * situation, after the local account's Contact has been updated 3045 * (typically with re-registration) use this flag to update the invite 3046 * session with the new Contact and to inform this new Contact to the 3047 * remote peer with the outgoing re-INVITE or UPDATE 3048 */ 3049 PJSUA_CALL_UPDATE_CONTACT = 2 3050 3051 } pjsua_call_flag; 3026 3052 3027 3053 /** … … 3313 3339 * 3314 3340 * @param call_id Call identification. 3315 * @param unhold If this argument is non-zero and the call is locally 3316 * held, this will release the local hold. 3341 * @param options Bitmask of pjsua_call_flag constants. Note that 3342 * for compatibility, specifying PJ_TRUE here is 3343 * equal to specifying PJSUA_CALL_UNHOLD flag. 3317 3344 * @param msg_data Optional message components to be sent with 3318 3345 * the request. … … 3321 3348 */ 3322 3349 PJ_DECL(pj_status_t) pjsua_call_reinvite(pjsua_call_id call_id, 3323 pj_bool_t unhold,3350 unsigned options, 3324 3351 const pjsua_msg_data *msg_data); 3325 3352 … … 3328 3355 * 3329 3356 * @param call_id Call identification. 3330 * @param options Must be zero for now.3357 * @param options Bitmask of pjsua_call_flag constants. 3331 3358 * @param msg_data Optional message components to be sent with 3332 3359 * the request. -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r3374 r3452 1661 1661 */ 1662 1662 PJ_DEF(pj_status_t) pjsua_call_reinvite( pjsua_call_id call_id, 1663 pj_bool_t unhold,1663 unsigned options, 1664 1664 const pjsua_msg_data *msg_data) 1665 1665 { 1666 1666 pjmedia_sdp_session *sdp; 1667 pj_str_t *new_contact = NULL; 1667 1668 pjsip_tx_data *tdata; 1668 1669 pjsua_call *call; … … 1685 1686 1686 1687 /* Create SDP */ 1687 if (call->local_hold && !unhold) {1688 if (call->local_hold && (options & PJSUA_CALL_UNHOLD)==0) { 1688 1689 status = create_sdp_of_call_hold(call, &sdp); 1689 1690 } else { … … 1700 1701 } 1701 1702 1703 if ((options & PJSUA_CALL_UPDATE_CONTACT) & 1704 pjsua_acc_is_valid(call->acc_id)) 1705 { 1706 new_contact = &pjsua_var.acc[call->acc_id].contact; 1707 } 1708 1702 1709 /* Create re-INVITE with new offer */ 1703 status = pjsip_inv_reinvite( call->inv, NULL, sdp, &tdata);1710 status = pjsip_inv_reinvite( call->inv, new_contact, sdp, &tdata); 1704 1711 if (status != PJ_SUCCESS) { 1705 1712 pjsua_perror(THIS_FILE, "Unable to create re-INVITE", status); … … 1733 1740 { 1734 1741 pjmedia_sdp_session *sdp; 1742 pj_str_t *new_contact = NULL; 1735 1743 pjsip_tx_data *tdata; 1736 1744 pjsua_call *call; … … 1758 1766 } 1759 1767 1768 if ((options & PJSUA_CALL_UPDATE_CONTACT) & 1769 pjsua_acc_is_valid(call->acc_id)) 1770 { 1771 new_contact = &pjsua_var.acc[call->acc_id].contact; 1772 } 1773 1760 1774 /* Create UPDATE with new offer */ 1761 status = pjsip_inv_update(call->inv, NULL, sdp, &tdata);1775 status = pjsip_inv_update(call->inv, new_contact, sdp, &tdata); 1762 1776 if (status != PJ_SUCCESS) { 1763 1777 pjsua_perror(THIS_FILE, "Unable to create UPDATE request", status);
Note: See TracChangeset
for help on using the changeset viewer.