Skip to content

Commit 413caa5

Browse files
authored
Update inbound call handling with new number variables (#184)
1 parent 2d1ed12 commit 413caa5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

voice/connect-an-inbound-call.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require('dotenv').config({ path: __dirname + '/../.env' });
22

3-
const VONAGE_NUMBER = process.env.VONAGE_NUMBER;
43
const VONAGE_VIRTUAL_NUMBER = process.env.VONAGE_VIRTUAL_NUMBER;
4+
const VOICE_TO_NUMBER = process.env.VOICE_TO_NUMBER;
55
const port = process.env.PORT || 3000;
66

77
const Express = require('express');
@@ -12,11 +12,11 @@ const onInboundCall = (_, response) => {
1212
const ncco = [
1313
{
1414
action: 'connect',
15-
from: VONAGE_NUMBER,
15+
from: VONAGE_VIRTUAL_NUMBER,
1616
endpoint: [
1717
{
1818
type: 'phone',
19-
number: VONAGE_VIRTUAL_NUMBER,
19+
number: VOICE_TO_NUMBER,
2020
},
2121
],
2222
},

0 commit comments

Comments
 (0)