unbridge dial ep with caller ep to avoid media release when referHook (#972)

This commit is contained in:
Hoan Luu Huu
2024-11-15 07:30:49 +07:00
committed by GitHub
parent 71c475e758
commit 594c867192

View File

@@ -381,6 +381,9 @@ class TaskDial extends Task {
this.logger.info(err, 'Dial:handleRefer - error setting new application after receiving REFER');
}
}
//caller and callee legs are briged together, accept refer with 202 will release callee leg endpoint
//that makes freeswitch release endpoint for caller leg.
if (this.ep) this.ep.unbridge();
res.send(202);
this.logger.info('DialTask:handleRefer - sent 202 Accepted');
} catch (err) {