Skip to content

[Bug]: Issue with transferCallWithNCCO method #986

Open
@LucaDaniele99

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugA defect in the code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions