From: Sven Kube Date: Thu, 23 Oct 2025 06:57:00 +0000 (+0200) Subject: res_pjsip_refer: don't defer session termination for ari transfer X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55e403fa8b9c139953e9216f399f391c32f2f6e5;p=thirdparty%2Fasterisk.git res_pjsip_refer: don't defer session termination for ari transfer Allow session termination during an in progress ari handled transfer. --- diff --git a/res/res_pjsip_refer.c b/res/res_pjsip_refer.c index 67d7836ce7..eb6e2f1f3f 100644 --- a/res/res_pjsip_refer.c +++ b/res/res_pjsip_refer.c @@ -231,12 +231,6 @@ static int refer_progress_notify(void *data) if (notification->progress->ari_state) { struct transfer_ari_state *ari_state = notification->progress->ari_state; - if (ari_state->transferer && notification->state == PJSIP_EVSUB_STATE_TERMINATED) { - if (!ast_sip_push_task(ari_state->transferer->serializer, defer_termination_cancel_task, ari_state->transferer)) { - /* Gave the ref to the pushed task. */ - ari_state->transferer = NULL; - } - } ari_notify(ari_state); } @@ -1581,13 +1575,6 @@ static int refer_incoming_ari_request(struct ast_sip_session *session, pjsip_rx_ } ao2_ref(session, +1); - if (ast_sip_session_defer_termination(session)) { - ast_log(LOG_ERROR, "Channel '%s' from endpoint '%s' attempted ari-only transfer but could not defer termination, rejecting\n", - ast_channel_name(session->channel), - ast_sorcery_object_get_id(session->endpoint)); - ao2_cleanup(session); - return 500; - } state->transferer = session;