fix: B2B uac parse Signal 0 (#59)

Co-authored-by: Quan HL <quanluuhoang8@gmail.com>
This commit is contained in:
Hoan Luu Huu
2023-01-18 22:33:01 +07:00
committed by GitHub
parent f6c0ee6c0d
commit 36b2c752da
+1 -1
View File
@@ -758,7 +758,7 @@ Duration=${payload.duration} `
}
}
else if (dlg.type === 'uac' && ['application/dtmf-relay', 'application/dtmf'].includes(contentType)) {
const arr = /Signal=\s*([1-9#*])/.exec(req.body);
const arr = /Signal=\s*([0-9#*])/.exec(req.body);
if (!arr) {
this.logger.info({body: req.body}, '_onInfo: invalid INFO dtmf request');
throw new Error(`_onInfo: no dtmf in body for ${contentType}`);