Description
Node Version
20.x
Platform
Linux
SDK Version
3.20.0
Code Sample
When trying to transfer a call with a new NCCO so I can start a new registration in the ongoing call, even with the example provided on the Voice API documentation I get this error:
TypeError: ncco.map is not a function at NCCOToApiCalls (/home/leg_assistant/node_modules/@vonage/voice/dist/lib/voice.js:16:39) at Voice.transferCallWithNCCO (/home/leg_assistant/node_modules/@vonage/voice/dist/lib/voice.js:412:19)
Here's the code snippet executed (req.query.callUUID is the uuid of the ongoing call passed to my endpoint via URL query parameter):
vonage.voice.transferCallWithNCCO(req.query.callUUID, { action: 'transfer', destination: { 'type': 'ncco', 'ncco': [ { 'action': 'talk', 'text': 'This is a transfer action using an inline NCCO', }, ], }, }) .then(() => { console.log('Call Transferred') }) .catch((error) => console.error(error));
Expected Behavior
Should transfer the call with the provided NCCO as it's a valid array of actions
Actual Behavior
Throws following error:
TypeError: ncco.map is not a function at NCCOToApiCalls (/home/leg_assistant/node_modules/@vonage/voice/dist/lib/voice.js:16:39) at Voice.transferCallWithNCCO (/home/leg_assistant/node_modules/@vonage/voice/dist/lib/voice.js:412:19)
Activity