support call to queue and application from registered user

This commit is contained in:
Quan HL
2023-10-24 12:27:12 +07:00
parent 874d1804e1
commit 994904e8e7

View File

@@ -198,8 +198,8 @@ module.exports = function(srf, logger) {
return req.srf.endSession(req);
}
let deviceAppSid = null;
const queue_name = uri.user.startWith('queue-') ? uri.user.match(/queue-(.*)/)[1] : null;
if (uri.user.startWith('app-')) {
const queue_name = uri.user.startsWith('queue-') ? uri.user.match(/queue-(.*)/)[1] : null;
if (uri.user.startsWith('app-')) {
// Call from registered device to test application.
const appSid = uri.user.match(/app-(.*)/)[1];
const app = await lookupAppBySid(appSid);