add ability to have custom headers on outdial

This commit is contained in:
Dave Horton
2020-04-15 11:14:00 -04:00
parent 55a526e1d4
commit fb62daf54d

View File

@@ -19,7 +19,10 @@ router.post('/', async(req, res) => {
const sbcAddress = getSBC(); const sbcAddress = getSBC();
if (!sbcAddress) throw new Error('no available SBCs for outbound call creation'); if (!sbcAddress) throw new Error('no available SBCs for outbound call creation');
const target = restDial.to; const target = restDial.to;
const opts = { callingNumber: restDial.from }; const opts = {
callingNumber: restDial.from,
headers: req.body.headers || {}
};
switch (target.type) { switch (target.type) {
case 'phone': case 'phone':