if (next_state == nua_callstate_completing) {
if (NH_PGET(nh, auto_ack) ||
- /* Auto-ACK response to re-INVITE unless auto_ack is set to 0 */
- (ss->ss_state == nua_callstate_ready &&
+ /* Auto-ACK response to re-INVITE when media is enabled
+ and auto_ack is not set to 0 on handle */
+ (ss->ss_state == nua_callstate_ready && nh->nh_soa &&
!NH_PISSET(nh, auto_ack))) {
nua_client_request_t *cru;
/* There is an un-ACK-ed INVITE there */
assert(du->du_cr->cr_method == sip_method_invite);
if (NH_PGET(nh, auto_ack) ||
- /* Auto-ACK response to re-INVITE unless auto_ack is set to 0 */
- (ss->ss_state == nua_callstate_ready && !NH_PISSET(nh, auto_ack))) {
+ /* Auto-ACK response to re-INVITE when media is enabled
+ and auto_ack is not set to 0 on handle */
+ (ss->ss_state == nua_callstate_ready && nh->nh_soa &&
+ !NH_PISSET(nh, auto_ack))) {
/* There should be no UPDATE with offer/answer
if PRACK with offer/answer was ongoing! */
if (nua_invite_client_ack(du->du_cr, NULL) > 0)
assert(du->du_cr->cr_method == sip_method_invite);
if (NH_PGET(nh, auto_ack) ||
- /* Auto-ACK response to re-INVITE unless auto_ack is set to 0 */
- (ss->ss_state == nua_callstate_ready && !NH_PISSET(nh, auto_ack))) {
+ /* Auto-ACK response to re-INVITE when media is enabled
+ and auto_ack is not set to 0 on handle */
+ (ss->ss_state == nua_callstate_ready && nh->nh_soa &&
+ !NH_PISSET(nh, auto_ack))) {
if (nua_invite_client_ack(du->du_cr, NULL) > 0)
next_state = nua_callstate_ready;
else
*
* Default value is NUTAG_AUTOACK(1).
*
+ * @par Auto ACK with Re-INVITE requests
+ * By default, NUA tries to auto-ACK the final response to re-INVITE used to
+ * refresh the session when the media is enabled. Set NUTAG_AUTOACK(0) on
+ * the call handle (e.g., include the tag with nua_invite() or
+ * nua_respond()) in order to disable the auto ACK with re-INVITE.
+ *
* Corresponding tag taking reference parameter is NUTAG_AUTOACK_REF().
*/
tag_typedef_t nutag_autoack = BOOLTAG_TYPEDEF(autoACK);