Skip to content

Commit

Permalink
add steerin id
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsantosbh committed Jan 30, 2024
1 parent d976200 commit 0ecc2f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 7 additions & 2 deletions public/full.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
<div class="card">
<div class="card-body">
<h5>Connect</h5>
<div class="form-group">
<label for="steeringId">Address</label>
<input type="text" class="form-control" id="steeringId" placeholder="optional freeswitch nodeid" />
</div>
<div class="form-group">
<label for="destination">Address</label>
<input type="text" class="form-control" id="destination" placeholder="<%= destination %>"
Expand Down

0 comments on commit 0ecc2f4

Please sign in to comment.