fixes from initial load testing

This commit is contained in:
Dave Horton
2020-02-22 15:06:01 -05:00
parent 4bd9e015b5
commit fa05b76451
8 changed files with 108 additions and 67 deletions

View File

@@ -47,14 +47,10 @@ router.post('/', async(req, res) => {
}
/* create endpoint for outdial */
const mrf = srf.locals.mrf;
const fsOpts = getFreeswitch();
if (!fsOpts) throw new Error('no available Freeswitch for outbound call creation');
const ms = await mrf.connect(fsOpts);
logger.debug('createCall: successfully connected to media server');
const ms = getFreeswitch();
if (!ms) throw new Error('no available Freeswitch for outbound call creation');
const ep = await ms.createEndpoint();
logger.debug(`createCall: successfully allocated endpoint, sending INVITE to ${sbcAddress}`);
ms.destroy();
/* launch outdial */
let sdp, sipLogger;