From 0ecc2f4ff37bd394137fc846133e1495f42a234b Mon Sep 17 00:00:00 2001 From: Joao Santos Date: Tue, 30 Jan 2024 12:41:35 +0000 Subject: [PATCH] add steerin id --- public/full.js | 9 +++++++-- views/index.ejs | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/public/full.js b/public/full.js index aafee5b..b4561de 100644 --- a/public/full.js +++ b/public/full.js @@ -373,13 +373,18 @@ window.connect = async () => { connectStatus.innerHTML = 'Connecting...' // Set a node_id for steering - const steeringId = undefined + const steeringId = () { + const formValue= document.getElementById('destination').value; + return !!formValue && formValue.trim().length ? formValue.trim() : undefined; + } + + const call = await client.dial({ to: document.getElementById('destination').value, logLevel: 'debug', debug: { logWsTraffic: true }, - nodeId: steeringId, + nodeId: steeringId(), }) window.__call = call diff --git a/views/index.ejs b/views/index.ejs index 23650a0..83bc72a 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -50,6 +50,10 @@
Connect
+
+ + +