Changeset 4421
- Timestamp:
- Mar 6, 2013 5:55:09 AM (12 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r4347 r4421 4010 4010 /** 4011 4011 * Update the local invite session's contact with the contact URI from 4012 * the account. This flag is only valid for #pjsua_call_ reinvite() and4013 * #pjsua_call_ update(). This flag is useful in IP address change4014 * situation, after the local account's Contact has been updated4015 * (typically with re-registration) use this flag to update the invite4016 * session with the new Contact and to inform this new Contact to the4017 * remote peer with the outgoing re-INVITE or UPDATE4012 * the account. This flag is only valid for #pjsua_call_set_hold2(), 4013 * #pjsua_call_reinvite() and #pjsua_call_update(). This flag is useful 4014 * in IP address change situation, after the local account's Contact has 4015 * been updated (typically with re-registration) use this flag to update 4016 * the invite session with the new Contact and to inform this new Contact 4017 * to the remote peer with the outgoing re-INVITE or UPDATE. 4018 4018 */ 4019 4019 PJSUA_CALL_UPDATE_CONTACT = 2, … … 4475 4475 const pjsua_msg_data *msg_data); 4476 4476 4477 /** 4478 * Put the specified call on hold. This will send re-INVITE with the 4479 * appropriate SDP to inform remote that the call is being put on hold. 4480 * The final status of the request itself will be reported on the 4481 * \a on_call_media_state() callback, which inform the application that 4482 * the media state of the call has changed. 4483 * 4484 * @param call_id Call identification. 4485 * @param options Bitmask of pjsua_call_flag constants. Currently, only 4486 * the flag PJSUA_CALL_UPDATE_CONTACT can be used. 4487 * @param msg_data Optional message components to be sent with 4488 * the request. 4489 * 4490 * @return PJ_SUCCESS on success, or the appropriate error code. 4491 */ 4492 PJ_DECL(pj_status_t) pjsua_call_set_hold2(pjsua_call_id call_id, 4493 unsigned options, 4494 const pjsua_msg_data *msg_data); 4477 4495 4478 4496 /** -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r4411 r4421 2258 2258 const pjsua_msg_data *msg_data) 2259 2259 { 2260 return pjsua_call_set_hold2(call_id, 0, msg_data); 2261 } 2262 2263 PJ_DEF(pj_status_t) pjsua_call_set_hold2(pjsua_call_id call_id, 2264 unsigned options, 2265 const pjsua_msg_data *msg_data) 2266 { 2260 2267 pjmedia_sdp_session *sdp; 2261 2268 pjsua_call *call; 2262 2269 pjsip_dialog *dlg = NULL; 2263 2270 pjsip_tx_data *tdata; 2271 pj_str_t *new_contact = NULL; 2264 2272 pj_status_t status; 2265 2273 … … 2284 2292 goto on_return; 2285 2293 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 2286 2300 /* 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); 2288 2302 if (status != PJ_SUCCESS) { 2289 2303 pjsua_perror(THIS_FILE, "Unable to create re-INVITE", status);
Note: See TracChangeset
for help on using the changeset viewer.