Question
Why do I receive Voice API event callbacks in the wrong order?
Applies To
- Voice API
- Callback Event
Answer
Voice API calls that have not received a "rejected" event callback should expect to receive a "completed" event at the end of the call.
Calls start with a "started" and then a "ringing" callback event, which are commonly created simultaneously. You may receive these in a different order to that which you expect if latency is experienced between the Vonage API platform and your webhook or if you process one callback ahead of the other. You may experience this between a failed call reason ("busy", "cancelled", "timeout", etc.) and the "completed" event callback also.
If you are using a Connect with Fallback NCCO, you will not receive a "completed" event callback until the Connect action has finished. For example, if you timeout on a Connect to a PSTN number and return an NCCO to Connect to a different PSTN number, you will not receive a "completed" event callback until the second attempt has finished.
If you need to receive the event callbacks in a set order, we recommend queuing callbacks until you receive the expected callback has been received.
Articles in this section
- What is a Conversation ID?
- How to configure the custom webhook timeout for Voice API functionality and what are the allowed timeout ranges ?
- How do I change TTL for the Conversations and Call Legs?
- Why are call progress events not being received on the Event URL defined in the conversation action NCCO?
- Why is there an extended silence at the beginning of a call and how can it be reduced?
- Intermittent WebSocket Disconnections
- What Is An NCCO
- How Does Jitter Impact Voice Calls
- Voice API "Bad Request" Error When Ending Calls Immediately After Creation
- What Is MOS Score In Voice Calls?