diff --git a/lib/tasks/dial.js b/lib/tasks/dial.js index 05bc3c73..a0ae8334 100644 --- a/lib/tasks/dial.js +++ b/lib/tasks/dial.js @@ -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) {