From fb62daf54dc929ab7a6f65492e2c46f921127976 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Wed, 15 Apr 2020 11:14:00 -0400 Subject: [PATCH] add ability to have custom headers on outdial --- lib/http-routes/api/create-call.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/http-routes/api/create-call.js b/lib/http-routes/api/create-call.js index 8b225f13..55b3d81f 100644 --- a/lib/http-routes/api/create-call.js +++ b/lib/http-routes/api/create-call.js @@ -19,7 +19,10 @@ router.post('/', async(req, res) => { const sbcAddress = getSBC(); if (!sbcAddress) throw new Error('no available SBCs for outbound call creation'); const target = restDial.to; - const opts = { callingNumber: restDial.from }; + const opts = { + callingNumber: restDial.from, + headers: req.body.headers || {} + }; switch (target.type) { case 'phone':