From 48e860112bd5a543a867c5ff3494285f14f6e9f8 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 baa690c2..5106d5a0 100644 --- a/lib/http-routes/api/create-call.js +++ b/lib/http-routes/api/create-call.js @@ -18,7 +18,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':