Voximplant Call updated event

66 Views Asked by At

I have implemented below method in case upstream operator change caller id information but it is not working properly :-

VoxEngine.addEventListener(AppEvents.CallUpdated, (e) => {
    const call = e.call;
    const oldCallerID = e.oldCallFields.callerid; // Get the previous caller ID
    const newCallerID = call.number(); // Get the updated caller ID

    console.log('Caller ID changed from', oldCallerID, 'to', newCallerID);

    // Add your logic to handle the updated caller details
    // This could include storing the information, logging, or taking specific actions based on the change.
});
1

There are 1 best solutions below

3
On

In general, it's not very good idea to use chatgpt and similar tools to generate code. The above snippet will not work because it basically refers to fields, events, etc. that don't exist in the Voximplant platform.

And the task in question has not solution - it's impossible to figure out if upstream carrier changed the callerid of the outbound call.