From be354cde10b9faad425584cd86bb2b04b21dccf3 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Mon, 17 Jan 2022 18:39:51 -0500 Subject: [PATCH] avoid adding multiple reset flags to rtpengine params --- lib/call-session.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/call-session.js b/lib/call-session.js index d533a39..42cd1b3 100644 --- a/lib/call-session.js +++ b/lib/call-session.js @@ -501,7 +501,8 @@ Duration=${payload.duration} ` direction, sdp: req.body, }; - if (reason) opts.flags.push('reset'); + if (reason && opts.flags && !opts.flags.includes('reset')) opts.flags.push('reset'); + let response = await this.offer(opts); if ('ok' !== response.result) {