Changeset 4929
- Timestamp:
- Sep 24, 2014 8:26:33 AM (10 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r4921 r4929 613 613 * Bitmask of #pjsua_call_flag constants. 614 614 * 615 * Default: 0615 * Default: PJSUA_CALL_INCLUDE_DISABLED_MEDIA 616 616 */ 617 617 unsigned flag; … … 620 620 * This flag controls what methods to request keyframe are allowed on 621 621 * the call. Value is bitmask of #pjsua_vid_req_keyframe_method. 622 * 623 * Default: PJSUA_VID_REQ_KEYFRAME_SIP_INFO 622 624 */ 623 625 unsigned req_keyframe_method; … … 4086 4088 /** 4087 4089 * When the call is being put on hold, specify this flag to unhold it. 4088 * This flag is only valid for #pjsua_call_reinvite(). Note: for 4089 * compatibility reason, this flag must have value of 1 because 4090 * previously the unhold option is specified as boolean value. 4090 * This flag is only valid for #pjsua_call_reinvite() and 4091 * #pjsua_call_update(). Note: for compatibility reason, this flag must 4092 * have value of 1 because previously the unhold option is specified as 4093 * boolean value. 4091 4094 */ 4092 4095 PJSUA_CALL_UNHOLD = 1, … … 4106 4109 * Include SDP "m=" line with port set to zero for each disabled media 4107 4110 * (i.e when aud_cnt or vid_cnt is set to zero). This flag is only valid 4108 * for #pjsua_call_make_call(). 4111 * for #pjsua_call_make_call(), #pjsua_call_reinvite(), and 4112 * #pjsua_call_update(). Note that even this flag is applicable in 4113 * #pjsua_call_reinvite() and #pjsua_call_update(), it will only take 4114 * effect when the re-INVITE/UPDATE operation regenerates SDP offer, 4115 * such as changing audio or video count in the call setting. 4109 4116 */ 4110 4117 PJSUA_CALL_INCLUDE_DISABLED_MEDIA = 4, … … 4591 4598 4592 4599 /** 4593 * Send re-INVITE torelease hold.4600 * Send re-INVITE request or release hold. 4594 4601 * The final status of the request itself will be reported on the 4595 4602 * \a on_call_media_state() callback, which inform the application that … … 4611 4618 4612 4619 /** 4613 * Send re-INVITE torelease hold.4620 * Send re-INVITE request or release hold. 4614 4621 * The final status of the request itself will be reported on the 4615 4622 * \a on_call_media_state() callback, which inform the application that … … 4618 4625 * @param call_id Call identification. 4619 4626 * @param opt Optional call setting, if NULL, the current call 4620 * setting will remain unchanged. 4627 * setting will be used. Note that to release hold 4628 * or update contact or omit SDP offer, this parameter 4629 * cannot be NULL and it must specify appropriate flags, 4630 * e.g: PJSUA_CALL_UNHOLD, PJSUA_CALL_UPDATE_CONTACT, 4631 * PJSUA_CALL_NO_SDP_OFFER. 4621 4632 * @param msg_data Optional message components to be sent with 4622 4633 * the request. … … 4649 4660 * @param call_id Call identification. 4650 4661 * @param opt Optional call setting, if NULL, the current call 4651 * setting will remain unchanged. 4662 * setting will be used. Note that to release hold 4663 * or update contact or omit SDP offer, this parameter 4664 * cannot be NULL and it must specify appropriate flags, 4665 * e.g: PJSUA_CALL_UNHOLD, PJSUA_CALL_UPDATE_CONTACT, 4666 * PJSUA_CALL_NO_SDP_OFFER. 4652 4667 * @param msg_data Optional message components to be sent with 4653 4668 * the request. -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r4924 r4929 557 557 558 558 /* 559 * Cleanup call setting flag to avoid one time flags, such as 560 * PJSUA_CALL_UNHOLD, PJSUA_CALL_UPDATE_CONTACT, or 561 * PJSUA_CALL_NO_SDP_OFFER, to be sticky (ticket #1793). 562 */ 563 static void cleanup_call_setting_flag(pjsua_call_setting *opt) 564 { 565 opt->flag &= ~(PJSUA_CALL_UNHOLD | PJSUA_CALL_UPDATE_CONTACT | 566 PJSUA_CALL_NO_SDP_OFFER); 567 } 568 569 570 /* 559 571 * Initialize call settings based on account ID. 560 572 */ … … 580 592 pj_assert(call); 581 593 582 if (!opt) 594 if (!opt) { 595 cleanup_call_setting_flag(&call->opt); 583 596 return PJ_SUCCESS; 597 } 584 598 585 599 #if !PJMEDIA_HAS_VIDEO … … 1146 1160 /* Copy call setting from the replaced call */ 1147 1161 call->opt = replaced_call->opt; 1162 cleanup_call_setting_flag(&call->opt); 1148 1163 1149 1164 /* Notify application */ … … 2411 2426 call->opt.flag = options; 2412 2427 2413 status = pjsua_call_reinvite2(call_id, NULL, msg_data);2428 status = pjsua_call_reinvite2(call_id, &call->opt, msg_data); 2414 2429 2415 2430 on_return: … … 2525 2540 call->opt.flag = options; 2526 2541 2527 status = pjsua_call_update2(call_id, NULL, msg_data);2542 status = pjsua_call_update2(call_id, &call->opt, msg_data); 2528 2543 2529 2544 on_return: … … 3952 3967 if (pjsua_var.ua_cfg.cb.on_call_rx_offer) { 3953 3968 pjsip_status_code code = PJSIP_SC_OK; 3954 pjsua_call_setting opt = call->opt; 3969 pjsua_call_setting opt; 3970 3971 cleanup_call_setting_flag(&call->opt); 3972 opt = call->opt; 3955 3973 3956 3974 (*pjsua_var.ua_cfg.cb.on_call_rx_offer)(call->index, offer, NULL, … … 4374 4392 } 4375 4393 4394 cleanup_call_setting_flag(&existing_call->opt); 4376 4395 call_opt = existing_call->opt; 4377 4396 if (pjsua_var.ua_cfg.cb.on_call_transfer_request2) { … … 4677 4696 { 4678 4697 /* Call unhold failed */ 4679 call->opt.flag &= ~PJSUA_CALL_UNHOLD;4680 4698 call->local_hold = PJ_TRUE; 4681 4699 PJ_LOG(3,(THIS_FILE, "Error releasing hold on call %d (reason=%d)",
Note: See TracChangeset
for help on using the changeset viewer.